import { Disposable } from "../../../../../base/common/lifecycle.js"; import { IObservable } from "../../../../../base/common/observable.js"; import { URI } from "../../../../../base/common/uri.js"; import { IChatService } from "../../common/chatService/chatService.service.js"; import { ILanguageService } from "../../../../../editor/common/languages/language.service.js"; /** * The kind of attention a pending approval needs. Lets consumers tailor UI * (e.g. a summary message) to what the user is actually being asked to do. */ export declare enum AgentSessionApprovalKind { /** A terminal command is waiting to be run. */ Terminal = "terminal", /** The agent is asking the user a question / needs a free-form response. */ Question = "question", /** Some other tool invocation is waiting for confirmation. */ Other = "other" } export interface IAgentSessionApprovalInfo { readonly approvalId: string; readonly kind: AgentSessionApprovalKind; readonly label: string; readonly languageId: string | undefined; readonly since: Date; confirm(): void; } /** * A stable identity for a specific pending approval. */ export declare function agentSessionApprovalId(info: IAgentSessionApprovalInfo): string; /** * Tracks approval state for all live chat sessions. For each session, * exposes an observable that emits {@link IAgentSessionApprovalInfo} * when a tool invocation is waiting for user confirmation, or `undefined` * when no approval is needed. */ export declare class AgentSessionApprovalModel extends Disposable { private readonly _chatService; private readonly _languageService; private readonly _approvals; private readonly _modelTrackers; constructor(_chatService: IChatService, _languageService: ILanguageService); getApproval(sessionResource: URI): IObservable; private _getOrCreateApproval; private _trackModel; }