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:
parent
2b5095ac91
commit
44aff7cd46
10 changed files with 34 additions and 24 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue