fix: Windows-Kompatibilität - Streaming, Execute-Deadlock, Plan-Modus bei Choice
- HttpResponseMessage mit using disposen (3 Stellen in AnthropicService) verhindert Socket-Exhaustion unter Windows (2 Connections/Host Limit) - SSE DisableBuffering() in ChatEndpoint für sofortigen Flush unter Windows - Execute: stdout/stderr vor WaitForExitAsync lesen statt danach verhindert Pipe-Deadlock bei vollem Buffer (Windows: 4KB) - Plan-Modus: Frontend sendet planMode bei Choice-Response mit Backend-Fallback auf vorherigen Chain entfernt - User-Entscheidung gilt
This commit is contained in:
1 parent
b40a872c29
commit
3e590a6d03
5 files changed
+19
-21
No files matched your search
+4
-2
@@ -52,11 +52,13 @@ async function apiChat(content, sessionId, signal, planMode) {
|
||||
});
|
||||
}
|
||||
|
||||
async function apiChatChoice(sessionId, choiceToolCallId, choiceResult, signal) {
|
||||
async function apiChatChoice(sessionId, choiceToolCallId, choiceResult, signal, planMode) {
|
||||
var payload = { sessionId, choiceToolCallId, choiceResult };
|
||||
if (planMode) payload.planMode = true;
|
||||
return fetch('/api/chat', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ sessionId, choiceToolCallId, choiceResult }),
|
||||
body: JSON.stringify(payload),
|
||||
signal
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -343,5 +343,5 @@ async function handleChoiceClick(toolCallId, choice, bubbleDiv) {
|
||||
});
|
||||
bubbleDiv.classList.add('choice-answered');
|
||||
|
||||
await _runStream((signal) => apiChatChoice(getCurrentSessionId(), toolCallId, choice, signal));
|
||||
await _runStream((signal) => apiChatChoice(getCurrentSessionId(), toolCallId, choice, signal, _planModeActive));
|
||||
}
|
||||
Reference in new issue
Block a user