[codex] Sync active changes before profile switch - #1
Merged
Conversation
kuliantnt
marked this pull request as ready for review
June 6, 2026 13:15
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
Add sync-back before switching profiles and include bundled Codex preset examples.
Before
cc-switch use/nextorcc-switch cx use/nextoverwrites the active config files, the command now checks whether the active files have changed from the recorded current profile. If changes are detected, interactive terminals ask whether to sync them back, while non-interactive environments sync automatically.This prevents manual edits to Claude or Codex config files from being lost during profile switches. The PR also includes bundled
openaiandxxxcomCodex preset examples with README documentation updates.Changes
0.1.4.~/.cc-switch-simple/current.next,list, andcurrentbehavior to respect recorded current profile when appropriate.config.tomlandauth.json.auth.jsonbefore syncing.codex/openaiandcodex/xxxcom.Verification
cargo fmt --checkcargo clippy --all-targets --all-features -- -D warningscargo testRelease note
新增切换前自动回填当前配置,避免手动修改 Claude / Codex 配置后切换 profile 导致修改丢失;同时内置 Codex 示例预设。