feat(chat): #155 paste image depuis presse-papier dans le composer custom (QA verte)

- frontend: onPaste sur CustomAgentChatView, détection MIME image, chip/preview d'attachment, envoi via le contrat #154 (adapters/agent, ports)

- backend: import d'image par bytes dans le store attachments (commands, chat_attachments app+infra, dto, ports) + tests
This commit is contained in:
2026-08-06 11:01:50 +02:00
parent 88dfbfe471
commit 790c4755be
15 changed files with 791 additions and 84 deletions

View File

@ -32,6 +32,7 @@ import type {
OpenTerminalOptions,
ReattachAgentChatResult,
ReattachResult,
SendAgentChatOptions,
StoppedLiveAgent,
TerminalHandle,
} from "@/ports";
@ -261,12 +262,14 @@ export class TauriAgentGateway implements AgentGateway {
sessionId: string,
prompt: string,
onChunk: (chunk: ReplyChunk) => void,
options: SendAgentChatOptions = {},
): Promise<void> {
const channel = new Channel<ReplyChunk>();
channel.onmessage = onChunk;
await invoke("agent_send", {
sessionId,
prompt,
...(options.attachments ? { attachments: options.attachments } : {}),
onReply: channel,
});
}