/**
 * Slash command dispatch and handler implementations extracted from InteractiveMode.
 *
 * The `dispatchSlashCommand` function contains the dispatch logic (routing text
 * to handlers), and individual handler functions implement each command.
 *
 * Handlers that are also invoked from keybindings or other subsystems remain on
 * InteractiveMode and are called through the `SlashCommandContext` interface.
 */
import type { EditorComponent, MarkdownTheme } from "@nerf/pi-tui";
import { type Component, Container } from "@nerf/pi-tui";
import type { AgentSession } from "../../core/agent-session.js";
import type { AppAction, KeybindingsManager } from "../../core/keybindings.js";
import type { SessionManager } from "../../core/session-manager.js";
import type { SettingsManager } from "../../core/settings-manager.js";
import type { TUI } from "@nerf/pi-tui";
/**
 * Provides slash command handlers with access to the parts of InteractiveMode
 * they need without coupling them to the entire class.
 */
export interface SlashCommandContext {
    readonly session: AgentSession;
    readonly ui: TUI;
    readonly keybindings: KeybindingsManager;
    readonly chatContainer: Container;
    readonly statusContainer: Container;
    readonly editorContainer: Container;
    readonly headerContainer: Container;
    readonly pendingMessagesContainer: Container;
    readonly editor: EditorComponent;
    readonly defaultEditor: EditorComponent & {
        onEscape?: () => void;
    };
    readonly sessionManager: SessionManager;
    readonly settingsManager: SettingsManager;
    invalidateFooter(): void;
    showStatus(message: string): void;
    showError(message: string): void;
    showWarning(message: string): void;
    showSelector(create: (done: () => void) => {
        component: Component;
        focus: Component;
    }): void;
    updateEditorBorderColor(): void;
    getMarkdownThemeWithSettings(): MarkdownTheme;
    requestRender(): void;
    updateTerminalTitle(): void;
    showSettingsSelector(): void;
    showModelsSelector(): Promise<void>;
    handleModelCommand(searchTerm?: string): Promise<void>;
    showUserMessageSelector(): void;
    showTreeSelector(): void;
    showProviderManager(): void;
    showOAuthSelector(mode: "login" | "logout"): Promise<void>;
    showSessionSelector(): void;
    handleClearCommand(): Promise<void>;
    handleReloadCommand(): Promise<void>;
    handleDebugCommand(): void;
    shutdown(): Promise<void>;
    executeCompaction(customInstructions?: string, isAuto?: boolean): Promise<unknown>;
    handleBashCommand(command: string, options?: {
        excludeFromContext?: boolean;
        displayCommand?: string;
        loginShell?: boolean;
    }): Promise<void>;
}
/**
 * Routes a slash command string to the appropriate handler.
 *
 * @returns `true` if the text was handled as a slash command (caller should
 *          not process it further), `false` otherwise.
 */
export declare function dispatchSlashCommand(text: string, ctx: SlashCommandContext): Promise<boolean>;
export declare function capitalizeKey(key: string): string;
export declare function getAppKeyDisplay(keybindings: KeybindingsManager, action: AppAction): string;
//# sourceMappingURL=slash-command-handlers.d.ts.map