mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-26 23:56:02 +08:00
73fea48049
Address code audit findings #1, #2, #6, #7, #11: - Extract merge logic to merge_config_for_live() in config_merge.rs - Add is_common_config_enabled() helper function - Add MergeResult struct with config and optional warning - Update live.rs and proxy.rs to use the shared function - Add logging for JSON parse failures instead of silent fallback - Convert Chinese error messages to error codes (CODEX_CONFIG_*) - Support both flat and wrapped formats for Gemini common config This eliminates code duplication between live.rs and proxy.rs, making future maintenance easier and preventing behavioral drift.