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

+8
View File
@@ -5,6 +5,8 @@ let _recoveryChainId = null;
function startStreamingPoll(sessionId, sendBtn, chainId) {
_recoveryChainId = chainId;
// History-Polling stoppen – Streaming-Poll übernimmt
stopHistoryPolling();
if (_streamingPollInterval) clearInterval(_streamingPollInterval);
_streamingPollInterval = setInterval(async () => {
try {
@@ -29,6 +31,9 @@ function startStreamingPoll(sessionId, sendBtn, chainId) {
}
setMeta('Bereit');
_recoveryChainId = null;
// History-Polling wieder starten
startHistoryPolling();
}
} catch (e) {
console.error('Streaming-Poll fehlgeschlagen:', e);
@@ -274,6 +279,9 @@ registerPage('chat', {
},
destroy() {
// Stream nicht abbrechen (Backend soll weiterlaufen),
// aber Frontend-Processing stoppen
_chatAbandoned = true;
if (this._closeMenu) {
document.removeEventListener('click', this._closeMenu);
this._closeMenu = null;