agent: Add headers for code blocks (#28253)

<img width="639" alt="image"
src="https://github.com/user-attachments/assets/1fd51387-cbdc-474d-b1a3-3d0201f3735a"
/>


Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Bennet Bo Fenner
2025-04-07 23:56:24 +00:00
committed by GitHub
co-authored by Danilo Leal Antonio Scandurra
parent d385a60ed1
commit b306a0221b
8 changed files with 439 additions and 262 deletions
+3 -1
View File
@@ -623,7 +623,6 @@ impl CompletionsMenu {
.language_at(self.initial_position, cx)
.map(|l| l.name().to_proto());
Markdown::new(SharedString::default(), languages, language, cx)
.copy_code_block_buttons(false)
})
});
markdown.update(cx, |markdown, cx| {
@@ -631,6 +630,9 @@ impl CompletionsMenu {
});
div().child(
MarkdownElement::new(markdown.clone(), hover_markdown_style(window, cx))
.code_block_renderer(markdown::CodeBlockRenderer::Default {
copy_button: false,
})
.on_url_click(open_markdown_url),
)
}