import type { KeybindingsManager, TUI } from '@earendil-works/pi-tui'; import type { TuiCompactionResult, TuiModelChoice, TuiShareRequest, TuiSessionStats, TuiSessionItem, TuiStartupResources, TuiTranscriptTreeEntry, TuiAgentInfo } from './tui-backend.js'; import type { ChatLog } from './components/chat-log.js'; import type { SessionTimelineItem } from '../session/transcript-outline.js'; import { type TuiHotkeyExtensionShortcut } from './format-tui-hotkeys.js'; import type { TuiState } from './tui-types.js'; import { type ReasoningLevel, type ThinkLevel, type VerboseLevel } from '../agent/transcript/thinking-types.js'; import { type AuthProfileEntry } from '../auth/profiles/index.js'; import type { TuiSlashCommandContext, TuiSlashCommandHandler } from '../extensions/types/tui.js'; import type { ProjectTrustStoreEntry } from '../project-trust/trust-store.js'; export interface SlashCommandDef { name: string; originalName?: string; description: string; } export type TuiExtensionSlashCommandEntry = SlashCommandDef & { handler: TuiSlashCommandHandler; getContext?: () => TuiSlashCommandContext; }; export declare function getSlashCommands(_isLocal: boolean, keybindings?: KeybindingsManager): SlashCommandDef[]; export declare function formatTuiHelpText(isLocal: boolean, keybindings?: KeybindingsManager, extraSlashCommands?: SlashCommandDef[], skillSlashCommands?: SlashCommandDef[], workflowSlashCommands?: SlashCommandDef[]): string; export declare function formatTuiStartText(state: TuiState, isLocal: boolean, keybindings?: KeybindingsManager, resources?: TuiStartupResources): string; import { type TuiExportRequest, type TuiImportRequest } from './tui-command-formatters.js'; export type CommandHandlerDeps = { state: TuiState; chatLog: ChatLog; tui: TUI; isLocalMode: boolean; abortActive: () => Promise; sendMessage: (text: string) => void; requestExit: () => void; updateFooter: () => void; keybindings: KeybindingsManager; uiOverlays?: { openModelPicker: (initialSearch?: string) => void; openAgentPicker?: () => void; openReviewLauncher?: () => void; openSessionPicker: () => void; openSessionTree: () => void; openTranscriptTree: () => void; openTimeline: (initialSearch?: string) => void; openUserMessageFork: () => void; openScopedModels: () => void; openThinkingSelector: () => void; openSettings: () => void; openProjectTrust: () => void; reloadKeybindings: () => void | Promise; }; setThinkingLevel?: (level: ThinkLevel) => void | Promise; setReasoningLevel?: (level: ReasoningLevel) => void | Promise; setVerboseLevel?: (level: VerboseLevel) => void | Promise; copyLastAssistant?: () => void | Promise; renameCurrentSession?: (name: string) => void | Promise; runCompaction?: (instructions?: string) => void | Promise; listModels?: () => TuiModelChoice[] | Promise; switchModel?: (modelRef: string) => void | Promise; listSessions?: () => TuiSessionItem[] | Promise; listAgents?: () => TuiAgentInfo[] | Promise; setTuiDefaultAgent?: (agentId: string) => { agentId: string; } | Promise<{ agentId: string; }>; switchAgentSession?: (sessionKey: string, agentId: string) => void | Promise; getSessionStats?: () => TuiSessionStats | Promise; getStartupResources?: () => TuiStartupResources | undefined; loadTranscriptTree?: () => TuiTranscriptTreeEntry[] | Promise; loadTimeline?: () => SessionTimelineItem[] | Promise; loadHistoryWindow?: (opts: { rowNumber: number; before?: number; after?: number; }) => boolean | Promise; loadSessionHistory?: () => void | Promise; exportSession?: (request: TuiExportRequest) => void | Promise; importSession?: (request: TuiImportRequest) => void | Promise; createShare?: (request: TuiShareRequest) => void | Promise; startWorkflowRun?: (request: { definitionId: string; goal?: string; }) => { runId: string; sessionKey: string; definitionId: string; } | Promise<{ runId: string; sessionKey: string; definitionId: string; }>; authProfiles?: { listAll: () => AuthProfileEntry[] | Promise; listProvider: (provider: string) => AuthProfileEntry[] | Promise; remove: (profileId: string) => boolean | Promise; getStorePath: () => string; }; projectTrust?: { cwd: string; hasProjectResources: () => boolean; getStorePath: () => string; getEntry: () => ProjectTrustStoreEntry | null; getSessionDecision: () => boolean | null; }; runLogin?: (provider?: string) => void | Promise; runBtwQuery?: (question: string) => void | Promise; forkSession?: (rawKey?: string) => void | Promise; skillSlashCommands?: SlashCommandDef[]; workflowSlashCommands?: SlashCommandDef[]; extensionSlashCommands?: TuiExtensionSlashCommandEntry[]; extensionShortcuts?: TuiHotkeyExtensionShortcut[]; currentAgentId?: string; setSession?: (rawKey: string) => Promise; resetSession?: () => Promise; recoverStream?: () => void | Promise; retryLastMessage?: () => void | Promise; }; export declare function createTuiCommandHandler(deps: CommandHandlerDeps): (input: string) => void;