fix: replace settings when switching providers, update docs and tests#7
Conversation
Settings are now fully replaced when switching providers instead of being merged. This fixes the issue where stale settings from previous providers (like GLM model configuration from z.ai) would persist after switching. Fixes #6 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add enablePositionalOptions() and passThroughOptions() to fix --json flag not being passed to list and status subcommands when a default argument is defined on the program. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix config paths from ~/.config/claude-code/ to ~/.claude/ - Document import-bash command, --local and --json flags - Simplify and consolidate docs to minimize overlap - Make each page self-contained and easy to follow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add 6 real-world scenario tests for config detection - Rewrite integration tests for comprehensive CLI coverage - Test project config override behavior - Test --json flag on all commands 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
|
@claude could you correct the pr? did we manage to close the issue? did you mention the commits the issues the related? why did claude code review not pass? |
|
Claude finished @jigonr's task in 1m 57s —— View job PR Review CompleteI've analyzed the PR and here are the answers to your questions: ✅ Did we manage to close the issue?Yes! The PR properly references issue #6 and will auto-close it when merged:
✅ Did commits mention the related issue?Yes! The key commit that fixes the issue includes a proper reference: The other commits (docs, tests, CLI fix) don't reference the issue, which is appropriate since they're supporting changes rather than the actual fix. ❌ Why did Claude Code Review not pass?The workflow failed due to missing API credentials. The error is: How to fix it:
This is not a problem with your PR code - it's a workflow configuration issue. Code Quality ReviewThe PR looks solid! Here are my findings: ✅ Strengths:
📝 Minor Observations:The core fix is simple and correct: // Replace env settings completely (providers are mutually exclusive)
settings.env = { ...env };However, I notice the spread operator SummaryThis PR is ready to merge. The issue will be automatically closed when merged. The only failing CI check is the Claude Code Review workflow, which requires you to add API credentials to your repository secrets - this is not blocking for the PR itself. |
Summary
--jsonflag works on subcommands~/.config/claude-code/to~/.claude/, document all commands and flagsTest plan
bun run test- all 113 unit tests passnode --test tests/integration/cli.test.js- all 15 integration tests passbun run lint- no Biome errorsbun run typecheck- no TypeScript errorsclaude-switch z.aithenclaude-switch claude-pro-max- GLM settings removedFixes #6
🤖 Generated with Claude Code