From e82af55d64a6e0167e9889e6905d363c41dd5651 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Fri, 20 Dec 2024 21:19:50 -0300 Subject: [PATCH] assistant2: Adjust role info colors on the thread header (#22318) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Screenshot 2024-12-20 at 9 01 29 PM Release Notes: - N/A --- crates/assistant2/src/active_thread.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/crates/assistant2/src/active_thread.rs b/crates/assistant2/src/active_thread.rs index 7f491cce33..2930ba19d9 100644 --- a/crates/assistant2/src/active_thread.rs +++ b/crates/assistant2/src/active_thread.rs @@ -205,10 +205,10 @@ impl ActiveThread { let context = self.thread.read(cx).context_for_message(message_id); - let (role_icon, role_name) = match message.role { - Role::User => (IconName::Person, "You"), - Role::Assistant => (IconName::ZedAssistant, "Assistant"), - Role::System => (IconName::Settings, "System"), + let (role_icon, role_name, role_color) = match message.role { + Role::User => (IconName::Person, "You", Color::Muted), + Role::Assistant => (IconName::ZedAssistant, "Assistant", Color::Accent), + Role::System => (IconName::Settings, "System", Color::Default), }; div() @@ -234,9 +234,13 @@ impl ActiveThread { .child( Icon::new(role_icon) .size(IconSize::XSmall) - .color(Color::Muted), + .color(role_color), ) - .child(Label::new(role_name).size(LabelSize::XSmall)), + .child( + Label::new(role_name) + .size(LabelSize::XSmall) + .color(role_color), + ), ), ) .child(v_flex().px_2().py_1().text_ui(cx).child(markdown.clone()))