fix windows chatwise connect#405
Merged
jackwener merged 3 commits intojackwener:mainfrom Mar 25, 2026
Merged
Conversation
Closed
jackwener
approved these changes
Mar 25, 2026
Owner
jackwener
left a comment
There was a problem hiding this comment.
结论:方向对,而且我已经在当前分支补了一条关键 regression test;现在这版可以合。
深度 review 结论:
- ✅
src/browser/cdp.ts改成直连本地 HTTP 拉/json,避免被http_proxy/https_proxy干扰,这个方向是对的 - ✅
src/execution.ts对chatwise缺失OPENCLI_CDP_ENDPOINT做 fail-fast,也比之前误连到错误 target 更可诊断 - 🟡 这次新增了 Windows helper script
chatwise-opencli.ps1,属于用户侧操作辅助,不是核心运行逻辑;本身没问题,但更应该被当成辅助入口,而不是唯一依赖路径 - P1(已修):分支里对
chatwisefail-fast 的新行为没有 regression test,后面很容易被别的重构改掉
我直接推到分支上的 follow-up:
ce7ea31—test(chatwise): cover missing cdp endpoint guard
具体改动:
- 在
src/engine.test.ts里补了chatwise在缺少OPENCLI_CDP_ENDPOINT时会抛出清晰错误的测试 - 同时在测试前统一
vi.unstubAllEnvs(),避免环境变量串扰
本地验证已过:
npx vitest run src/engine.test.ts src/browser/cdp.test.tsnpm run typechecknpm testnpm run build
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.
chatwise-opencli.ps1 会清掉本地代理、彻底重启 ChatWise、带 --remote-debugging-port=9228 启动、等待调试端口可用后再调用 opencli
src/execution.ts 对 chatwise 加了更明确的 CDP 配置检查,避免没配端口时误连到错误目标
src/browser/cdp.ts 改成直连本地 HTTP 拉 /json,不再被 http_proxy/https_proxy 干扰