feat(opencode): implement isInConfig semantics for additive provider management

OpenCode uses additive provider management where providers can exist in
the database but not necessarily in the live opencode.json config. This
commit implements proper isInConfig state:

Backend:
- Add get_opencode_live_provider_ids command to query live config

Frontend:
- Add getOpenCodeLiveProviderIds API method
- ProviderList queries live provider IDs and computes isInConfig
- ProviderCard receives and passes isInConfig to ProviderActions
- ProviderActions already handles the add/remove button logic
This commit is contained in:
Jason
2026-01-15 19:37:35 +08:00
parent 2494eaaa32
commit e4df1a32a5
5 changed files with 44 additions and 1 deletions
+1
View File
@@ -877,6 +877,7 @@ pub fn run() {
commands::sync_universal_provider,
// OpenCode specific
commands::import_opencode_providers_from_live,
commands::get_opencode_live_provider_ids,
// Global upstream proxy
commands::get_global_proxy_url,
commands::set_global_proxy_url,