From 01c5bedb6d96c1e13c16acae802701eefc447288 Mon Sep 17 00:00:00 2001 From: Meleki Date: Fri, 27 Feb 2026 09:08:15 +0100 Subject: [PATCH] Attachment-Indicator auch in archivierten Nachrichten anzeigen --- wwwroot/js/history.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wwwroot/js/history.js b/wwwroot/js/history.js index 300aa39..5c7ab13 100644 --- a/wwwroot/js/history.js +++ b/wwwroot/js/history.js @@ -111,6 +111,18 @@ async function loadLatestArchive() { case 'text': div.className = msg.role === 'user' ? 'msg user archived' : 'msg assistant archived'; div.textContent = msg.content; + if (msg.role === 'user' && msg.attachmentCount > 0) { + let names = []; + try { if (msg.attachmentNames) names = JSON.parse(msg.attachmentNames); } catch {} + const nameList = names.filter(n => n).join(', '); + const ind = document.createElement('div'); + ind.className = 'attachment-indicator'; + ind.textContent = `📎 ${msg.attachmentCount} Datei${msg.attachmentCount > 1 ? 'en' : ''}` + (nameList ? `: ${nameList}` : ''); + ind.style.cursor = 'pointer'; + ind.title = 'Klicken zum Anzeigen'; + ind.addEventListener('click', () => loadAndShowAttachments(msg.id, ind)); + div.appendChild(ind); + } break; case 'tool_use': div.className = 'tool-box archived';