import type { Component, TUI } from "@mariozechner/pi-tui"; import type { SessionsPatchResult } from "../gateway/protocol/index.js"; import type { ChatLog } from "./components/chat-log.js"; import type { TuiBackend } from "./tui-backend.js"; import type { TuiResult, TuiOptions, TuiStateAccess } from "./tui-types.js"; type CommandHandlerContext = { client: TuiBackend; chatLog: ChatLog; tui: TUI; opts: TuiOptions; state: TuiStateAccess; deliverDefault: boolean; openOverlay: (component: Component) => void; closeOverlay: () => void; refreshSessionInfo: () => Promise; loadHistory: () => Promise; setSession: (key: string) => Promise; refreshAgents: () => Promise; abortActive: () => Promise; setActivityStatus: (text: string) => void; formatSessionKey: (key: string) => string; applySessionInfoFromPatch: (result: SessionsPatchResult) => void; noteLocalRunId?: (runId: string) => void; noteLocalBtwRunId?: (runId: string) => void; forgetLocalRunId?: (runId: string) => void; forgetLocalBtwRunId?: (runId: string) => void; runAuthFlow?: (params: { provider?: string; }) => Promise<{ exitCode: number | null; signal: NodeJS.Signals | null; }>; requestExit: (result?: Partial) => void; }; export declare function createCommandHandlers(context: CommandHandlerContext): { handleCommand: (raw: string) => Promise; sendMessage: (text: string) => Promise; openModelSelector: () => Promise; openAgentSelector: () => Promise; openSessionSelector: () => Promise; openSettings: () => void; setAgent: (id: string) => Promise; }; export {};