/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { PartListUnion } from '@google/genai'; import { type Config } from '@3-/qwen-code-core'; import { type SlashCommand } from './ui/commands/types.js'; import type { LoadedSettings } from './config/settings.js'; /** * Processes a slash command in a non-interactive environment. * * @param rawQuery The raw query string (should start with '/') * @param abortController Controller to cancel the operation * @param config The configuration object * @param settings The loaded settings * @param allowedBuiltinCommandNames Optional array of built-in command names that are * allowed. If not provided or empty, only file commands are available. * @returns A Promise that resolves to `PartListUnion` if a valid command is * found and results in a prompt, or `undefined` otherwise. * @throws {FatalInputError} if the command result is not supported in * non-interactive mode. */ export declare const handleSlashCommand: (rawQuery: string, abortController: AbortController, config: Config, settings: LoadedSettings, allowedBuiltinCommandNames?: string[]) => Promise; /** * Retrieves all available slash commands for the current configuration. * * @param config The configuration object * @param settings The loaded settings * @param abortSignal Signal to cancel the loading process * @param allowedBuiltinCommandNames Optional array of built-in command names that are * allowed. If not provided or empty, only file commands are available. * @returns A Promise that resolves to an array of SlashCommand objects */ export declare const getAvailableCommands: (config: Config, settings: LoadedSettings, abortSignal: AbortSignal, allowedBuiltinCommandNames?: string[]) => Promise;