import { SessionStatus as ProtocolSessionStatus, type ChangesetFile } from "../../../../../platform/agentHost/common/state/protocol/state.js"; import { ISessionFileDiff } from "../../../../../platform/agentHost/common/state/sessionState.js"; import { IChatSessionFileChange2 } from "../../../../../workbench/contrib/chat/common/chatSessionsService.js"; import { ISessionFileChange, SessionStatus } from "../../../../services/sessions/common/session.js"; import type { AgentHostUriMapper } from "../../../../../platform/agentHost/common/agentHostUri.js"; /** * Maps the protocol-layer session status bitset to the UI-layer * {@link SessionStatus} enum used by session adapters. */ export declare function mapProtocolStatus(protocol: ProtocolSessionStatus): SessionStatus; /** * Converts a single agent host diff into the chat session file change * format, or `undefined` when the diff carries no usable URI. * * @param mapUri Optional URI mapper applied after parsing. The remote agent * host provider uses this to rewrite `file:` URIs into agent-host URIs. */ export declare function diffToChange(file: ChangesetFile, mapUri?: AgentHostUriMapper, useModifiedSnapshot?: boolean): IChatSessionFileChange2 | undefined; /** * Converts a single {@link ChangesetFile} into a {@link IChatSessionFileChange2}, * or `undefined` when the underlying diff has no usable URI. */ export declare function changesetFileToChange(file: ChangesetFile, mapUri?: AgentHostUriMapper, useModifiedSnapshot?: boolean): IChatSessionFileChange2 | undefined; /** * Converts agent host diffs to the chat session file change format. * * @param mapUri Optional URI mapper applied after parsing. The remote agent * host provider uses this to rewrite `file:` URIs into agent-host URIs. */ export declare function diffsToChanges(files: readonly ChangesetFile[], mapUri?: AgentHostUriMapper): IChatSessionFileChange2[]; /** * Converts a {@link ChangesetFile | changeset file list} (the post-0.2.0 * shape produced by `changeset/fileSet` actions) into the * {@link IChatSessionFileChange2 | chat session file change} format used by * the changes view. * * Each entry's underlying {@link ISessionFileDiff} is forwarded straight to * {@link diffsToChanges}; the wrapping `id` and `_meta` fields don't carry * additional information the UI needs. */ export declare function changesetFilesToChanges(files: readonly ChangesetFile[], mapUri?: AgentHostUriMapper): IChatSessionFileChange2[]; /** * Returns `true` when the current file changes already * match the incoming diffs, avoiding unnecessary observable updates. */ export declare function diffsEqual(current: readonly ISessionFileChange[], diffs: readonly ISessionFileDiff[], mapUri?: AgentHostUriMapper): boolean; /** * Same as {@link diffsEqual} but compares against a {@link ChangesetFile} * list (the post-0.2.0 producer output). */ export declare function changesetFilesEqual(current: readonly ISessionFileChange[], files: readonly ChangesetFile[], mapUri?: AgentHostUriMapper): boolean;