import { type ModelOption } from './overlays/model-selector.js'; import { type SessionListItem } from './overlays/session-selector.js'; import { type SettingItem } from './overlays/settings-overlay.js'; import type { Suggestion } from './components/autocomplete.js'; import type { Agent } from '../agent.js'; import type { PermissionLevel } from '../../../core/types.js'; /** Outcome of dispatching a slash command in the TUI (built in startTui). */ export interface TuiCommandOutcome { status: 'handled' | 'fallthrough'; /** Command owns stdin/stdout — the TUI can't run it (deferred to a later phase). */ deferred?: boolean; /** ANSI-styled text; the TUI strips ANSI before rendering. */ output?: string; /** Session should terminate. */ exit?: boolean; } interface TuiAppProps { agent: Agent; permissionLevel?: PermissionLevel; initialQuery?: string; onExit: () => void; dispatchCommand: (input: string) => Promise; commands: Suggestion[]; skills: Suggestion[]; /** Reset Ink's accumulated Static output + clear screen before a `` * remount (resize / expand / session-resume) so history repaints cleanly. */ resetView: () => void; /** Footer status info from the session. */ providerType: string; gatewayOn: boolean; skillCount: number; mcpCount: number; modelOptions: ModelOption[]; onSwitchModel: (providerType: string, modelId: string) => Promise; getSettingsList: () => SettingItem[]; onSetSetting: (dotKey: string, value: string) => Promise; listSessions: () => Promise; onSwitchSession: (sessionId: string) => Promise<{ preview: string; userMessageCount: number; toolCallCount: number; } | null>; onDeleteSession: (sessionId: string) => Promise; onExportSession: (sessionId: string) => Promise; onTranscriptSession: (sessionId: string) => Promise; onRenameSession: (sessionId: string, title: string) => Promise; getSessionId: () => string; } /** * TuiApp — Ink `` + native terminal scroll (like Command Code: the wheel * scrolls the terminal's own scrollback, so no mouse capture / no gibberish). * `` grows the scrollback; the live region swaps between modal * overlays, the inline permission prompt, a "working" indicator, and the input * prompt. A status footer is always at the bottom of the written content. * `ink-reset.ts` (`resetView`) keeps resize/expand repaints artifact-free. */ export declare function TuiApp({ agent, permissionLevel, initialQuery, onExit, dispatchCommand, commands, skills, resetView, providerType, gatewayOn, skillCount, mcpCount, modelOptions, onSwitchModel, getSettingsList, onSetSetting, listSessions, onSwitchSession, onDeleteSession, onExportSession, onTranscriptSession, onRenameSession, getSessionId, }: TuiAppProps): import("react").JSX.Element; export {};