import { LitElement, PropertyValues, TemplateResult, CSSResult } from 'lit'; import { SlashCommand, ContextItem } from '../ai-chatbot/types.js'; declare global { interface HTMLElementTagNameMap { 'forge-ai-prompt': AiPromptComponent; } interface HTMLElementEventMap { 'forge-ai-prompt-send': CustomEvent; 'forge-ai-prompt-cancel': CustomEvent; 'forge-ai-prompt-attachment': CustomEvent; 'forge-ai-prompt-stop': CustomEvent; 'forge-ai-prompt-debug-toggle': CustomEvent; 'forge-ai-prompt-command': CustomEvent; 'forge-ai-prompt-context-remove': CustomEvent<{ id: string; item: ContextItem; }>; } } export interface ForgeAiPromptSendEventData { value: string; time: string; date: Date; } export interface ForgeAiPromptAttachmentEventData { files: File[]; } export interface ForgeAiPromptCommandEventData { commandId: string; group: string; timestamp: Date; } export type AiPromptVariant = 'stacked' | 'inline'; export declare const AiPromptComponentTagName: keyof HTMLElementTagNameMap; /** * @tag forge-ai-prompt * * @slot actions - Slot for action components that are hidden in inline mode (voice input, file picker, model selectors, web search, etc.) * * @state inline - The prompt is in inline layout mode with actions hidden. * @state stacked - The prompt is in stacked layout mode with actions displayed below the input. * * @event {CustomEvent} forge-ai-prompt-send - Fired when the send button is clicked or Enter is pressed (without Shift). Cancelable - if cancelled, running state is not set and input is not cleared. * @event {CustomEvent} forge-ai-prompt-cancel - Fired when the Escape key is pressed (if cancelOnEscape is true). * @event {CustomEvent} forge-ai-prompt-attachment - Fired when files are pasted into the textarea. * @event {CustomEvent} forge-ai-prompt-stop - Fired when the stop button is clicked. Cancelable - if cancelled, running state remains true. * @event {CustomEvent} forge-ai-prompt-debug-toggle - Fired when the debug icon button is clicked. */ export declare class AiPromptComponent extends LitElement { #private; static styles: CSSResult; /** Placeholder text for the textarea field */ placeholder: string; /** Current value of the textarea field */ value: string; /** Layout variant for the prompt component */ variant: AiPromptVariant; /** Whether the send button is disabled */ sendDisabled: boolean; /** Whether to autofocus the textarea field when the component renders */ autofocus: boolean; /** Whether the textarea field is disabled */ inputDisabled: boolean; /** Whether to dispatch escape events when Escape key is pressed */ cancelOnEscape: boolean; /** Whether the component is in running state (shows stop button instead of send button) */ running: boolean; /** Whether debug mode is active (shows debug icon button) */ debugMode: boolean; /** Available slash commands */ slashCommands: SlashCommand[]; /** Context items to display above the input */ contextItems: ContextItem[]; private _slashMenuOpen; private _slashMenuQuery; private _inputElement; private _slashMenuElement; constructor(); willUpdate(changedProperties: PropertyValues): void; firstUpdated(): void; /** * Adds a message to the input history for up/down arrow navigation. * Use this when sending messages externally (e.g., from suggestions). */ addToHistory(message: string): void; /** * Replaces the entire message history with the provided messages. * Use this when restoring thread state from persistence. */ setHistory(messages: string[]): void; /** * Returns a copy of the current message history. */ getHistory(): string[]; private _handleSend; private _handleInput; private _handleKeyDown; private _handleStop; private _handleEscape; private _handleDebugToggle; private _handlePaste; /** * Closes the slash command menu */ closeSlashMenu(): void; /** * Focuses the textarea element */ focus(): void; render(): TemplateResult; }