assistant2: Add tiny design improvements (#27399)

Really small stuff, like adding icons and adjusting colors.

Release Notes:

- N/A
This commit is contained in:
Danilo Leal 2025-03-24 21:00:21 -03:00 committed by GitHub
parent bcfc9e4437
commit c32dece1b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 11 additions and 5 deletions

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right-left"><path d="m16 3 4 4-4 4"/><path d="M20 7H4"/><path d="m8 21-4-4 4-4"/><path d="M4 17h16"/></svg>

After

Width:  |  Height:  |  Size: 316 B

1
assets/icons/cog.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cog"><path d="M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z"/><path d="M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"/><path d="M12 2v2"/><path d="M12 22v-2"/><path d="m17 20.66-1-1.73"/><path d="M11 10.27 7 3.34"/><path d="m20.66 17-1.73-1"/><path d="m3.34 7 1.73 1"/><path d="M14 12h8"/><path d="M2 12h2"/><path d="m20.66 7-1.73 1"/><path d="m3.34 17 1.73-1"/><path d="m17 3.34-1 1.73"/><path d="m11 13.73-4 6.93"/></svg>

After

Width:  |  Height:  |  Size: 608 B

View file

@ -1258,12 +1258,13 @@ impl ActiveThread {
"edit-files" => IconName::Pencil, "edit-files" => IconName::Pencil,
"fetch" => IconName::Globe, "fetch" => IconName::Globe,
"list-directory" => IconName::Folder, "list-directory" => IconName::Folder,
"move-path" => IconName::ArrowRightLeft,
"now" => IconName::Info, "now" => IconName::Info,
"path-search" => IconName::SearchCode, "path-search" => IconName::SearchCode,
"read-file" => IconName::Eye, "read-file" => IconName::Eye,
"regex-search" => IconName::Regex, "regex-search" => IconName::Regex,
"thinking" => IconName::Brain, "thinking" => IconName::Brain,
_ => IconName::Terminal, _ => IconName::Cog,
}; };
div().py_2().child( div().py_2().child(

View file

@ -67,7 +67,7 @@ impl ContextPickerMode {
pub fn label(&self) -> &'static str { pub fn label(&self) -> &'static str {
match self { match self {
Self::File => "File/Directory", Self::File => "Files & Directories",
Self::Fetch => "Fetch", Self::Fetch => "Fetch",
Self::Thread => "Thread", Self::Thread => "Thread",
} }

View file

@ -821,7 +821,7 @@ mod tests {
format!("six.txt {}", separator!("dir/b")).as_str(), format!("six.txt {}", separator!("dir/b")).as_str(),
format!("five.txt {}", separator!("dir/b")).as_str(), format!("five.txt {}", separator!("dir/b")).as_str(),
format!("four.txt {}", separator!("dir/a")).as_str(), format!("four.txt {}", separator!("dir/a")).as_str(),
"File/Directory", "Files & Directories",
"Fetch" "Fetch"
] ]
); );

View file

@ -38,7 +38,7 @@ impl Tool for BashTool {
fn ui_text(&self, input: &serde_json::Value) -> String { fn ui_text(&self, input: &serde_json::Value) -> String {
match serde_json::from_value::<BashToolInput>(input.clone()) { match serde_json::from_value::<BashToolInput>(input.clone()) {
Ok(input) => format!("`$ {}`", input.command), Ok(input) => format!("`{}`", input.command),
Err(_) => "Run bash command".to_string(), Err(_) => "Run bash command".to_string(),
} }
} }

View file

@ -547,7 +547,8 @@ impl CompletionsMenu {
.or_else(|| { .or_else(|| {
completion.icon_path.as_ref().map(|path| { completion.icon_path.as_ref().map(|path| {
Icon::from_path(path) Icon::from_path(path)
.size(IconSize::Small) .size(IconSize::XSmall)
.color(Color::Muted)
.into_any_element() .into_any_element()
}) })
}); });

View file

@ -140,6 +140,7 @@ pub enum IconName {
ArrowDownFromLine, ArrowDownFromLine,
ArrowLeft, ArrowLeft,
ArrowRight, ArrowRight,
ArrowRightLeft,
ArrowUp, ArrowUp,
ArrowUpFromLine, ArrowUpFromLine,
ArrowUpRight, ArrowUpRight,
@ -170,6 +171,7 @@ pub enum IconName {
Circle, Circle,
Close, Close,
Code, Code,
Cog,
Command, Command,
Context, Context,
Control, Control,