feat(chat): persistance bornee du brouillon custom chat par projet/layout (#182)

This commit is contained in:
2026-08-11 16:24:20 +02:00
parent 25ad44a3d9
commit 94b4ce7e5f
23 changed files with 1552 additions and 70 deletions

View File

@ -166,6 +166,17 @@ export interface SendAgentChatOptions {
attachments?: ChatAttachmentInput[];
}
export interface ChatDraftScope {
projectId: string;
layoutId: string;
nodeId: string;
}
export interface ChatDraftSnapshot {
text: string | null;
updatedAtMs?: number | null;
}
/**
* Best-effort enriched details about a CLI conversation (T7), used to enrich the
* resume popup. Both fields are optional: a missing inspector or a missing
@ -317,6 +328,12 @@ export interface AgentGateway {
name: string,
options?: { sessionId?: string | null; arguments?: unknown[] },
): Promise<ExecuteSlashCommandResult>;
/** Reads a persisted custom chat draft scoped by project/layout/node. */
readChatDraft?(scope: ChatDraftScope): Promise<ChatDraftSnapshot>;
/** Saves a custom chat draft. Empty text is accepted but callers usually clear explicitly. */
saveChatDraft?(scope: ChatDraftScope, text: string): Promise<void>;
/** Clears a persisted custom chat draft. */
clearChatDraft?(scope: ChatDraftScope): Promise<void>;
/** Interrupts only the current turn of a live structured session. */
cancelAgentChat?(sessionId: string): Promise<void>;
/** Shuts a live structured session down. */