Skip to content

Commit 878fed8

Browse files
committed
add batch read
1 parent 12d49f2 commit 878fed8

File tree

5 files changed

+1211
-297
lines changed

5 files changed

+1211
-297
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ const TRUST_ALL_TEXT: &str = color_print::cstr! {"<green!>All tools are now trus
288288
const TOOL_BULLET: &str = " ● ";
289289
const CONTINUATION_LINE: &str = " ⋮ ";
290290
const PURPOSE_ARROW: &str = " ↳ ";
291+
const SUCCESS_TICK: &str = " ✓ ";
292+
const ERROR_EXCLAMATION: &str = " ❗ ";
291293

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

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

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ use super::{
2626
MAX_TOOL_RESPONSE_SIZE,
2727
OutputKind,
2828
};
29-
use crate::cli::chat::{
30-
CONTINUATION_LINE,
31-
PURPOSE_ARROW,
32-
};
3329
use crate::platform::Context;
3430
const READONLY_COMMANDS: &[&str] = &["ls", "cat", "echo", "pwd", "which", "head", "tail", "find", "grep"];
3531

@@ -127,21 +123,7 @@ impl ExecuteBash {
127123
)?;
128124

129125
// Add the summary if available
130-
if let Some(summary) = &self.summary {
131-
queue!(
132-
updates,
133-
style::Print(CONTINUATION_LINE),
134-
style::Print("\n"),
135-
style::Print(PURPOSE_ARROW),
136-
style::SetForegroundColor(Color::Blue),
137-
style::Print("Purpose: "),
138-
style::ResetColor,
139-
style::Print(summary),
140-
style::Print("\n"),
141-
)?;
142-
}
143-
144-
queue!(updates, style::Print("\n"))?;
126+
super::queue_summary(self.summary.as_deref(), updates, Some(2))?;
145127

146128
Ok(())
147129
}

0 commit comments

Comments
 (0)