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:
Jason
2026-02-24 15:31:02 +08:00
parent 8ea9638b9d
commit bb3130cbe0
3 changed files with 21 additions and 15 deletions

View File

@@ -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);
}