Fix tools' ui_text to use inline code escaping (#27543)

Markdown escaping was added in #27502.

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2025-03-26 15:49:51 -06:00 committed by GitHub
parent 2b5095ac91
commit 44aff7cd46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 34 additions and 24 deletions

View file

@ -64,12 +64,12 @@ impl Tool for RegexSearchTool {
match serde_json::from_value::<RegexSearchToolInput>(input.clone()) {
Ok(input) => {
let page = input.page();
let regex = MarkdownString::escape(&input.regex);
let regex = MarkdownString::inline_code(&input.regex);
if page > 1 {
format!("Get page {page} of search results for regex “`{regex}`")
format!("Get page {page} of search results for regex “{regex}")
} else {
format!("Search files for regex “`{regex}`")
format!("Search files for regex “{regex}")
}
}
Err(_) => "Search with regex".to_string(),