/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type Config, type Logger, ToolConfirmationOutcome } from '@aetherai/aether-core'; import type { PartListUnion } from '@google/genai'; import type { LoadedSettings } from '../../config/settings.js'; import type { CommandContext, SlashCommand } from '../commands/types.js'; import type { ExtensionUpdateAction, ExtensionUpdateStatus } from '../state/extensions.js'; import type { ConfirmationRequest, HistoryItem, HistoryItemBtw, HistoryItemWithoutId, SlashCommandProcessorResult } from '../types.js'; import type { ArenaDialogType } from './useArenaCommand.js'; import type { UseHistoryManagerReturn } from './useHistoryManager.js'; interface SlashCommandProcessorActions { openAuthDialog: () => void; openArenaDialog?: (type: Exclude) => void; openThemeDialog: () => void; openEditorDialog: () => void; openSettingsDialog: () => void; openModelDialog: (options?: { fastModelMode?: boolean; }) => void; openTrustDialog: () => void; openPermissionsDialog: () => void; openApprovalModeDialog: () => void; openResumeDialog: () => void; quit: (messages: HistoryItem[]) => void; setDebugMessage: (message: string) => void; dispatchExtensionStateUpdate: (action: ExtensionUpdateAction) => void; addConfirmUpdateExtensionRequest: (request: ConfirmationRequest) => void; openSubagentCreateDialog: () => void; openAgentsManagerDialog: () => void; openExtensionsManagerDialog: () => void; openMcpDialog: () => void; openHooksDialog: () => void; } /** * Hook to define and process slash commands (e.g., /help, /clear). */ export declare const useSlashCommandProcessor: (config: Config | null, settings: LoadedSettings, addItem: UseHistoryManagerReturn["addItem"], clearItems: UseHistoryManagerReturn["clearItems"], loadHistory: UseHistoryManagerReturn["loadHistory"], refreshStatic: () => void, toggleVimEnabled: () => Promise, isProcessing: boolean, setIsProcessing: (isProcessing: boolean) => void, setGeminiMdFileCount: (count: number) => void, actions: SlashCommandProcessorActions, extensionsUpdateState: Map, _isConfigInitialized: boolean, logger: Logger | null) => { handleSlashCommand: (rawQuery: PartListUnion, oneTimeShellAllowlist?: Set, overwriteConfirmed?: boolean) => Promise; slashCommands: readonly SlashCommand[]; pendingHistoryItems: HistoryItemWithoutId[]; btwItem: HistoryItemBtw | null; setBtwItem: import("react").Dispatch>; cancelBtw: () => void; commandContext: CommandContext; shellConfirmationRequest: { commands: string[]; onConfirm: (outcome: ToolConfirmationOutcome, approvedCommands?: string[]) => void; } | null; confirmationRequest: { prompt: React.ReactNode; onConfirm: (confirmed: boolean) => void; } | null; }; export {};