From 1afbb30bfc7fe400bf6a89640d5b12eea680ce2e Mon Sep 17 00:00:00 2001 From: SuYao Date: Thu, 3 Jul 2025 15:26:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(migrate):=20enable=20stream=20output=20for?= =?UTF-8?q?=20existing=20assistants=20in=20migrati=E2=80=A6=20(#7772)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(migrate): enable stream output for existing assistants in migration process - Updated the migration logic to set the default streamOutput setting to true for assistants that do not have this property defined, enhancing the user experience by ensuring consistent behavior across all assistants. --- src/renderer/src/store/migrate.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/renderer/src/store/migrate.ts b/src/renderer/src/store/migrate.ts index 4e41b750eb..ef5b526d2b 100644 --- a/src/renderer/src/store/migrate.ts +++ b/src/renderer/src/store/migrate.ts @@ -1685,6 +1685,14 @@ const migrateConfig = { apiHost: 'https://api.ppinfra.com/v3/openai/' }) } + state.assistants.assistants.forEach((assistant) => { + if (assistant.settings && assistant.settings.streamOutput === undefined) { + assistant.settings = { + ...assistant.settings, + streamOutput: true + } + } + }) return state } catch (error) { return state