feat: add CodeBuddy agent support#378
Conversation
- Add codebuddy code-type with cb abbreviation - Create codebuddy-config.ts for MCP/settings file I/O to ~/.codebuddy/ - Create codebuddy-config-manager.ts for API profile management - Create codebuddy.ts entry aggregating full init/update/uninstall/configure - Wire codebuddy into init/update/uninstall/check-updates/config-switch/menu - Add CodeBuddy path constants (CODEBUDDY_DIR, MCP, settings, agents) - Update i18n with codebuddy menu entries (en/zh-CN) - Update README and package.json keywords - Add unit tests for codebuddy config and config manager Closes UfoMiao#331
Code Review by Qodo
1.
|
PR Summary by Qodofeat: add CodeBuddy agent support to zcf CLI
AI Description
Diagram
High-Level Assessment
Files changed (27)
|
- Delete plan.md (Chinese content, should not be committed) - Fix showMainMenu routing for codebuddy tool type - Map skipPrompt to _skipPrompt in runCodebuddyFullInit to prevent inquirer prompts in non-interactive mode - Make applyCurrentProfile a no-op when no profile configured, preventing runCodebuddyUpdate from wiping user env settings - Add codebuddy branch to handleMultiConfigurations with new handleCodebuddyConfigs function
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
- Delete plan.md (Chinese content, should not be committed) - Fix showMainMenu routing for codebuddy tool type - Map skipPrompt to _skipPrompt in runCodebuddyFullInit to prevent inquirer prompts in non-interactive mode - Make applyCurrentProfile a no-op when no profile configured, preventing runCodebuddyUpdate from wiping user env settings - Add codebuddy branch to handleMultiConfigurations with new handleCodebuddyConfigs function
- Add CodeBuddy unit tests and config-switch tests - Update README, CLAUDE.md and multilingual docs - Sync i18n strings for installation/updater/uninstall/multi-config - Clean up dead code and fix menu routing/config writes
|
@studyzy 感谢佬提 pr 🎉 |
- Fix env var names: ANTHROPIC_* → CODEBUDDY_* (CODEBUDDY_API_KEY, CODEBUDDY_AUTH_TOKEN, CODEBUDDY_BASE_URL, CODEBUDDY_MODEL, CODEBUDDY_SMALL_FAST_MODEL, CODEBUDDY_BIG_SLOW_MODEL) per official docs (https://www.codebuddy.cn/docs/cli/env-vars) - Add CodeBuddy-specific clearCodebuddyModelEnv/clearCodebuddyAuthEnv; uninstaller no longer imports ClaudeCode's clearModelEnv - Implement independent showCodebuddyMenu() instead of routing to showClaudeCodeMenu(); update showMainMenu() dispatch - Add codebuddy branch in uninstall.ts calling runCodebuddyUninstall() - Remove ClaudeCode copy-paste dead code from codebuddy-config.ts: addCompletedOnboarding, ensureApiKeyApproved, removeApiKeyFromRejected, manageApiKeyApproval (never called) - Drop unused onboardingFlagFailed i18n key (en/zh-CN) - Fix hardcoded 'MCP config backed up' string to use i18n.t - Add --code-type codebuddy to config-switch command and help examples - Sync README_zh-CN.md and README_ja-JP.md intro with CodeBuddy - Delete tracked .serena/ config files
Description
Add CodeBuddy AI agent support to zcf CLI, adapting the same pattern as the existing ClaudeCode support.
Closes #331
Motivation
CodeBuddy is a popular AI coding agent that users want to configure and use with zcf. This PR adds full CodeBuddy adapter support including config management, MCP registration, and CLI commands.
Changes
Testing
pnpm typecheckpassespnpm lintpassespnpm test:runpassesChecklist