Conversation
…profile switching - Implement RFC 8628 device flow for Moonshot AI Kimi Code (client id 17e5f671-d194-4dfb-9706-5516cb48c098) - Add KimiOAuthManager and KimiOAuthService to manage accounts and sync to native ~/.kimi-code - Extend AuthService and cc-switch auth commands with --provider kimi_oauth - Add cc-switch config kimi profile management to snapshot and switch native Kimi Code profiles atomically Signed-off-by: Ferris <ferris@mail.build>
Owner
|
Please give me some time to review, thank you for your contribution |
…or authorization_pending Signed-off-by: Ferris <ferris@mail.build>
…tatus Signed-off-by: Ferris <ferris@mail.build>
…status Signed-off-by: Ferris <ferris@mail.build>
…uota inspection - Resolve and display account nicknames in Kimi profile lists and status views - Add '-q/--quota' to 'config kimi profile list' for parallel 5-hour quota and reset countdown inspection across all profiles - Support 'config kimi status <profile>' and 'config kimi status --all' for inspecting profile statuses without switching - Automatically refresh expired access tokens when querying saved profile quotas Signed-off-by: Ferris <ferris@mail.build>
bytemain
force-pushed
the
feat/kimi-oauth-config-switch
branch
from
September 17, 2026 15:57
aecabb4 to
ca3a5f3
Compare
- Prevent test runners from overwriting user's active native credentials - Guard default account sync during test runs - Provide safe isolated fallback path for get_kimi_config_dir during testing Signed-off-by: Ferris <ferris@mail.build>
…tokens in quota list Signed-off-by: Ferris <ferris@mail.build>
Signed-off-by: Ferris <ferris@mail.build>
- Add AppType::Kimi alongside Claude, Codex, Gemini, OpenCode, Hermes, OpenClaw, Pi - Implement TOML provider, model, and MCP editing for ~/.kimi-code/config.toml - Support additive provider management and model aliases for Kimi Code - Wire AppType::Kimi across TUI, CLI commands, settings, and services - Add comprehensive unit and integration tests for Kimi provider configuration Signed-off-by: Ferris <ferris@mail.build>
set_current_provider and set_default_model acquired kimi_write_lock and then invoked write_prepared_config, which re-acquired the same non-reentrant mutex. Replace with direct write_file_atomic while holding the lock, eliminating the self-deadlock. Signed-off-by: Ferris <ferris@mail.build>
Signed-off-by: Ferris <ferris@mail.build>
- Remove redundant RFC 8628 OAuth device flow implementation and service layer - Strip custom 'config kimi profile' directory snapshot mechanism and quota crawler - Simplify kimi_config.rs to thin adapter managing config.toml and mcp.json - Align with Pi/Hermes additive application model and preserve clean concurrency locks Signed-off-by: Ferris <ferris@mail.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.
Summary
Streamlines Kimi Code (
kimi-code) integration incc-switchby adopting the additive application model (aligned with Pi and Hermes) and eliminating redundant complexity:Thin Adapter (
kimi_config.rs):~/.kimi-code/config.toml([providers],[models],default_model) and~/.kimi-code/mcp.json.write_file_atomic) with safe permission handling and zero cross-test pollution.Deadlock Elimination:
set_current_providerandset_default_modelacquiredkimi_write_lock()and re-enteredwrite_prepared_config().Occam's Razor Simplification:
kimi_oauth_auth.rs,services/kimi_oauth.rs): Kimi CLI manages its own official authentication.config kimi profiledirectory snapshot mechanism and quota crawler (config_kimi.rs): standardizes on cc-switch's universal provider switcher.Testing
kimi_config::tests::test_kimi_provider_crud_and_mcp: full provider CRUD and MCP sync round-trip.kimi_config::tests::test_kimi_set_default_model: default model selection and configuration serialization.proxy::providers::claude::tests::kimi_anthropic_tool_history_injects_missing_thinking.services::local_env_check::tests::local_tool_specs_include_all_supported_clis.services::provider,cli::tests,services::auth, andmcp.Signed-off-by: Ferris ferris@mail.build