import type { AppContextValue } from "../app-context.js"; import type { SessionListRow } from "../../session-list-model.js"; /** Whether this person can archive chats in the workspace (session control). */ export declare function canArchiveChat(context: Pick, workspaceId: string): boolean; /** * "Archive" where this person can archive the chat, otherwise null: an * archived chat cannot be restored, and people without session control * cannot archive. */ export declare function archiveActionLabel(context: Pick, chat: Pick): "Archive" | null; /** How long Undo is offered; the server accepts it for a little longer. */ export declare const ARCHIVE_UNDO_MS = 10000; /** * Archive a chat for everyone, or undo that (`archived: false`) within the * few seconds Undo is offered. Archiving shows a notice with Undo; once it * closes, the chat moves to long-term storage for good. When only "Keep this * chat active" keeps it live, the notice offers one action that turns that * off and archives through `rerun`. Other errors are thrown for the caller; * a refusal that says what keeps the chat live is thrown as that sentence. */ export declare function requestSessionArchive(context: AppContextValue, chat: Pick, archived: boolean, /** The chat's sidebar title (sessionDisplayTitle), named in the notice. */ chatTitle: string, /** * Runs the caller's own archive again: `false` for Undo, `true` once * "Keep this chat active" is turned off. */ rerun?: (archived: boolean) => void): Promise; /** A chat's sidebar title in quotes, shortened to fit a dialog title. */ export declare function quotedChatName(sidebarTitle: string): string;