mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-04-02 18:12:05 +08:00
fix(opencode): add missing omo-slim category checks across add/form/mutation paths
Several code paths only checked for "omo" category but missed "omo-slim", causing OMO Slim providers to be treated as regular OpenCode providers (triggering invalid write_live_snapshot, requiring manual provider key, and showing wrong form fields).
This commit is contained in:
@@ -133,10 +133,11 @@ impl ProviderService {
|
||||
|
||||
// Additive mode apps (OpenCode, OpenClaw) - always write to live config
|
||||
if app_type.is_additive_mode() {
|
||||
// OMO providers use exclusive mode and write to dedicated config file.
|
||||
if matches!(app_type, AppType::OpenCode) && provider.category.as_deref() == Some("omo")
|
||||
// OMO / OMO Slim providers use exclusive mode and write to dedicated config file.
|
||||
if matches!(app_type, AppType::OpenCode)
|
||||
&& matches!(provider.category.as_deref(), Some("omo") | Some("omo-slim"))
|
||||
{
|
||||
// Do not auto-enable newly added OMO providers.
|
||||
// Do not auto-enable newly added OMO / OMO Slim providers.
|
||||
// Users must explicitly switch/apply an OMO provider to activate it.
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user