fix: Streaming-Navigation-Bugs (doppelte Messages, client_disconnected), Tool-Result ohne Truncation

- _chatAbandoned-Flag statt AbortController: Backend-Stream läuft bei Navigation weiter, Frontend ignoriert Events
- stopHistoryPolling() während Streaming-Poll aktiv, verhindert parallele Polls
- _pollLock in pollHistory() gegen Race-Conditions bei gleichzeitigen Poll-Aufrufen
- Tool-Result truncate(300) im Live-Chat entfernt, in History beibehalten
- Dashboard Badge-Styling verfeinert
This commit is contained in:
Meleki committed 2026-03-01 00:32:05 +01:00
1 parent 6f800e2d50
commit 7c0e5d180a
5 files changed
+30 -7

No files matched your search

+3 -3
View File
@@ -238,7 +238,7 @@ function renderToolBoxContent(div, name, inputJson, result, isError) {
const resultDiv = document.createElement('div');
resultDiv.className = 'tool-result' + (isError ? ' tool-error' : '');
resultDiv.textContent = result ? truncate(result, 300) : '';
resultDiv.textContent = result || '';
resultDiv.hidden = true;
div.appendChild(resultDiv);
foldTarget = resultDiv;
@@ -340,12 +340,12 @@ function appendToolResult(result, isError) {
const existing = lastBox.querySelector('.tool-result');
if (existing) {
existing.textContent = truncate(result, 300);
existing.textContent = result || '';
if (isError) existing.classList.add('tool-error');
} else {
const resultDiv = document.createElement('div');
resultDiv.className = 'tool-result' + (isError ? ' tool-error' : '');
resultDiv.textContent = truncate(result, 300);
resultDiv.textContent = result || '';
resultDiv.hidden = true;
lastBox.appendChild(resultDiv);
}