fix(cowork): 加固外部 Agent CLI 集成与会话标题生成#45
Merged
freestylefly merged 14 commits intoJun 8, 2026
Conversation
…ng and normalization functions
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.
Summary
本 PR 加固 Cowork 外部 Agent CLI 集成,修复模型路由、provider 兼容、CLI 探测和会话标题生成中的不稳定问题,并补充 smoke test、单元测试和 changelog 记录。
本分支相对
upstream/main包含 9 个提交,重点覆盖 external Agent CLI runtime、WeSight model/proxy routing、OpenAI-compatible proxy、MiniMax provider/model normalization、Windows CLI detection、session title generation、Windows release packaging script 收敛,以及 CodeQL inline review 修复。Related Issue
Fixes #(issue number)
Changes Made
外部 Agent CLI runtime 与环境配置
WeSight model/proxy 路由与 provider 兼容
Cowork 会话标题生成
Windows packaging 与发布记录
CHANGELOG.md,将已发布的2026-06-05内容归档到独立版本段,并为当前分支新增Unreleased - 2026-06-07条目。测试与验证资产
scripts/wesight-agent-cli-smoke.cjs和对应验证文档,用于 programmatic smoke test 外部 CLI、模型代理和配置同步路径。Review 反馈修复
matchesApiHostname()fallback 分支从动态RegExp构造改为字符串边界扫描,避免 incomplete string escaping or encoding 风险。当前分支解决的问题
外部 Agent CLI 配置链路不稳定
Claude Code 与 WeSight 模型配置不一致
OpenAI-compatible provider 与 MiniMax 兼容问题
Windows CLI detection 误选 WSL 路径
Cowork 会话标题质量不稳定
测试覆盖与发布记录边界不清晰
CHANGELOG.md原先把已发布的2026-06-05内容和当前分支内容混在Unreleased下,release note 边界不清晰。Security review 反馈
Type of Change
Testing
新增或更新的测试覆盖包括:
本轮已针对 CodeQL 修复执行单文件 lint:
npx eslint --ext ts,tsx --report-unused-disable-directives --max-warnings 0 src/main/libs/coworkUtil.ts未重新执行完整门禁:
npm run buildnpm run lintnpm testScreenshots (if applicable)
不适用。本 PR 主要涉及 Cowork runtime、配置同步、proxy、测试、release 脚本和 changelog。
Checklist
Electron-Specific Changes
Additional Notes
当前分支相对
upstream/main为 9 commits ahead、0 commits behind。CHANGELOG.md已按docs/release-process.md拆分:当前分支内容记录在Unreleased - 2026-06-07。正式发布前仍需按 release gate 确认 Windows/macOS 签名、公证、checksum、SmartScreen/Gatekeeper 信任链,并重新记录
npm run build、npm run lint和npm test的完整结果。