Skip to content

(feat): Add support for batch file reading in fs_read tool #1969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/cli/src/cli/chat/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ const TRUST_ALL_TEXT: &str = color_print::cstr! {"<green!>All tools are now trus
const TOOL_BULLET: &str = " ● ";
const CONTINUATION_LINE: &str = " ⋮ ";
const PURPOSE_ARROW: &str = " ↳ ";
const SUCCESS_TICK: &str = " ✓ ";
const ERROR_EXCLAMATION: &str = " ❗ ";

pub async fn launch_chat(database: &mut Database, telemetry: &TelemetryThread, args: cli::Chat) -> Result<ExitCode> {
let trust_tools = args.trust_tools.map(|mut tools| {
Expand Down
20 changes: 1 addition & 19 deletions crates/cli/src/cli/chat/tools/execute_bash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ 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"];

Expand Down Expand Up @@ -127,21 +123,7 @@ impl ExecuteBash {
)?;

// Add the summary if available
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("Purpose: "),
style::ResetColor,
style::Print(summary),
style::Print("\n"),
)?;
}

queue!(updates, style::Print("\n"))?;
super::queue_summary(self.summary.as_deref(), updates, Some(2))?;

Ok(())
}
Expand Down
Loading
Loading