mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-26 23:56:02 +08:00
7ad5a76c7a
Implement runtime merge of common config snippet with provider's custom config when writing to live configuration files. This enables shared configuration templates across providers while preserving provider-specific overrides. Key changes: - Add write_live_snapshot_with_merge() function that performs runtime merge - Support JSON merge for Claude, TOML merge for Codex, and env merge for Gemini - Update sync_current_to_live() to use the new merge function - Update provider switch and update operations to use merge function - Merge rule: customConfig (provider-specific) overrides commonConfig (shared) The merge is only performed when common_config_enabled is true for the provider and the corresponding app type.