import { TemplateResult, CSSResult } from 'lit'; import { AiMessageThreadComponent } from '../ai-message-thread'; import { AiPromptComponent, ForgeAiPromptSendEventData } from '../ai-prompt'; import { ForgeAiSuggestionsEventData } from '../ai-suggestions'; import { AiChatbotBase } from '../ai-chatbot/ai-chatbot-base.js'; import { ChatMessage, ThreadState } from '../ai-chatbot/types.js'; import { Thread } from '../ai-threads/ai-threads'; import { Ref } from 'lit/directives/ref.js'; export type LauncherViewState = 'welcome' | 'conversation'; export interface ForgeAiChatbotLauncherThreadRenameEventData { id: string; oldTitle: string; newTitle: string; onSuccess: () => void; onError: (error?: string) => void; } export interface ForgeAiChatbotLauncherThreadDeleteEventData { id: string; thread: Thread; onSuccess: () => void; onError: (error?: string) => void; } declare global { interface HTMLElementTagNameMap { 'forge-ai-chatbot-launcher': AiChatbotLauncherComponent; } interface HTMLElementEventMap { 'forge-ai-chatbot-launcher-conversation-start': CustomEvent; 'forge-ai-chatbot-launcher-thread-rename': CustomEvent; 'forge-ai-chatbot-launcher-thread-delete': CustomEvent; } } export declare const AiChatbotLauncherComponentTagName: keyof HTMLElementTagNameMap; /** * @tag forge-ai-chatbot-launcher * * @summary An embedded AI chatbot component with a welcome view that transitions to conversation mode. * * @description * The AI Chatbot Launcher provides a page-embedded chat experience with a centered welcome/hero view * that animates into a full conversation interface when the user sends their first message. * In conversation mode, a header is displayed with options for clear, export, and agent selection. * * @slot icon - Slot for custom icon (used in both welcome view and conversation header) * @slot heading - Slot for custom heading content (welcome view only) * @slot description - Slot for custom description/welcome message below the title (welcome view only) * @slot header-actions - Slot for custom header action buttons in conversation mode (rendered before built-in header actions) * * @property {string} titleText - The title text to display in the welcome view and header (default: 'AI Assistant') * @property {string} descriptionText - The description text displayed below the title in the welcome view. * @property {HeadingLevel} headingLevel - Controls the heading level for the title content (default: 2) * @property {string | null | undefined} disclaimerText - The disclaimer text to display below the prompt. * @property {AgentInfo} agentInfo - Agent metadata for info dialog * @property {Agent[]} agents - List of available agents for selector * @property {string} selectedAgentId - Currently selected agent ID * @property {string} threadName - The name of the current thread (shown in conversation view breadcrumb) * @property {boolean} showThreadRename - Whether to show the rename option in thread actions menu * @property {boolean} showThreadDelete - Whether to show the delete option in thread actions menu * * @cssproperty --forge-ai-chatbot-launcher-icon-color - The fill color for the AI icon. * * @event {CustomEvent} forge-ai-chatbot-connected - Fired when adapter connects * @event {CustomEvent} forge-ai-chatbot-message-sent - Fired when user sends a message * @event {CustomEvent} forge-ai-chatbot-message-received - Fired when assistant message is complete * @event {CustomEvent} forge-ai-chatbot-tool-call - Fired when a tool needs to be executed * @event {CustomEvent} forge-ai-chatbot-error - Fired when an error occurs * @event {CustomEvent} forge-ai-chatbot-launcher-conversation-start - Fired when transitioning from welcome to conversation view * @event {CustomEvent} forge-ai-chatbot-response-feedback - Fired when user provides feedback on a response * @event {CustomEvent} forge-ai-chatbot-info - Fired when header info option is selected * @event {CustomEvent} forge-ai-chatbot-agent-change - Fired when agent selection changes * @event {CustomEvent} forge-ai-chatbot-launcher-thread-rename - Fired when thread rename is saved. Parent should update threadName property and call onSuccess() or onError() * @event {CustomEvent} forge-ai-chatbot-launcher-thread-delete - Fired when thread deletion is confirmed. Parent should delete thread and call onSuccess() or onError() */ export declare class AiChatbotLauncherComponent extends AiChatbotBase { #private; static styles: CSSResult; placeholder: string; descriptionText?: string; threadName?: string; showThreadRename: boolean; showThreadDelete: boolean; private _viewState; private _skipAnimation; private _editingThreadId; protected _messageThreadRef: Ref; protected _promptRef: Ref; constructor(); protected _onConnected(): void; startConversation(): void; protected _handleInfo(): void; protected _handleSend(evt: CustomEvent): Promise; protected _handleSuggestionSelect(evt: CustomEvent): Promise; clearMessages(): boolean; startNewChat(): void; setMessages(messages: ChatMessage[]): void; sendMessage(content: string, files?: File[]): Promise; setThreadState(threadState: ThreadState, options?: { skipAnimation?: boolean; }): Promise; get viewState(): LauncherViewState; focus(): void; render(): TemplateResult; }