import type { Document } from 'chat-agent-toolkit'; /** * Base interface for all chat message types. */ export interface BaseMessage { /** ID of the chat session this message belongs to */ chatId: string; /** Unique identifier for the message */ messageId: string; /** Timestamp when the message was created */ createdAt: Date; } /** * Represents a message sent by the AI assistant. */ export interface AssistantMessage extends BaseMessage { role: 'assistant'; /** The text content of the assistant message */ content: string; /** Optional follow-up suggestions */ suggestions?: string[]; } /** * A file attached to a chat message, shown inline in the conversation flow. */ export interface MessageFile { /** Original file name (e.g. "report.pdf"). */ fileName: string; /** File extension without the dot (e.g. "pdf", "png"). */ fileExtension: string; /** Unique identifier of the uploaded file. */ fileId: string; } /** * Represents a message sent by the user. */ export interface UserMessage extends BaseMessage { role: 'user'; /** The text content of the user message */ content: string; /** Files the user attached to this message, if any. */ files?: MessageFile[]; } /** * Represents a message containing search sources or citations. */ export interface SourceMessage extends BaseMessage { role: 'source'; /** Array of documentation sources found during research */ sources: Document[]; } export interface SuggestionMessage extends BaseMessage { role: 'suggestion'; suggestions: string[]; } export interface SearchQuery { query: string; /** Display label e.g. "Web", "Academic" */ category?: string; status: 'running' | 'done'; } /** Transient progress message emitted while the agent runs searches. */ export interface SearchingMessage extends BaseMessage { role: 'searching'; queries: SearchQuery[]; } /** * Union type representing all possible message roles in a chat. */ export type Message = AssistantMessage | UserMessage | SourceMessage | SuggestionMessage | SearchingMessage; /** * Represents a single exchange in the chat (user + assistant). */ export type ChatTurn = UserMessage | AssistantMessage; export interface File { fileName: string; fileExtension: string; fileId: string; } /** * Main window component for the chat interface. * Ordinates the overall chat flow, handling errors, loading states, * and switching between the homepage and the active conversation thread. * * @returns {JSX.Element} The rendered chat window */ declare const ChatWindow: () => import("react").JSX.Element; export default ChatWindow;