History Polling: Message-ID-basiert, neuer /api/history/poll Endpoint
This commit is contained in:
1 parent
19f926da05
commit
fb2c3a0720
5 files changed
+90
-25
No files matched your search
@@ -1,6 +1,7 @@
|
||||
// ── Chat State ──
|
||||
|
||||
const messages = [];
|
||||
let isStreaming = false;
|
||||
|
||||
function clearChat() {
|
||||
messages.length = 0;
|
||||
@@ -24,6 +25,7 @@ async function sendMessage() {
|
||||
input.value = '';
|
||||
input.style.height = 'auto';
|
||||
btn.disabled = true;
|
||||
isStreaming = true;
|
||||
setMetaHtml('<span style="color:#7c83ff">⏳ Streaming...</span>');
|
||||
|
||||
let fullText = '';
|
||||
@@ -103,6 +105,7 @@ async function sendMessage() {
|
||||
addErrorBubble('Netzwerk-Fehler: ' + e.message);
|
||||
} finally {
|
||||
btn.disabled = false;
|
||||
isStreaming = false;
|
||||
endStreamBubble();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user