fix(opencode): address issues found during OpenCode integration review

- Fix MCP server not removed from opencode.json when unchecked in edit modal
- Fix Windows atomic write failure when opencode.json already exists
- Fix i18n keys mismatch in OpenCodeFormFields (use opencode.* namespace)
- Fix unit test missing apps.opencode field assertion
This commit is contained in:
Jason
2026-01-15 19:07:49 +08:00
parent 36d6d48002
commit de3a22535d
12 changed files with 53 additions and 62 deletions
+5 -5
View File
@@ -132,10 +132,7 @@ pub(crate) fn write_live_snapshot(app_type: &AppType, provider: &Provider) -> Re
match opencode_config_result {
Ok(config) => {
opencode_config::set_typed_provider(&provider.id, &config)?;
log::info!(
"OpenCode provider '{}' written to live config",
provider.id
);
log::info!("OpenCode provider '{}' written to live config", provider.id);
}
Err(e) => {
log::warn!(
@@ -505,7 +502,10 @@ pub fn import_opencode_providers_from_live(state: &AppState) -> Result<usize, Ap
for (id, config) in providers {
// Skip if already exists in database
if existing.contains_key(&id) {
log::debug!("OpenCode provider '{}' already exists in database, skipping", id);
log::debug!(
"OpenCode provider '{}' already exists in database, skipping",
id
);
continue;
}