agent: Add small design tweaks (#28874)
Some small adjustments to simplify the agent panel's design. Release Notes: - N/A
This commit is contained in:
parent
486a9e4d61
commit
4f58bdee28
2 changed files with 12 additions and 22 deletions
|
@ -2343,6 +2343,9 @@ impl ActiveThread {
|
||||||
rendered.input.clone(),
|
rendered.input.clone(),
|
||||||
tool_use_markdown_style(window, cx),
|
tool_use_markdown_style(window, cx),
|
||||||
)
|
)
|
||||||
|
.code_block_renderer(markdown::CodeBlockRenderer::Default {
|
||||||
|
copy_button: false,
|
||||||
|
})
|
||||||
.on_url_click({
|
.on_url_click({
|
||||||
let workspace = self.workspace.clone();
|
let workspace = self.workspace.clone();
|
||||||
move |text, window, cx| {
|
move |text, window, cx| {
|
||||||
|
@ -2369,6 +2372,9 @@ impl ActiveThread {
|
||||||
rendered.output.clone(),
|
rendered.output.clone(),
|
||||||
tool_use_markdown_style(window, cx),
|
tool_use_markdown_style(window, cx),
|
||||||
)
|
)
|
||||||
|
.code_block_renderer(markdown::CodeBlockRenderer::Default {
|
||||||
|
copy_button: false,
|
||||||
|
})
|
||||||
.on_url_click({
|
.on_url_click({
|
||||||
let workspace = self.workspace.clone();
|
let workspace = self.workspace.clone();
|
||||||
move |text, window, cx| {
|
move |text, window, cx| {
|
||||||
|
@ -2544,7 +2550,7 @@ impl ActiveThread {
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
v_flex()
|
v_flex()
|
||||||
.my_3()
|
.my_2()
|
||||||
.rounded_lg()
|
.rounded_lg()
|
||||||
.border_1()
|
.border_1()
|
||||||
.border_color(self.tool_card_border_color(cx))
|
.border_color(self.tool_card_border_color(cx))
|
||||||
|
|
|
@ -191,15 +191,12 @@ impl RenderOnce for ContextPill {
|
||||||
ContextPill::Suggested {
|
ContextPill::Suggested {
|
||||||
name,
|
name,
|
||||||
icon_path: _,
|
icon_path: _,
|
||||||
kind,
|
kind: _,
|
||||||
focused,
|
focused,
|
||||||
on_click,
|
on_click,
|
||||||
} => base_pill
|
} => base_pill
|
||||||
.cursor_pointer()
|
.cursor_pointer()
|
||||||
.pr_1()
|
.pr_1()
|
||||||
.when(*focused, |this| {
|
|
||||||
this.bg(color.element_background.opacity(0.5))
|
|
||||||
})
|
|
||||||
.border_dashed()
|
.border_dashed()
|
||||||
.border_color(if *focused {
|
.border_color(if *focused {
|
||||||
color.border_focused
|
color.border_focused
|
||||||
|
@ -207,30 +204,17 @@ impl RenderOnce for ContextPill {
|
||||||
color.border
|
color.border
|
||||||
})
|
})
|
||||||
.hover(|style| style.bg(color.element_hover.opacity(0.5)))
|
.hover(|style| style.bg(color.element_hover.opacity(0.5)))
|
||||||
|
.when(*focused, |this| {
|
||||||
|
this.bg(color.element_background.opacity(0.5))
|
||||||
|
})
|
||||||
.child(
|
.child(
|
||||||
div().px_0p5().max_w_64().child(
|
div().max_w_64().child(
|
||||||
Label::new(name.clone())
|
Label::new(name.clone())
|
||||||
.size(LabelSize::Small)
|
.size(LabelSize::Small)
|
||||||
.color(Color::Muted)
|
.color(Color::Muted)
|
||||||
.truncate(),
|
.truncate(),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.child(
|
|
||||||
Label::new(match kind {
|
|
||||||
ContextKind::File => "Active Tab",
|
|
||||||
ContextKind::Thread
|
|
||||||
| ContextKind::Directory
|
|
||||||
| ContextKind::FetchedUrl
|
|
||||||
| ContextKind::Symbol => "Active",
|
|
||||||
})
|
|
||||||
.size(LabelSize::XSmall)
|
|
||||||
.color(Color::Muted),
|
|
||||||
)
|
|
||||||
.child(
|
|
||||||
Icon::new(IconName::Plus)
|
|
||||||
.size(IconSize::XSmall)
|
|
||||||
.into_any_element(),
|
|
||||||
)
|
|
||||||
.tooltip(|window, cx| {
|
.tooltip(|window, cx| {
|
||||||
Tooltip::with_meta("Suggested Context", None, "Click to add it", window, cx)
|
Tooltip::with_meta("Suggested Context", None, "Click to add it", window, cx)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue