export type MessageRole = "user" | "agent" | "system" | "error"; export interface ChatMessage { id: string; role: MessageRole; content: string; timestamp: number; metadata?: { model?: string; tokensUsed?: number; cost?: string; toolCallId?: string; }; } export interface ToolCallState { id: string; name: string; args: Record; status: "running" | "success" | "error"; output?: string; error?: string; durationMs?: number; startTime: number; endTime?: number; } export interface SystemStatus { workspace: string; model: string; provider: string; mode: "Interactive" | "Batch" | "Autonomous"; permissions: string; daemonStatus: string; dbStatus: string; redisStatus: string; tokensUsed: number; cost: string; } export type DisplayItem = { kind: "message"; data: ChatMessage; } | { kind: "tool"; data: ToolCallState; }; interface ChatStore { items: DisplayItem[]; addMessage: (role: MessageRole, content: string, metadata?: ChatMessage["metadata"]) => void; appendToMessage: (id: string, content: string) => void; clearItems: () => void; streamingMessageId: string | null; startStream: () => void; appendStream: (content: string) => void; endStream: () => void; addToolCall: (name: string, args: Record) => string; updateToolCall: (id: string, updates: Partial>) => void; status: SystemStatus; setStatus: (status: Partial) => void; isLoading: boolean; loadingStage: string; setLoading: (isLoading: boolean, stage?: string) => void; inputValue: string; setInputValue: (value: string) => void; inputHistory: string[]; inputHistoryIndex: number; addToHistory: (value: string) => void; navigateHistory: (direction: "up" | "down") => string | undefined; pendingInput: string | null; setPendingInput: (input: string | null) => void; sessionId: string; setSessionId: (id: string) => void; lastError: string | null; setLastError: (error: string | null) => void; clearError: () => void; lastFailedInput: string | null; setLastFailedInput: (input: string | null) => void; retryLastInput: () => void; themeName: string; setThemeName: (name: string) => void; cycleTheme: () => void; scrollOffset: number; setScrollOffset: (offset: number) => void; scrollUp: () => void; scrollDown: () => void; resetScroll: () => void; exitRequested: boolean; requestExit: () => void; } export declare const useChatStore: import("zustand").UseBoundStore>; export {}; //# sourceMappingURL=store.d.ts.map