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

@ -145,6 +145,25 @@ export interface CreateAgentInput {
initialContent?: string;
}
export type ChatAttachmentSourceKind =
| "localFile"
| "clipboard"
| "dragDrop"
| "other";
/** Structured attachment intent accepted by `agent_send`. */
export interface ChatAttachmentInput {
path?: string;
filename?: string;
contentBase64?: string;
mime?: string;
sourceKind?: ChatAttachmentSourceKind;
}
export interface SendAgentChatOptions {
attachments?: ChatAttachmentInput[];
}
/**
* 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
@ -284,6 +303,7 @@ export interface AgentGateway {
sessionId: string,
prompt: string,
onChunk: (chunk: ReplyChunk) => void,
options?: SendAgentChatOptions,
): Promise<void>;
/** Interrupts only the current turn of a live structured session. */
cancelAgentChat?(sessionId: string): Promise<void>;