From 968c5dc4aa037d6433c1b85071d1e65cdd64fe39 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 8 Dec 2025 14:48:03 +0000 Subject: [PATCH] Webchat: update bundled assets after attachment support --- .../Sources/Clawdis/Resources/WebChat/webchat.bundle.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/macos/Sources/Clawdis/Resources/WebChat/webchat.bundle.js b/apps/macos/Sources/Clawdis/Resources/WebChat/webchat.bundle.js index 66d88c95a..cbb24e279 100644 --- a/apps/macos/Sources/Clawdis/Resources/WebChat/webchat.bundle.js +++ b/apps/macos/Sources/Clawdis/Resources/WebChat/webchat.bundle.js @@ -196272,13 +196272,20 @@ var NativeTransport = class { this.sessionKey = sessionKey; } async *run(messages, userMessage, cfg, signal) { + const attachments = userMessage.attachments?.map((a$2) => ({ + type: a$2.type, + mimeType: a$2.mimeType, + fileName: a$2.fileName, + content: typeof a$2.content === "string" ? a$2.content : btoa(String.fromCharCode(...new Uint8Array(a$2.content))) + })); const rpcUrl = new URL("./rpc", window.location.href); const resultResp = await fetch(rpcUrl, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ text: userMessage.content?.[0]?.text ?? "", - session: this.sessionKey + session: this.sessionKey, + attachments }), signal });