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() {