fix(migrate): enable stream output for existing assistants in migrati… (#7772)

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.
This commit is contained in:
SuYao 2025-07-03 15:26:09 +08:00 committed by GitHub
parent 2f016efc50
commit 1afbb30bfc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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