feat: Stream-Abbruch per Stop-Button
- Neuer Stop-Button (#stop) neben Send-Button, erscheint nur während Stream - AbortController in chat.js: abort() schließt SSE-Verbindung → Backend CancellationToken triggered - apiChat() akzeptiert optionales AbortSignal - AbortError-Handling: zeigt 'Abgebrochen' statt Fehlermeldung - Button-Toggle in sendMessage(), stopStreaming(), startStreamingPoll(), Page-Load-Recovery - CSS: .stop-btn mit --dangerous Farbe - Diverse kleine UI-Fixes (TODO.md, theme.css box-spacing, settings-section Layout)
This commit is contained in:
1 parent
190a0d0a8b
commit
4bf500ad47
8 files changed
+73
-22
No files matched your search
+3
-2
@@ -1,10 +1,11 @@
|
||||
// ── API Calls ──
|
||||
|
||||
async function apiChat(messages, sessionId) {
|
||||
async function apiChat(messages, sessionId, signal) {
|
||||
return fetch('/api/chat', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ messages, sessionId })
|
||||
body: JSON.stringify({ messages, sessionId }),
|
||||
signal
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user