fix(config): validate auto-orchestrate router model refs#360
Open
wangyuxun6699 wants to merge 2 commits into
Open
fix(config): validate auto-orchestrate router model refs#360wangyuxun6699 wants to merge 2 commits into
wangyuxun6699 wants to merge 2 commits into
Conversation
# Conflicts: # ui/server/services/pilotdeckConfig.test.js
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.
修复 #248 中提到的 UI 配置保存路径遗漏校验的问题。
本次改动:
在 UI server 保存前校验中补充检查:router.autoOrchestrate.mainAgentModel
router.autoOrchestrate.subagentModel
修复 validateRouterModelRefs 中 tokenSaver 缺失会提前返回、导致后续 router refs 不被检查的问题。
provider 删除后保存配置时,孤儿 autoOrchestrate model ref 会被修复为当前 agent.model。
provider 重命名时,同步改写 autoOrchestrate.mainAgentModel 和 autoOrchestrate.subagentModel。
将 provider ref 重写逻辑抽到 pilotDeckConfigForm.ts,避免组件文件导出非组件 helper。
增加回归测试覆盖:UI/server 校验拒绝 stale mainAgentModel
UI/server 校验拒绝 stale subagentModel
保存前清理 provider 删除后的 auto-orchestrate refs
provider rename 会改写两个 auto-orchestrate refs
验证:
npm --prefix ui test -- server/services/pilotdeckConfig.test.js src/components/settings/view/tabs/PilotDeckConfigTab.cron.test.ts 通过
局部 ESLint 通过
新 helper 与测试的小范围 TypeScript 检查通过