Skip to content

Commit 34afb2c

Browse files
authored
fix: Make shell command purpose display more natural (#1815)
* ui * ui
1 parent 39cc3b9 commit 34afb2c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

crates/chat-cli/src/cli/chat/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ const TRUST_ALL_TEXT: &str = color_print::cstr! {"<green!>All tools are now trus
284284

285285
const TOOL_BULLET: &str = " ● ";
286286
const CONTINUATION_LINE: &str = " ⋮ ";
287+
const PURPOSE_ARROW: &str = " ↳ ";
287288

288289
pub async fn launch_chat(database: &mut Database, telemetry: &TelemetryThread, args: cli::Chat) -> Result<ExitCode> {
289290
let trust_tools = args.trust_tools.map(|mut tools| {

crates/chat-cli/src/cli/chat/tools/execute_bash.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ use super::{
2626
MAX_TOOL_RESPONSE_SIZE,
2727
OutputKind,
2828
};
29+
use crate::cli::chat::{
30+
CONTINUATION_LINE,
31+
PURPOSE_ARROW,
32+
};
2933
use crate::platform::Context;
30-
3134
const READONLY_COMMANDS: &[&str] = &["ls", "cat", "echo", "pwd", "which", "head", "tail", "find", "grep"];
3235

3336
#[derive(Debug, Clone, Deserialize)]
@@ -127,8 +130,11 @@ impl ExecuteBash {
127130
if let Some(summary) = &self.summary {
128131
queue!(
129132
updates,
133+
style::Print(CONTINUATION_LINE),
134+
style::Print("\n"),
135+
style::Print(PURPOSE_ARROW),
130136
style::SetForegroundColor(Color::Blue),
131-
style::Print("\nPurpose: "),
137+
style::Print("Purpose: "),
132138
style::ResetColor,
133139
style::Print(summary),
134140
style::Print("\n"),

0 commit comments

Comments
 (0)