import { CancellationToken } from "../../../../../../base/common/cancellation.js"; import { Disposable } from "../../../../../../base/common/lifecycle.js"; import { IChatService } from "../../chatService/chatService.service.js"; import { ILogService } from "../../../../../../platform/log/common/log.service.js"; import { ITelemetryService } from "../../../../../../platform/telemetry/common/telemetry.service.js"; import { CountTokensCallback, IPreparedToolInvocation, IToolData, IToolImpl, IToolInvocation, IToolInvocationPreparationContext, IToolResult, ToolProgress } from "../languageModelToolsService.js"; /** * Response returned to the model when the user is not available (autopilot mode). */ export declare const AUTOPILOT_ASK_USER_RESPONSE = "The user is not available to respond and will review your work later. Work autonomously and make good decisions."; export declare const AskQuestionsToolId = "vscode_askQuestions"; export interface IQuestionOption { readonly label: string; readonly description?: string; readonly recommended?: boolean; } export interface IQuestion { readonly header: string; readonly question: string; readonly multiSelect?: boolean; readonly options?: IQuestionOption[]; readonly allowFreeformInput?: boolean; } export interface IAskQuestionsParams { readonly questions: IQuestion[]; } export interface IQuestionAnswer { readonly selected: string[]; readonly freeText: string | null; readonly skipped: boolean; } export interface IAnswerResult { readonly answers: Record; } export declare function createAskQuestionsToolData(): IToolData; export declare const AskQuestionsToolData: IToolData; export declare class AskQuestionsTool extends Disposable implements IToolImpl { private readonly chatService; private readonly telemetryService; private readonly logService; constructor(chatService: IChatService, telemetryService: ITelemetryService, logService: ILogService); invoke(invocation: IToolInvocation, _countTokens: CountTokensCallback, progress: ToolProgress, token: CancellationToken): Promise; prepareToolInvocation(context: IToolInvocationPreparationContext, _token: CancellationToken): Promise; private getRequest; private toQuestionCarousel; private toChatQuestion; protected convertCarouselAnswers(questions: IQuestion[], carouselAnswers: Record | undefined, idToHeaderMap: Map): IAnswerResult; private collectMetrics; private createSkippedResult; private createAutopilotResult; /** * Build carousel answer data keyed by carousel question IDs for rendering * the completed summary in the UI during autopilot mode. */ private buildAutopilotCarouselAnswers; private sendTelemetry; }