import { AgentChatMoveRefusal } from "../../../../../platform/agentHost/common/agentHostChatMove.js"; /** * The reason a host refused a chat or session move: an {@link AgentChatMoveRefusedError}, or a protocol error whose * `data.reason` names an {@link AgentChatMoveRefusal}. `undefined` for any other failure. */ export declare function getChatMoveRefusal(error: unknown): AgentChatMoveRefusal | undefined; /** What a refused move was, where its explanation depends on it. */ export interface IChatMoveRefusalContext { /** Whether the chat shares its folder with another chat of its session (see {@link AgentChatMoveRefusal.Workspaceless}). */ readonly chatSharesFolder: boolean; /** Whether the chat was moved into a new session. */ readonly toNewSession?: boolean; } /** * A user-facing explanation of why a host refused a move. `chatSharesFolder` tells a {@link AgentChatMoveRefusal.Workspaceless} * refusal of a chat that shares its folder with another chat of its session from one that has no folder (or lost it). */ export declare function getChatMoveRefusalMessage(reason: AgentChatMoveRefusal, context: IChatMoveRefusalContext): string; /** * Replaces a host refusal by a {@link SessionMoveRefusedError} explaining it; other errors are returned unchanged. * `chatSharesFolder`: whether the moved chat shares its folder with another chat of its session. */ export declare function toChatMoveError(error: unknown, context: IChatMoveRefusalContext): unknown;