import { IQuickInputButton, IQuickTreeItem } from "../../../../platform/quickinput/common/quickInput.js";
import { ConfirmedReason } from "./chatService.js";
import { ToolDataSource } from "./languageModelToolsService.js";
export interface ILanguageModelToolConfirmationActions {
    /** Label for the action */
    label: string;
    /** Action detail (e.g. tooltip) */
    detail?: string;
    /** Show a separator before this action */
    divider?: boolean;
    /** 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;
}
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;
}
/**
 * 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;
};
