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:
parent
d385a60ed1
commit
b306a0221b
8 changed files with 439 additions and 262 deletions
|
@ -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),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -546,7 +546,6 @@ async fn parse_blocks(
|
|||
fallback_language_name,
|
||||
cx,
|
||||
)
|
||||
.copy_code_block_buttons(false)
|
||||
})
|
||||
.ok();
|
||||
|
||||
|
@ -787,6 +786,9 @@ impl InfoPopover {
|
|||
markdown.clone(),
|
||||
hover_markdown_style(window, cx),
|
||||
)
|
||||
.code_block_renderer(markdown::CodeBlockRenderer::Default {
|
||||
copy_button: false,
|
||||
})
|
||||
.on_url_click(open_markdown_url),
|
||||
),
|
||||
)
|
||||
|
@ -885,6 +887,9 @@ impl DiagnosticPopover {
|
|||
|
||||
markdown_div = markdown_div.child(
|
||||
MarkdownElement::new(markdown.clone(), markdown_style)
|
||||
.code_block_renderer(markdown::CodeBlockRenderer::Default {
|
||||
copy_button: false,
|
||||
})
|
||||
.on_url_click(open_markdown_url),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue