From 837c32de287d9afb55eb338f12d5624eb0ba70b5 Mon Sep 17 00:00:00 2001 From: Laura Date: Mon, 18 Aug 2025 04:46:59 +0200 Subject: [PATCH] tweak --- static/js/chat.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/static/js/chat.js b/static/js/chat.js index 0613f91..8347fab 100644 --- a/static/js/chat.js +++ b/static/js/chat.js @@ -503,7 +503,10 @@ }; if (this.#files.length) { - data.files = this.#files; + data.files = this.#files.map(file => ({ + name: file.name, + content: file.content, + })); } if (this.#tool) { @@ -999,7 +1002,7 @@ models[model.id] = model; modelList.push(model); - }) + }); dropdown($model, 4); @@ -1009,7 +1012,7 @@ el.textContent = prompt.name; promptList.push(prompt); - }) + }); dropdown($prompt); @@ -1281,7 +1284,7 @@ } pushAttachment(file); - } catch(err) { + } catch (err) { alert(err.message); } });