import { URI } from "../../../base/common/uri.js"; import type { AgentProvider } from "./agent.js"; import type { ChatOrigin, Message, Turn } from "./state/protocol/channels-chat/state.js"; /** Saved workspace intent, including checkouts whose lifetime belongs to the source session. */ export type AgentHostSavedChatWorkspace = { readonly kind: "none"; } | { readonly kind: "folder"; readonly workingDirectories: readonly URI[]; } | { readonly kind: "managed"; readonly workingDirectories: readonly URI[]; readonly suggestedDirectories: readonly URI[]; readonly managedDirectories: readonly URI[]; }; /** A saved exact chat, read without restoring an executable provider session. */ export interface IAgentHostSavedChat { readonly session: URI; readonly chat: URI; readonly provider: AgentProvider; /** Opaque saved ownership identity, echoed when completing a continuation. */ readonly identity: string; readonly origin?: ChatOrigin; readonly availability: { readonly kind: "available"; } | { readonly kind: "archived"; } | { readonly kind: "continued"; readonly destination: URI; }; readonly title: string; readonly turns: readonly Turn[]; readonly draft?: Message; readonly workspace: AgentHostSavedChatWorkspace; } export interface IAgentHostSavedChatContinuation { readonly session: URI; readonly chat: URI; readonly identity: string; readonly destination: URI; } export interface IAgentHostSavedChatContinuationResult { /** Effective archive state of the selected chat, including its owning session. */ readonly archived: boolean; } /** URI strings on the VS Code extension protocol, with protocol-native turns and draft. */ export interface IAgentHostSavedChatDto extends Omit { readonly session: string; readonly chat: string; readonly availability: { readonly kind: "available"; } | { readonly kind: "archived"; } | { readonly kind: "continued"; readonly destination: string; }; readonly workspace: { readonly kind: "none"; } | { readonly kind: "folder"; readonly workingDirectories: readonly string[]; } | { readonly kind: "managed"; readonly workingDirectories: readonly string[]; readonly suggestedDirectories: readonly string[]; readonly managedDirectories: readonly string[]; }; } export declare function savedChatToDto(chat: IAgentHostSavedChat): IAgentHostSavedChatDto; export declare function reviveSavedChat(chat: IAgentHostSavedChatDto): IAgentHostSavedChat;