fix: 为服务刷新调用显式传递 cancelStreaming=false - #1137
Open
MIOYULIN wants to merge 1 commit into
Open
Conversation
问题背景: EnhancedAIService 的 refreshServiceForFunction() 和 refreshAllServices() 默认参数 cancelStreaming=true,调用时会取消当前正在进行的流式传输响应。 但项目中有大量调用点(设置页面切换模型、更改API配置等场景)在配置变更时 调用这些方法刷新服务,本意是让新配置对后续请求生效,却意外中断了用户当前 正在进行的对话流式输出,影响用户体验。 修复内容: 1. 为所有 UI 设置页面和服务配置变更处的 refreshServiceForFunction() / refreshAllServices() 调用显式传入 cancelStreaming=false,确保配置刷新 不会打断当前流式响应 2. 修复 MultiServiceManager.releaseLease() 中 closeRetiredServiceLocked() 缺少 cancelStreaming 参数的问题,租约释放时不应默认取消流式传输 涉及文件(12个): - EnhancedAIService.kt - MultiServiceManager.kt - StandardSoftwareSettingsModifyTools.kt - WebChatHttpBridge.kt - ApiConfigDelegate.kt - AgentChatInputSection.kt - ClassicChatSettingsBar.kt - FunctionalConfigScreen.kt - ModelConfigScreen.kt - AdvancedSettingsSection.kt - ModelApiSettingsSection.kt - AutoGlmOneClickToolScreen.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题背景:
EnhancedAIService 的 refreshServiceForFunction() 和 refreshAllServices() 默认参数 cancelStreaming=true,调用时会取消当前正在进行的流式传输响应。
但项目中有大量调用点(设置页面切换模型、更改API配置等场景)在配置变更时
调用这些方法刷新服务,本意是让新配置对后续请求生效,却意外中断了用户当前
正在进行的对话流式输出,影响用户体验。
修复内容:
为所有 UI 设置页面和服务配置变更处的 refreshServiceForFunction() / refreshAllServices() 调用显式传入 cancelStreaming=false,确保配置刷新 不会打断当前流式响应
修复 MultiServiceManager.releaseLease() 中 closeRetiredServiceLocked() 缺少 cancelStreaming 参数的问题,租约释放时不应默认取消流式传输
涉及文件(12个):