From 872bd6a041e765149546a5090b2f8e977079fed5 Mon Sep 17 00:00:00 2001 From: Renato Rosa Date: Wed, 19 Aug 2026 20:45:23 -0300 Subject: [PATCH] Atualizar web/chat.js --- web/chat.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/web/chat.js b/web/chat.js index 992ff6c..3a14ebc 100644 --- a/web/chat.js +++ b/web/chat.js @@ -58,6 +58,24 @@ async function loadHistory() {
${m.content}
`; chat.appendChild(div); }); + + + // Load attachments + const a = await fetch(`/api/attachments/${conversationId}`); + const attachments = await a.json(); + + attachments.forEach(att => { + const div = document.createElement("div"); + div.className = "msg user"; + div.innerHTML = ` +
🧑
+
+ Attachment: ${att.filename}
+ Download +
+ `; + chat.appendChild(div); + }); } async function sendMessage() {