UNPKG

buroventures-harald-code

Version:

Harald Code - AI-powered coding assistant CLI

25 lines (24 loc) 1.64 kB
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type PartListUnion } from '@google/genai'; import { UseHistoryManagerReturn } from './useHistoryManager.js'; import { Config, ToolConfirmationOutcome } from 'buroventures-harald-code-core'; import { HistoryItemWithoutId, HistoryItem, SlashCommandProcessorResult } from '../types.js'; import { LoadedSettings } from '../../config/settings.js'; import { type CommandContext, type SlashCommand } from '../commands/types.js'; /** * 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, onDebugMessage: (message: string) => void, openThemeDialog: () => void, openAuthDialog: () => void, openEditorDialog: () => void, toggleCorgiMode: () => void, setQuittingMessages: (message: HistoryItem[]) => void, openPrivacyNotice: () => void, toggleVimEnabled: () => Promise<boolean>, setIsProcessing: (isProcessing: boolean) => void) => { handleSlashCommand: (rawQuery: PartListUnion, oneTimeShellAllowlist?: Set<string>) => Promise<SlashCommandProcessorResult | false>; slashCommands: readonly SlashCommand[]; pendingHistoryItems: HistoryItemWithoutId[]; commandContext: CommandContext; shellConfirmationRequest: { commands: string[]; onConfirm: (outcome: ToolConfirmationOutcome, approvedCommands?: string[]) => void; } | null; };