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:
@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user