assistant2: Add ChatNotice component (#11262)

This PR adds a new `ChatNotice` component for displaying notices within
the assistant.

We will be able to use this for allowing the user to confirm a project
index request.

<img width="518" alt="Screenshot 2024-05-01 at 2 41 31 PM"
src="https://github.com/zed-industries/zed/assets/1486634/3beaeeaf-6046-4284-ac0a-4248e1f9ac20">

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-05-01 14:51:28 -04:00 committed by GitHub
parent 0858e3f0e2
commit 3dc5d48e0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 102 additions and 3 deletions

View file

@ -13,6 +13,7 @@ use ui::prelude::*;
#[strum(serialize_all = "snake_case")]
pub enum ComponentStory {
AssistantChatMessage,
AssistantChatNotice,
AutoHeightEditor,
Avatar,
Button,
@ -46,6 +47,7 @@ impl ComponentStory {
Self::AssistantChatMessage => {
cx.new_view(|_cx| assistant2::ui::ChatMessageStory).into()
}
Self::AssistantChatNotice => cx.new_view(|_cx| assistant2::ui::ChatNoticeStory).into(),
Self::AutoHeightEditor => AutoHeightEditorStory::new(cx).into(),
Self::Avatar => cx.new_view(|_| ui::AvatarStory).into(),
Self::Button => cx.new_view(|_| ui::ButtonStory).into(),