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

@ -28,6 +28,8 @@ import type {
import type {
AgentChatHandle,
AgentGateway,
ChatDraftScope,
ChatDraftSnapshot,
ConversationDetails,
CreateAgentInput,
LiveAgent,
@ -297,6 +299,24 @@ export class TauriAgentGateway implements AgentGateway {
});
}
readChatDraft(scope: ChatDraftScope): Promise<ChatDraftSnapshot> {
return invoke<ChatDraftSnapshot>("read_chat_draft", {
request: scope,
});
}
async saveChatDraft(scope: ChatDraftScope, text: string): Promise<void> {
await invoke("save_chat_draft", {
request: { ...scope, text },
});
}
async clearChatDraft(scope: ChatDraftScope): Promise<void> {
await invoke("clear_chat_draft", {
request: scope,
});
}
async closeAgentChat(sessionId: string): Promise<void> {
await invoke("close_agent_session", { sessionId });
}