Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
style(host-core): format plugin provider thinking levels
vastsac10c25db574f
diff --git a/crates/host-core/src/plugins/providers.rs b/crates/host-core/src/plugins/providers.rsindex 111e1e590..1350b333d 100644--- a/crates/host-core/src/plugins/providers.rs+++ b/crates/host-core/src/plugins/providers.rs@@ -96,7 +96,10 @@ fn declared_thinking_levels(model: &serde_json::Map<String, Value>) -> Vec<Strin/// value that matches nothing would silently fall back to the first entry while/// the row claimed otherwise.fn declared_default_thinking_level(model: &serde_json::Map<String, Value>) -> Option<String> {- let named = model.get("defaultThinkingLevel").and_then(Value::as_str)?.trim();+ let named = model+ .get("defaultThinkingLevel")+ .and_then(Value::as_str)?+ .trim();if named.is_empty() {return None;}diff --git a/crates/host-core/src/plugins/providers/tests.rs b/crates/host-core/src/plugins/providers/tests.rsindex 0e5bbc580..339058d71 100644--- a/crates/host-core/src/plugins/providers/tests.rs+++ b/crates/host-core/src/plugins/providers/tests.rs@@ -607,7 +607,10 @@ fn manifest_with_thinking_levels() -> PluginManifest {fn declared_thinking_levels_survive_into_the_row() {let (_dir, db, secrets) = test_context();let declared = declared_providers(&manifest_with_thinking_levels());- assert_eq!(declared[0].models[0].thinking_levels, ["off", "low", "high"]);+ assert_eq!(+ declared[0].models[0].thinking_levels,+ ["off", "low", "high"]+ );assert_eq!(declared[0].models[0].default_thinking_level.as_deref(),Some("high")@@ -645,7 +648,10 @@ fn a_default_outside_the_declared_list_is_dropped() {value["contributes"]["providers"][0]["models"][0]["defaultThinkingLevel"] = json!("max");let manifest: PluginManifest = serde_json::from_value(value).unwrap();let declared = declared_providers(&manifest);- assert_eq!(declared[0].models[0].thinking_levels, ["off", "low", "high"]);+ assert_eq!(+ declared[0].models[0].thinking_levels,+ ["off", "low", "high"]+ );assert!(declared[0].models[0].default_thinking_level.is_none());}