From eb650aa586500465f64ff70afca3f19889cf8f44 Mon Sep 17 00:00:00 2001 From: SuYao Date: Mon, 16 Jun 2025 12:51:09 +0800 Subject: [PATCH] fix: enable stream output in assistant settings for chat completion (#7240) --- src/renderer/src/windows/mini/home/HomeWindow.tsx | 2 +- .../src/windows/selection/action/components/ActionUtils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/windows/mini/home/HomeWindow.tsx b/src/renderer/src/windows/mini/home/HomeWindow.tsx index 9982647464..1b1b7b6db1 100644 --- a/src/renderer/src/windows/mini/home/HomeWindow.tsx +++ b/src/renderer/src/windows/mini/home/HomeWindow.tsx @@ -187,7 +187,7 @@ const HomeWindow: FC = () => { fetchChatCompletion({ messages: [userMessage], - assistant: { ...assistant, model: quickAssistantModel || getDefaultModel() }, + assistant: { ...assistant, model: quickAssistantModel || getDefaultModel(), settings: { streamOutput: true } }, onChunkReceived: (chunk: Chunk) => { if (chunk.type === ChunkType.TEXT_DELTA) { blockContent += chunk.text diff --git a/src/renderer/src/windows/selection/action/components/ActionUtils.ts b/src/renderer/src/windows/selection/action/components/ActionUtils.ts index 8ee77f6739..d6b77cec47 100644 --- a/src/renderer/src/windows/selection/action/components/ActionUtils.ts +++ b/src/renderer/src/windows/selection/action/components/ActionUtils.ts @@ -51,7 +51,7 @@ export const processMessages = async ( await fetchChatCompletion({ messages: [userMessage], - assistant, + assistant: { ...assistant, settings: { streamOutput: true } }, onChunkReceived: (chunk: Chunk) => { switch (chunk.type) { case ChunkType.THINKING_DELTA: