import { CancellationToken } from "../../../../../base/common/cancellation.js"; import { Event } from "../../../../../base/common/event.js"; import { Disposable } from "../../../../../base/common/lifecycle.js"; import { IObservable } from "../../../../../base/common/observable.js"; import { URI } from "../../../../../base/common/uri.js"; import { ICloudSandboxApiService } from "../../../../../platform/agentHost/common/cloudSandboxAgentHost.service.js"; import { ILogService } from "../../../../../platform/log/common/log.service.js"; import { IChatSession, IChatSessionContentProvider, IChatSessionHistoryItem } from "../../common/chatSessionsService.js"; export interface ICloudSandboxReadOnlyConfig { /** Mission Control task owning the session, which is what persisted history is addressed by. */ readonly taskId: string; /** Resolve the owning task when several sessions share this environment's provider. */ readonly getTaskId?: (resource: URI) => string | undefined; /** Chat participant id. Matches the live handler, where `agentId === sessionType`. */ readonly agentId: string; /** Sanitized agent-host authority used to rewrite resource URIs in history. */ readonly connectionAuthority: string; } export declare function getCloudSandboxTaskId(config: ICloudSandboxReadOnlyConfig, resource: URI): string | undefined; /** A resolved chat session backed entirely by read-only history. */ export declare class ReadOnlyChatSession extends Disposable implements IChatSession { readonly sessionResource: URI; readonly history: readonly IChatSessionHistoryItem[]; readonly title: string | undefined; readonly isReadOnly: IObservable; private readonly _onWillDispose; readonly onWillDispose: Event; constructor(sessionResource: URI, history: readonly IChatSessionHistoryItem[], title: string | undefined, isReadOnly: IObservable, onDispose?: () => void); dispose(): void; } /** Loads recorded conversations independently of the sandbox's live connection. */ export declare class CloudSandboxReadOnlySessionHandler extends Disposable implements IChatSessionContentProvider { private readonly _config; private readonly _apiService; private readonly _logService; private readonly _isReadOnly; private readonly _chatContexts; constructor(_config: ICloudSandboxReadOnlyConfig, _apiService: ICloudSandboxApiService, _logService: ILogService); provideChatSessionContent(sessionResource: URI, token: CancellationToken, diagnosticId?: string, onCachedSession?: (session: IChatSession) => void, hasHistory?: boolean): Promise; private _findSession; private _getChatResource; private _hasChatHistory; private _createSession; resolveChatResponseUri(resource: URI, href: string, kind: "link" | "image"): string; }