From 40a6b0a0a30adc5070d04236cbcd33ef4ad87b69 Mon Sep 17 00:00:00 2001
From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Date: Mon, 20 Jan 2025 12:42:05 -0300
Subject: [PATCH] assistant2: Adjust "Recent" header label design in context
picker (#23364)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Just a little design fine-tune.
| Before | After |
|--------|--------|
|
|
|
Release Notes:
- N/A
---
crates/assistant2/src/context_picker.rs | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/crates/assistant2/src/context_picker.rs b/crates/assistant2/src/context_picker.rs
index e7adc61eea1feb7e4ff7f9c53de44013470283db..6456c10660d4ec9fe5cc0a8bd46ff56cc0e41e8d 100644
--- a/crates/assistant2/src/context_picker.rs
+++ b/crates/assistant2/src/context_picker.rs
@@ -92,7 +92,18 @@ impl ContextPicker {
.map(|(ix, entry)| self.recent_menu_item(context_picker.clone(), ix, entry));
let menu = menu
- .when(has_recent, |menu| menu.label("Recent"))
+ .when(has_recent, |menu| {
+ menu.custom_row(|_| {
+ div()
+ .mb_1()
+ .child(
+ Label::new("Recent")
+ .color(Color::Muted)
+ .size(LabelSize::Small),
+ )
+ .into_any_element()
+ })
+ })
.extend(recent_entries)
.when(has_recent, |menu| menu.separator())
.extend(ContextKind::all().into_iter().map(kind_entry));