chore(fmt): format commands/mod.rs and commands/plugins.rs (#3174)

Co-authored-by: CodeWhale Agent <codewhale-agent@hmbown.local>
This commit is contained in:
Hunter Bown
2026-06-12 11:39:14 -07:00
committed by GitHub
parent 19c73a7705
commit 4d0c04ea7c
2 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -19,8 +19,8 @@ mod jobs;
mod mcp;
mod memory;
mod network;
mod plugins;
mod note;
mod plugins;
mod provider;
mod queue;
mod rename;
+8 -6
View File
@@ -5,8 +5,8 @@ use std::path::PathBuf;
use crate::commands::CommandResult;
use crate::config::Config;
use crate::localization::{MessageId, tr};
use crate::tui::app::App;
use crate::tools::plugin::scan_plugin_dir;
use crate::tui::app::App;
/// List discovered plugins, or show details for a named plugin.
pub fn plugins(app: &mut App, arg: Option<&str>) -> CommandResult {
@@ -92,8 +92,7 @@ fn show_plugin_detail(
));
out.push_str(&format!(
"{}\n",
tr(app.ui_locale, MessageId::CmdPluginDetailApproval)
.replace("{approval}", approval)
tr(app.ui_locale, MessageId::CmdPluginDetailApproval).replace("{approval}", approval)
));
out.push_str(&format!(
"{}\n",
@@ -115,8 +114,9 @@ fn approval_label(approval: crate::tools::spec::ApprovalRequirement) -> &'static
/// Resolve the configured plugin directory, defaulting to `~/.codewhale/tools`.
fn plugin_dir_for(app: &App) -> Option<PathBuf> {
let config = match &app.config_path {
Some(path) => Config::load(Some(path.clone()), app.config_profile.as_deref())
.unwrap_or_default(),
Some(path) => {
Config::load(Some(path.clone()), app.config_profile.as_deref()).unwrap_or_default()
}
None => Config::default(),
};
@@ -142,7 +142,9 @@ mod tests {
fn create_test_app_with_plugin_dir(plugin_dir: &std::path::Path) -> (App, TempDir) {
let tmp = TempDir::new().expect("tempdir");
let config_path = tmp.path().join("config.toml");
let tools_dir = plugin_dir.canonicalize().unwrap_or_else(|_| plugin_dir.to_path_buf());
let tools_dir = plugin_dir
.canonicalize()
.unwrap_or_else(|_| plugin_dir.to_path_buf());
std::fs::write(
&config_path,
format!(