import { Disposable } from "../../../../base/common/lifecycle.js"; import { IObservable } from "../../../../base/common/observable.js"; import { IInstantiationService } from "../../../../platform/instantiation/common/instantiation.js"; import { IChatWidgetService } from "../../../../workbench/contrib/chat/browser/chat.service.js"; import { ChatUserInteraction, ChatUserInteractionTimingResult } from "../../../../workbench/contrib/chat/browser/chatUserInteractionTelemetry.js"; import { IChatSendRequestOptions } from "../../../../workbench/contrib/chat/common/chatService/chatService.js"; import { ISessionsService } from "../../../services/sessions/browser/sessionsService.service.js"; import { IChat, ISession } from "../../../services/sessions/common/session.js"; import { ISessionsManagementService } from "../../../services/sessions/common/sessionsManagement.service.js"; export interface INewChatUserInteractionSource { readonly window: Window; readonly visible: IObservable; readonly hostVisible?: IObservable; } /** * Adapts the composer's deliberate transfer to a response widget without * restarting its measurement or mistaking composer replacement for hiding. */ export declare class NewChatUserInteraction extends Disposable { private readonly _source; private readonly _widgetService; private readonly _sessionsService; private readonly _managementService; readonly timer: ChatUserInteraction; private readonly _session; private readonly _widgets; private _chatResource; private _response; private _sourceAvailable; private _handedOff; private _newSession; private _visibilityCheckScheduled; constructor(_source: INewChatUserInteractionSource, instantiationService: IInstantiationService, _widgetService: IChatWidgetService, _sessionsService: ISessionsService, _managementService: ISessionsManagementService); /** Called only after the composer has accepted a foreground send, before preparation can replace it. */ handoff(session: ISession, chat: IChat): void; /** This callback is carried with this exact send, never inferred from prompt text or focus. */ readonly onDidCreateResponse: NonNullable; /** Disposal of a deliberately replaced composer is not abandonment of its send. */ disposeSource(): void; cancel(result: Exclude): void; private _getResponseWidget; private _scheduleVisibilityCheck; }