Issues, discussions and pull requests are all welcome — in English or Chinese. Several of the extension's best features started as community pull requests, and there is plenty left to build.
- The GUI (webview, sidebar, diffs, sessions, engine process management in VS Code) — this repository.
- The agent engine (
codewhaleCLI: prompts, models, providers, tools, sandboxing) — Hmbown/CodeWhale. The extension is a thin frontend and cannot fix engine behavior. - Questions and ideas — Discussions.
git clone https://github.com/HengQuWorld/CodeWhale-VSCode.git
cd CodeWhale-VSCode
npm install
npm run watch # development build, rebuild on change
npm test # vitest unit tests
npm run lint # eslint
npm run package # production build
npx @vscode/vsce package --no-dependencies # build the VSIXInstall the VSIX with code --install-extension ./brotherwhale-vscode-<version>.vsix --force,
then open the Run and Debug view and launch the Extension Development Host.
AGENTS.md documents the architecture in depth: src/extension.ts (entry) →
src/chat-provider.ts (orchestration) → src/api/ (engine process + runtime
API client) → src/commands/ → src/webview/ → src/utils/.
- The engine owns agent behavior. This extension is a thin GUI over the engine's local runtime API — it never bundles, forks or reimplements the agent. If a fix means copying agent logic into the extension, it belongs upstream instead.
- No runtime npm dependencies. The extension's own TypeScript (and
marked) is inlined by webpack; the VSIX stays small and dependency-free. - Degrade gracefully across engine versions. When a runtime endpoint is missing, the UI disables the feature with an explanation instead of failing at runtime.
- Bilingual UI. Every user-facing string lives in both
package.nls.jsonandpackage.nls.zh-cn.json. - Tests and changelog. Behavior changes come with vitest tests; user-visible
changes get a
CHANGELOG.mdentry written from the user's perspective — what they experienced before, and what they get now.
Keep PRs focused — one concern each. The PR template carries the checklist: lint, tests, changelog, localization, and the thin-adapter rule. If you want a starting point, comment on an issue and a maintainer will help scope it; the "good first issue" label marks candidates when present.
- Bump
versioninpackage.jsonand add theCHANGELOG.mdsection. - Commit, then tag and push the tag:
git tag vX.Y.Z && git push origin vX.Y.Z. - CI builds the VSIX, attaches it with SHA-256 checksums to a GitHub Release
using the changelog section as notes, and publishes to the Marketplace when
the
VSCE_PATsecret is configured.
欢迎通过 issue、discussion 和 pull request 参与贡献,中英文均可。这个扩展最好用的几个功能最初都来自社区 PR,还有很多值得做的事。
- GUI 本身(webview、侧边栏、diff、会话、引擎进程管理)→ 本仓库。
- 代理引擎(
codewhaleCLI:提示词、模型、供应商、工具、沙箱)→ Hmbown/CodeWhale。扩展只是前端,修不了引擎行为。 - 提问与想法 → Discussions。
npm install
npm run watch # 开发构建,改动自动重编译
npm test # vitest 单元测试
npm run lint # eslint
npm run package # 生产构建
npx @vscode/vsce package --no-dependencies # 打 VSIX用 code --install-extension ./brotherwhale-vscode-<版本>.vsix --force 安装后,
在「运行和调试」里启动 Extension Development Host 调试。架构细节见 AGENTS.md。
- 代理行为归引擎。 扩展只是引擎本地运行时 API 的轻量前端,不打包、不分叉、不重实现代理。 如果一个修复需要把代理逻辑复制进扩展,它应该去上游做。
- 零运行时 npm 依赖。 webpack 内联扩展自身代码,VSIX 保持小体积、无依赖。
- 跨引擎版本优雅降级。 运行时端点缺失时,UI 禁用该功能并说明原因,而不是运行时报错。
- 界面双语。 每条用户可见字符串同时写入
package.nls.json和package.nls.zh-cn.json。 - 测试与变更日志。 行为变更配 vitest 测试;用户可见变更在
CHANGELOG.md用用户视角记录—— 之前遇到什么问题,现在得到什么。
每个 PR 聚焦一件事。PR 模板带有检查清单:lint、测试、变更日志、本地化、薄适配层原则。 想要切入点,可以在 issue 下留言,维护者会帮忙圈定范围。
- 更新
package.json的version,在CHANGELOG.md加对应小节。 - 提交后打 tag 并推送:
git tag vX.Y.Z && git push origin vX.Y.Z。 - CI 自动构建 VSIX,附 SHA-256 校验和,以变更日志为说明发布 GitHub Release;
配置了
VSCE_PATsecret 时同步发布到插件市场。