From 5200bb20ea95d613101db0b046d2c85d374818a0 Mon Sep 17 00:00:00 2001 From: Tyler Longwell Date: Thu, 20 Nov 2025 15:33:00 -0500 Subject: [PATCH] jank aliases --- crates/goose-tui/src/commands.rs | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/crates/goose-tui/src/commands.rs b/crates/goose-tui/src/commands.rs index 8babd36883..acead78ea0 100644 --- a/crates/goose-tui/src/commands.rs +++ b/crates/goose-tui/src/commands.rs @@ -49,18 +49,24 @@ pub fn dispatch(app: &mut App, input: &str) -> CommandResult { .iter() .find(|c| c.name == command) { - // Construct Tool Request - let param = CallToolRequestParam { - name: cmd.tool.clone().into(), - arguments: Some(cmd.args.as_object().cloned().unwrap_or_default()), - }; + // Construct a prompt that asks Goose to run this tool + let args_str = cmd + .args + .as_object() + .map(|obj| { + obj.iter() + .map(|(k, v)| format!("{}: {}", k, v)) + .collect::>() + .join(", ") + }) + .unwrap_or_default(); - let id = format!("call_{}", uuid::Uuid::new_v4()); + let prompt = format!( + "Please run the tool '{}' with these arguments: {{{}}}", + cmd.tool, args_str + ); - // Inject Assistant Tool Request - let msg = Message::assistant().with_tool_request(id, Ok(param)); - - CommandResult::ExecuteTool(msg) + CommandResult::Reply(prompt) } else { CommandResult::Reply(input.to_string()) }