feat(chat): persistance bornee du brouillon custom chat par projet/layout (#182)
This commit is contained in:
@ -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 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user