Improve local tool execution and shell output panes
This commit is contained in:
@@ -834,7 +834,10 @@ pub(crate) fn convert_tool_call_result_to_input(
|
||||
})
|
||||
.collect();
|
||||
|
||||
GrepResult::Success { matched_files }
|
||||
GrepResult::Success {
|
||||
matched_files,
|
||||
truncated: false,
|
||||
}
|
||||
}
|
||||
Some(api::grep_result::Result::Error(error)) => {
|
||||
GrepResult::Error(error.message.clone())
|
||||
|
||||
+10
-1
@@ -1343,11 +1343,20 @@ impl<'a> std::fmt::Display for MarkdownActionResult<'a> {
|
||||
FileGlobV2Result::Cancelled => write!(f, "\n_File glob cancelled_"),
|
||||
},
|
||||
AIAgentActionResultType::Grep(result) => match result {
|
||||
GrepResult::Success { matched_files } => {
|
||||
GrepResult::Success {
|
||||
matched_files,
|
||||
truncated,
|
||||
} => {
|
||||
write!(f, "\n\n**Grep Results:**\n\n")?;
|
||||
for file in matched_files {
|
||||
writeln!(f, "- **{}**", file.file_path)?;
|
||||
}
|
||||
if *truncated {
|
||||
writeln!(
|
||||
f,
|
||||
"\n_Additional matches omitted; narrow the query or path._"
|
||||
)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
GrepResult::Error(message) => {
|
||||
|
||||
Reference in New Issue
Block a user