import React from 'react';
import type { TitleShape } from '../components/ui/styled-title.js';
import { CustomCommandExecutor } from '../custom-commands/executor.js';
import { CustomCommandLoader } from '../custom-commands/loader.js';
import { ToolManager } from '../tools/tool-manager.js';
import type { CheckpointListItem } from '../types/checkpoint.js';
import type { CustomCommand } from '../types/commands.js';
import { DevelopmentMode, LLMClient, LSPConnectionStatus, MCPConnectionStatus, Message, ToolCall } from '../types/core.js';
import type { ToolResult, UpdateInfo } from '../types/index.js';
import type { Tokenizer } from '../types/tokenization.js';
import type { ThemePreset } from '../types/ui.js';
import { BoundedMap } from '../utils/bounded-map.js';
export interface ConversationContext {
    /**
     * All messages up to (but not including) tool execution.
     * Includes user message, auto-executed messages, and assistant message with tool_calls.
     */
    messagesBeforeToolExecution: Message[];
    /**
     * The assistant message that triggered tool execution.
     * Included in messagesBeforeToolExecution for reference.
     */
    assistantMsg: Message;
    /**
     * System message for the next turn after tool execution.
     */
    systemMessage: Message;
}
export declare function useAppState(): {
    client: LLMClient | null;
    messages: Message[];
    displayMessages: Message[];
    messageTokenCache: BoundedMap<string, number>;
    currentModel: string;
    currentProvider: string;
    currentTheme: ThemePreset;
    currentTitleShape: TitleShape;
    toolManager: ToolManager | null;
    customCommandLoader: CustomCommandLoader | null;
    customCommandExecutor: CustomCommandExecutor | null;
    customCommandCache: Map<string, CustomCommand>;
    startChat: boolean;
    mcpInitialized: boolean;
    updateInfo: UpdateInfo | null;
    mcpServersStatus: MCPConnectionStatus[];
    lspServersStatus: LSPConnectionStatus[];
    preferencesLoaded: boolean;
    customCommandsCount: number;
    isCancelling: boolean;
    isConversationComplete: boolean;
    abortController: AbortController | null;
    isModelSelectionMode: boolean;
    isProviderSelectionMode: boolean;
    isThemeSelectionMode: boolean;
    isTitleShapeSelectionMode: boolean;
    isNanocoderShapeSelectionMode: boolean;
    isModelDatabaseMode: boolean;
    isConfigWizardMode: boolean;
    isMcpWizardMode: boolean;
    isCheckpointLoadMode: boolean;
    checkpointLoadData: {
        checkpoints: CheckpointListItem[];
        currentMessageCount: number;
    } | null;
    isToolConfirmationMode: boolean;
    isToolExecuting: boolean;
    developmentMode: DevelopmentMode;
    pendingToolCalls: ToolCall[];
    currentToolIndex: number;
    completedToolResults: ToolResult[];
    currentConversationContext: ConversationContext | null;
    chatComponents: React.ReactNode[];
    getNextComponentKey: () => number;
    tokenizer: Tokenizer;
    setClient: React.Dispatch<React.SetStateAction<LLMClient | null>>;
    setMessages: React.Dispatch<React.SetStateAction<Message[]>>;
    setDisplayMessages: React.Dispatch<React.SetStateAction<Message[]>>;
    setMessageTokenCache: React.Dispatch<React.SetStateAction<BoundedMap<string, number>>>;
    setCurrentModel: React.Dispatch<React.SetStateAction<string>>;
    setCurrentProvider: React.Dispatch<React.SetStateAction<string>>;
    setCurrentTheme: React.Dispatch<React.SetStateAction<ThemePreset>>;
    setCurrentTitleShape: React.Dispatch<React.SetStateAction<TitleShape>>;
    setToolManager: React.Dispatch<React.SetStateAction<ToolManager | null>>;
    setCustomCommandLoader: React.Dispatch<React.SetStateAction<CustomCommandLoader | null>>;
    setCustomCommandExecutor: React.Dispatch<React.SetStateAction<CustomCommandExecutor | null>>;
    setCustomCommandCache: React.Dispatch<React.SetStateAction<Map<string, CustomCommand>>>;
    setStartChat: React.Dispatch<React.SetStateAction<boolean>>;
    setMcpInitialized: React.Dispatch<React.SetStateAction<boolean>>;
    setUpdateInfo: React.Dispatch<React.SetStateAction<UpdateInfo | null>>;
    setMcpServersStatus: React.Dispatch<React.SetStateAction<MCPConnectionStatus[]>>;
    setLspServersStatus: React.Dispatch<React.SetStateAction<LSPConnectionStatus[]>>;
    setPreferencesLoaded: React.Dispatch<React.SetStateAction<boolean>>;
    setCustomCommandsCount: React.Dispatch<React.SetStateAction<number>>;
    setIsCancelling: React.Dispatch<React.SetStateAction<boolean>>;
    setIsConversationComplete: React.Dispatch<React.SetStateAction<boolean>>;
    setAbortController: React.Dispatch<React.SetStateAction<AbortController | null>>;
    setIsModelSelectionMode: React.Dispatch<React.SetStateAction<boolean>>;
    setIsProviderSelectionMode: React.Dispatch<React.SetStateAction<boolean>>;
    setIsThemeSelectionMode: React.Dispatch<React.SetStateAction<boolean>>;
    setIsTitleShapeSelectionMode: React.Dispatch<React.SetStateAction<boolean>>;
    setIsNanocoderShapeSelectionMode: React.Dispatch<React.SetStateAction<boolean>>;
    setIsModelDatabaseMode: React.Dispatch<React.SetStateAction<boolean>>;
    setIsConfigWizardMode: React.Dispatch<React.SetStateAction<boolean>>;
    setIsMcpWizardMode: React.Dispatch<React.SetStateAction<boolean>>;
    setIsCheckpointLoadMode: React.Dispatch<React.SetStateAction<boolean>>;
    setCheckpointLoadData: React.Dispatch<React.SetStateAction<{
        checkpoints: CheckpointListItem[];
        currentMessageCount: number;
    } | null>>;
    setIsToolConfirmationMode: React.Dispatch<React.SetStateAction<boolean>>;
    setIsToolExecuting: React.Dispatch<React.SetStateAction<boolean>>;
    setDevelopmentMode: React.Dispatch<React.SetStateAction<DevelopmentMode>>;
    setPendingToolCalls: React.Dispatch<React.SetStateAction<ToolCall[]>>;
    setCurrentToolIndex: React.Dispatch<React.SetStateAction<number>>;
    setCompletedToolResults: React.Dispatch<React.SetStateAction<ToolResult[]>>;
    setCurrentConversationContext: React.Dispatch<React.SetStateAction<ConversationContext | null>>;
    setChatComponents: React.Dispatch<React.SetStateAction<React.ReactNode[]>>;
    liveComponent: React.ReactNode;
    setLiveComponent: React.Dispatch<React.SetStateAction<React.ReactNode>>;
    addToChatQueue: (component: React.ReactNode) => void;
    getMessageTokens: (message: Message) => number;
    updateMessages: (newMessages: Message[]) => void;
    resetToolConfirmationState: () => void;
};
//# sourceMappingURL=useAppState.d.ts.map