From 4ef632254301174af3edc2c51bd1015c40b6b07b Mon Sep 17 00:00:00 2001 From: YIFAN LIU Date: Tue, 13 May 2025 15:47:32 -0700 Subject: [PATCH 1/2] ui --- crates/chat-cli/src/cli/chat/mod.rs | 1 + crates/chat-cli/src/cli/chat/tools/execute_bash.rs | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/chat-cli/src/cli/chat/mod.rs b/crates/chat-cli/src/cli/chat/mod.rs index 0405420319..9d2634de44 100644 --- a/crates/chat-cli/src/cli/chat/mod.rs +++ b/crates/chat-cli/src/cli/chat/mod.rs @@ -284,6 +284,7 @@ const TRUST_ALL_TEXT: &str = color_print::cstr! {"All tools are now trus const TOOL_BULLET: &str = " ● "; const CONTINUATION_LINE: &str = " ⋮ "; +const PURPOSE_ARROW: &str = " ↳ "; pub async fn launch_chat(database: &mut Database, telemetry: &TelemetryThread, args: cli::Chat) -> Result { let trust_tools = args.trust_tools.map(|mut tools| { diff --git a/crates/chat-cli/src/cli/chat/tools/execute_bash.rs b/crates/chat-cli/src/cli/chat/tools/execute_bash.rs index 947819869c..ba9b6bfa69 100644 --- a/crates/chat-cli/src/cli/chat/tools/execute_bash.rs +++ b/crates/chat-cli/src/cli/chat/tools/execute_bash.rs @@ -26,8 +26,11 @@ use super::{ MAX_TOOL_RESPONSE_SIZE, OutputKind, }; +use crate::cli::chat::{ + CONTINUATION_LINE, + PURPOSE_ARROW} +; use crate::platform::Context; - const READONLY_COMMANDS: &[&str] = &["ls", "cat", "echo", "pwd", "which", "head", "tail", "find", "grep"]; #[derive(Debug, Clone, Deserialize)] @@ -127,8 +130,11 @@ impl ExecuteBash { if let Some(summary) = &self.summary { queue!( updates, + style::Print(CONTINUATION_LINE), + style::Print("\n"), + style::Print(PURPOSE_ARROW), style::SetForegroundColor(Color::Blue), - style::Print("\nPurpose: "), + style::Print("Purpose: "), style::ResetColor, style::Print(summary), style::Print("\n"), From 5c78db0b3289ffb5173ddd65eecdf839cc2a7b7f Mon Sep 17 00:00:00 2001 From: YIFAN LIU Date: Tue, 13 May 2025 15:47:58 -0700 Subject: [PATCH 2/2] ui --- crates/chat-cli/src/cli/chat/tools/execute_bash.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/chat-cli/src/cli/chat/tools/execute_bash.rs b/crates/chat-cli/src/cli/chat/tools/execute_bash.rs index ba9b6bfa69..68caa287d8 100644 --- a/crates/chat-cli/src/cli/chat/tools/execute_bash.rs +++ b/crates/chat-cli/src/cli/chat/tools/execute_bash.rs @@ -28,8 +28,8 @@ use super::{ }; use crate::cli::chat::{ CONTINUATION_LINE, - PURPOSE_ARROW} -; + PURPOSE_ARROW, +}; use crate::platform::Context; const READONLY_COMMANDS: &[&str] = &["ls", "cat", "echo", "pwd", "which", "head", "tail", "find", "grep"]; @@ -131,7 +131,7 @@ impl ExecuteBash { queue!( updates, style::Print(CONTINUATION_LINE), - style::Print("\n"), + style::Print("\n"), style::Print(PURPOSE_ARROW), style::SetForegroundColor(Color::Blue), style::Print("Purpose: "),