Skip to content

Commit e870e74

Browse files
authored
Fix: broken format for fs read tool use description (#122)
1 parent aca2800 commit e870e74

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,8 @@ impl FsDirectory {
372372
)?)
373373
}
374374

375-
pub async fn invoke(&self, ctx: &Context, updates: &mut impl Write) -> Result<InvokeOutput> {
375+
pub async fn invoke(&self, ctx: &Context, _updates: &mut impl Write) -> Result<InvokeOutput> {
376376
let path = sanitize_path_tool_arg(ctx, &self.path);
377-
let cwd = ctx.env().current_dir()?;
378377
let max_depth = self.depth();
379378
debug!(?path, max_depth, "Reading directory at path with depth");
380379
let mut result = Vec::new();
@@ -384,17 +383,6 @@ impl FsDirectory {
384383
if depth > max_depth {
385384
break;
386385
}
387-
let relative_path = format_path(&cwd, &path);
388-
if !relative_path.is_empty() {
389-
queue!(
390-
updates,
391-
style::Print("Reading: "),
392-
style::SetForegroundColor(Color::Green),
393-
style::Print(&relative_path),
394-
style::ResetColor,
395-
style::Print("\n"),
396-
)?;
397-
}
398386
let mut read_dir = ctx.fs().read_dir(path).await?;
399387

400388
#[cfg(windows)]

0 commit comments

Comments
 (0)