mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
78198e262b
* fix(opencode): use json5 parser for trailing comma tolerance OpenCode CLI writes opencode.json with trailing commas (valid JSONC), but CC Switch parsed it with serde_json (strict JSON), causing errors like 'trailing comma at line 35 column 3'. Switch to json5::from_str which accepts both JSON and JSONC. The json5 crate is already a project dependency. Change error type from AppError::json() to AppError::Config() since json5::Error differs from serde_json::Error. * style(opencode): apply rustfmt to satisfy cargo fmt --check The previous commit's .map_err(...) chain exceeded rustfmt's default 100-char max_width, breaking CI's `cargo fmt --check`. Let rustfmt wrap the closure body as a multi-line block. No behavior change. --------- Co-authored-by: 18067889926 <ming.flute@outlook.com> Co-authored-by: Jason <farion1231@gmail.com>