import { URI } from "../../../../../base/common/uri.js";
import { IQuickInputButton, IQuickTreeItem } from "../../../../../platform/quickinput/common/quickInput.js";
import { ConfirmedReason } from "../chatService/chatService.js";
import { ToolDataSource } from "./languageModelToolsService.js";
/**
 * Computes a stable, bounded key for a tool+parameters combination
 * using SHA-256 via SubtleCrypto. The resulting hex digest ensures
 * raw parameter values are never leaked into storage.
 */
export declare function computeCombinationKey(toolId: string, parameters: unknown): Promise<string>;
export interface ILanguageModelToolConfirmationActions {
    /** Label for the action */
    label: string;
    /** Action detail (e.g. tooltip) */
    detail?: string;
    /** Show a separator before this action */
    divider?: boolean;
    /** The scope of this action, if applicable */
    scope?: "session" | "workspace" | "profile";
    /** Selects this action. Resolves true if the action should be confirmed after selection */
    select(): Promise<boolean>;
}
export interface ILanguageModelToolConfirmationRef {
    toolId: string;
    source: ToolDataSource;
    parameters: unknown;
    chatSessionResource?: URI;
    /** When set, the confirmation service will offer combination-level approval actions */
    combination?: {
        /** Human-readable label for the approval option */
        label: string;
        /** Precomputed SHA-256 key for the combination */
        key: string;
    };
}
export interface ILanguageModelToolConfirmationActionProducer {
    getPreConfirmAction(ref: ILanguageModelToolConfirmationRef): ConfirmedReason | undefined;
    getPostConfirmAction(ref: ILanguageModelToolConfirmationRef): ConfirmedReason | undefined;
    /** Gets the selectable actions to take to memorize confirmation changes */
    getPreConfirmActions(ref: ILanguageModelToolConfirmationRef): ILanguageModelToolConfirmationActions[];
    getPostConfirmActions(ref: ILanguageModelToolConfirmationRef): ILanguageModelToolConfirmationActions[];
}
export interface ILanguageModelToolConfirmationContributionQuickTreeItem extends IQuickTreeItem {
    onDidTriggerItemButton?(button: IQuickInputButton): void;
    onDidChangeChecked?(checked: boolean): void;
    onDidOpen?(): void | Promise<void>;
}
/**
 * Type that can be registered to provide more specific confirmation
 * actions for a specific tool.
 */
export type ILanguageModelToolConfirmationContribution = Partial<ILanguageModelToolConfirmationActionProducer> & {
    /**
     * Gets items to be shown in the `manageConfirmationPreferences` quick tree.
     * These are added under the tool's category.
     */
    getManageActions?(): ILanguageModelToolConfirmationContributionQuickTreeItem[];
    /**
     * Defaults to true. If false, the "Always Allow" options will not be shown
     * and _only_ your custom manage actions will be shown.
     */
    canUseDefaultApprovals?: boolean;
    /**
     * Reset all confirmation settings for this tool.
     */
    reset?(): void;
};
