fix: 适配 agent 最新配置并收口清理边界#29
Open
SaulgoodMan-C wants to merge 1 commit into
Open
Conversation
问题描述:Codex 旧 token 路径仍可能残留,多个 agent 的清理动作语义与边界不一致,确认弹窗在切换 app 后存在串操作风险,测试输出还混有多类噪音。 修复思路:统一按最新 env_key 配置方式处理 Codex;将清除配置、移除配置、删除的前后端语义收口;确认动作绑定发起时 appId;Claude、Gemini、Codex 的 live config 清理按值匹配保守删除;测试环境精确清理 baseline-browser-mapping、localStorage getter 和 broken config 输出噪音。 复现路径:编辑或清理 Codex、Claude、Gemini、OpenClaw 等供应商配置,切换 app 后确认动作,并运行相关 Vitest / Rust 测试。 更新代码架构:补充 provider clear_live_config 入口、DAO current provider 条件清理、Codex legacy token 迁移与清理、前端 Provider 动作语义与确认流、配套 i18n、MSW、Vitest 与 Rust 测试,以及交接文档和人工测试文档。
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.
问题
这轮主要修复多 agent 配置适配与供应商清理链路中的几个连带问题:
experimental_bearer_token路径,导致密钥残留、编辑态回流,且与最新env_key配置方式不一致。baseline-browser-mapping、localStoragegetter warning 和故意构造的broken config日志,影响回归判断。这些问题叠加后,会让用户在编辑、切换和清理供应商配置时遇到不一致行为,也会让后续回归验证成本变高。
根因
根因集中在两类:
修复
本 PR 做了以下收口:
env_key方式处理配置与密钥写入,迁移并清理 legacyexperimental_bearer_token。appId,防止切 app 串操作。baseline-browser-mapping固定 warning,移除localStoragegetter 触发 warning 的探测方式,并局部静音故意构造的broken config日志输出。影响
用户侧可见变化:
工程侧收益:
验证
已执行:
pnpm typecheckpnpm vitest run tests/integration/App.test.tsx tests/components/ProviderActions.test.tsx tests/utils/providerConfigUtils.codex.test.tspnpm vitest run tests/components/ProviderActions.test.tsxpnpm vitest run tests/integration/App.test.tsx tests/utils/providerConfigUtils.codex.test.tscargo test --manifest-path src-tauri/Cargo.toml codex_env --libcargo test --manifest-path src-tauri/Cargo.toml clear_ --testscargo test --manifest-path src-tauri/Cargo.toml provider_service_clear_ --test provider_servicecargo fmt --manifest-path src-tauri/Cargo.toml --checkgit diff --check文档
docs/2026-06-24-agent最新配置适配与清理边界修复-交接文档.mdqa/2026-06-24-agent最新配置适配与清理边界修复-人工测试文档.md