export type MessageRole = "user" | "assistant" | "system" | "tool"; export type MessageStatus = "pending" | "streaming" | "complete" | "error"; export interface TextContent { type: "text"; text: string; } export interface ToolUseContent { type: "tool_use"; id: string; name: string; input: Record; } export interface ToolResultContent { type: "tool_result"; tool_use_id: string; content: string | ContentBlock[]; is_error?: boolean; } export type ContentBlock = TextContent | ToolUseContent | ToolResultContent; export interface Message { id: string; role: MessageRole; content: ContentBlock[] | string; status: MessageStatus; createdAt: number; model?: string; usage?: { input_tokens: number; output_tokens: number; }; } export interface Conversation { id: string; title: string; messages: Message[]; createdAt: number; updatedAt: number; model?: string; } export interface ToolDefinition { name: string; description: string; input_schema: Record; } export interface AppSettings { theme: "light" | "dark" | "system"; model: string; apiUrl: string; streamingEnabled: boolean; }