diff --git a/crates/ai/src/assistant.rs b/crates/ai/src/assistant.rs index e8faa48000..d81434082d 100644 --- a/crates/ai/src/assistant.rs +++ b/crates/ai/src/assistant.rs @@ -418,13 +418,25 @@ impl View for AssistantPanel { .aligned() .into_any() } else { + let title = self.active_conversation_editor().map(|editor| { + Label::new(editor.read(cx).title(cx), style.title.text.clone()) + .contained() + .with_style(style.title.container) + .aligned() + }); + Flex::column() .with_child( Flex::row() .with_child( Self::render_hamburger_button(&style.hamburger_button).aligned(), ) - .with_child(Self::render_plus_button(&style.plus_button).aligned()) + .with_children(title) + .with_child( + Self::render_plus_button(&style.plus_button) + .aligned() + .flex_float(), + ) .contained() .with_style(theme.workspace.tab_bar.container) .expanded() diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rs index d76c3432d1..72976ad82b 100644 --- a/crates/theme/src/theme.rs +++ b/crates/theme/src/theme.rs @@ -996,6 +996,7 @@ pub struct AssistantStyle { pub container: ContainerStyle, pub hamburger_button: IconStyle, pub plus_button: IconStyle, + pub title: ContainedText, pub message_header: ContainerStyle, pub sent_at: ContainedText, pub user_sender: Interactive, diff --git a/styles/src/styleTree/assistant.ts b/styles/src/styleTree/assistant.ts index 94547bd154..14bb836ee8 100644 --- a/styles/src/styleTree/assistant.ts +++ b/styles/src/styleTree/assistant.ts @@ -37,9 +37,13 @@ export default function assistant(colorScheme: ColorScheme) { }, }, container: { - margin: { left: 8 }, + margin: { right: 8 }, } }, + title: { + margin: { left: 8 }, + ...text(layer, "sans", "default", { size: "sm" }) + }, savedConversation: { background: background(layer, "on"), hover: {