/** * [WHO]: Provides SlashDispatcherController + SlashDispatcherContext — built-in slash command dispatch * [FROM]: Depends on injected interactive command owner callbacks; no direct TUI/session/model owner imports * [TO]: Consumed by modes/interactive/interactive-mode.ts for built-in slash execution * [HERE]: modes/interactive/controllers/slash-dispatcher-controller.ts — P5 slash-dispatcher slice (UI02, dispatch-table rewrite) * * Owns command-token dispatch only. Input submission rules, extension command execution, persona-in-text * handling, bash mode, attachments, and streaming steer remain outside this controller. */ export type SlashCommandHandler = (text: string, clear: () => void) => void | Promise; export interface SlashDispatcherModelPort { showScopedModelsSelector(): Promise; handleModelCommand(searchTerm?: string): Promise; handleThinkingCommand(text: string): void; } export interface SlashDispatcherAuthPort { handleApiKeyCommand(): Promise; handleLoginCommand(text: string): Promise; showLogoutSelector(): void; } export interface SlashDispatcherTreePort { showForkSelector(): void; showTreeSelector(): void; showSessionSelector(): void; } export interface SlashDispatcherSelfUpdatePort { handleUpdateCommand(): void; handleReinstallCommand(): void; } export interface SlashDispatcherCommandHandlers { isExtensionCommand(text: string): boolean; handleAgentLoopCommand(text: string): void | Promise; handleMcpCommand(text: string): Promise; handleExportCommand(text: string): Promise; handleShareCommand(): Promise; handleCopyCommand(): void; handleStatusCommand(): Promise; handleUsageCommand(): Promise; handleNameCommand(text: string): void; handleSessionCommand(): void; handleChangelogCommand(): void; handleHotkeysCommand(): void; handleShowResourcesCommand(): void; handleClearCommand(): Promise; handleCompactCommand(customInstructions?: string): Promise; handleReloadCommand(): Promise; handleLanguageCommand(text: string): Promise; handleSoulCommand(): void; handlePersonaCommand(text: string): Promise; handleMemoryCommand(): void; handleArminSaysHi(): void; handleBrowserOptInCommand(): void; getAvailablePersonaIds(): string[]; shutdown(): Promise; } export interface SlashDispatcherContext { clearEditor(): void; settings: { showSettingsSelector(): void; }; model: SlashDispatcherModelPort; auth: SlashDispatcherAuthPort; tree: SlashDispatcherTreePort; selfUpdate: SlashDispatcherSelfUpdatePort; commands: SlashDispatcherCommandHandlers; } export declare class SlashDispatcherController { private readonly ctx; private readonly builtinSlashCommands; constructor(ctx: SlashDispatcherContext); execute(text: string, options?: { clearEditor?: boolean; }): Promise; private createBuiltinSlashCommands; }