well this at least allows for streaming responses when no tool calls are made

This commit is contained in:
perf3ct
2025-04-13 17:56:57 +00:00
parent 263c869091
commit d1edf59f97
4 changed files with 85 additions and 26 deletions

View File

@@ -87,9 +87,13 @@ export async function setupStreamingResponse(
// Handle content updates
if (message.content) {
receivedAnyContent = true;
console.log(`[${responseId}] Received content chunk of length ${message.content.length}, preview: "${message.content.substring(0, 50)}${message.content.length > 50 ? '...' : ''}"`);
// Add to our accumulated response
assistantResponse += message.content;
// Update the UI immediately
// Update the UI immediately with each chunk
onContentUpdate(assistantResponse);
// Reset timeout since we got content