Repository navigation
Conversation
…58) Add serde aliases for legacy ChatGPT auth enum variants (chat_gpt, chatgpt, chat_g_pt) on AuthMode and AuthData. Prevents accounts.json parsing failures on upgrades from older versions.
Lampese
pushed a commit
that referenced
this pull request
Oct 15, 2026
Adding an account preserves the current active account, live auth.json and usage timestamps. Activation remains an explicit account-switch operation, including when adding the first account. Add isolated command-level OAuth regression coverage. Validation: the four OAuth scenarios pass; restoring the old behavior reproduces three failures. The combined #196/#153 integration on current main passes 61 Rust tests (1 ignored). Co-authored-by: legibet <legibetpeng@gmail.com> Co-authored-by: Jeakcey <237689947+Jeakcey@users.noreply.github.com>
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
Fixes #58 by adding serde aliases for legacy ChatGPT enum variants in
AuthModeandAuthData.Problem
After upgrading to v0.2.2+,
accounts.jsonfiles containing legacy ChatGPT enum spellings (chat_gpt,chatgpt,chat_g_pt) failed to deserialize when loaded viaserde_json::from_str::<AccountsStore>(), throwing an error and rendering saved accounts inaccessible:Solution
#[serde(alias = "chat_gpt", alias = "chatgpt", alias = "chat_g_pt")]toAuthMode::ChatGPT.AuthData::ChatGPT.chat_g_p_t).