Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

refactor(quality): tighten low-risk code paths

vastsad6c17ecb09d0
diff --git a/crates/host-core/src/config_sync/transport.rs b/crates/host-core/src/config_sync/transport.rs
index 02af4b231..2fbde7048 100644
--- a/crates/host-core/src/config_sync/transport.rs
+++ b/crates/host-core/src/config_sync/transport.rs
@@ -368,7 +368,7 @@ impl WebDavTransport {
match response.status() {
StatusCode::PRECONDITION_FAILED => Ok(false),
status if status.is_success() => Ok(true),
- status => return Err(status_error("create", status)),
+ status => Err(status_error("create", status)),
}
}
@@ -384,7 +384,7 @@ impl WebDavTransport {
match response.status() {
StatusCode::PRECONDITION_FAILED => Ok(false),
status if status.is_success() => Ok(true),
- status => return Err(status_error("conditional write", status)),
+ status => Err(status_error("conditional write", status)),
}
}
diff --git a/crates/host-core/src/rpc/scheduled_rpc.rs b/crates/host-core/src/rpc/scheduled_rpc.rs
index f0c31b32a..ce248bc61 100644
--- a/crates/host-core/src/rpc/scheduled_rpc.rs
+++ b/crates/host-core/src/rpc/scheduled_rpc.rs
@@ -192,7 +192,6 @@ fn handle_with_workspace_policy(
.permission_mode
.clone()
.or_else(|| automatic.then(|| "ask".into())),
- ..Default::default()
};
let uses_task_execution_settings = task.permission_mode.is_some()
|| task.thinking_level.is_some()
diff --git a/crates/host-core/src/user_skills.rs b/crates/host-core/src/user_skills.rs
index d4468b376..ae9b49296 100644
--- a/crates/host-core/src/user_skills.rs
+++ b/crates/host-core/src/user_skills.rs
@@ -1090,7 +1090,7 @@ impl UserSkillRegistry {
.unwrap_or_else(|| {
// Prefer the directory basename so nested resources keep their
// relative paths intact under `<capability_dir>/skills/<id>/`.
- let fallback_path = source_dir.join(format!("{name}"));
+ let fallback_path = source_dir.join(&name);
capability_id(&name, &fallback_path, 64)
});
if !valid_id(&id) {