Merge branch 'main' into collab-panel
This commit is contained in:
commit
111e17b220
54 changed files with 1233 additions and 679 deletions
|
@ -349,7 +349,7 @@ impl AssistantPanel {
|
|||
enum History {}
|
||||
let theme = theme::current(cx);
|
||||
let tooltip_style = theme::current(cx).tooltip.clone();
|
||||
MouseEventHandler::<History, _>::new(0, cx, |state, _| {
|
||||
MouseEventHandler::new::<History, _>(0, cx, |state, _| {
|
||||
let style = theme.assistant.hamburger_button.style_for(state);
|
||||
Svg::for_style(style.icon.clone())
|
||||
.contained()
|
||||
|
@ -381,7 +381,7 @@ impl AssistantPanel {
|
|||
fn render_split_button(cx: &mut ViewContext<Self>) -> impl Element<Self> {
|
||||
let theme = theme::current(cx);
|
||||
let tooltip_style = theme::current(cx).tooltip.clone();
|
||||
MouseEventHandler::<Split, _>::new(0, cx, |state, _| {
|
||||
MouseEventHandler::new::<Split, _>(0, cx, |state, _| {
|
||||
let style = theme.assistant.split_button.style_for(state);
|
||||
Svg::for_style(style.icon.clone())
|
||||
.contained()
|
||||
|
@ -405,7 +405,7 @@ impl AssistantPanel {
|
|||
fn render_assist_button(cx: &mut ViewContext<Self>) -> impl Element<Self> {
|
||||
let theme = theme::current(cx);
|
||||
let tooltip_style = theme::current(cx).tooltip.clone();
|
||||
MouseEventHandler::<Assist, _>::new(0, cx, |state, _| {
|
||||
MouseEventHandler::new::<Assist, _>(0, cx, |state, _| {
|
||||
let style = theme.assistant.assist_button.style_for(state);
|
||||
Svg::for_style(style.icon.clone())
|
||||
.contained()
|
||||
|
@ -423,7 +423,7 @@ impl AssistantPanel {
|
|||
fn render_quote_button(cx: &mut ViewContext<Self>) -> impl Element<Self> {
|
||||
let theme = theme::current(cx);
|
||||
let tooltip_style = theme::current(cx).tooltip.clone();
|
||||
MouseEventHandler::<QuoteSelection, _>::new(0, cx, |state, _| {
|
||||
MouseEventHandler::new::<QuoteSelection, _>(0, cx, |state, _| {
|
||||
let style = theme.assistant.quote_button.style_for(state);
|
||||
Svg::for_style(style.icon.clone())
|
||||
.contained()
|
||||
|
@ -451,7 +451,7 @@ impl AssistantPanel {
|
|||
fn render_plus_button(cx: &mut ViewContext<Self>) -> impl Element<Self> {
|
||||
let theme = theme::current(cx);
|
||||
let tooltip_style = theme::current(cx).tooltip.clone();
|
||||
MouseEventHandler::<NewConversation, _>::new(0, cx, |state, _| {
|
||||
MouseEventHandler::new::<NewConversation, _>(0, cx, |state, _| {
|
||||
let style = theme.assistant.plus_button.style_for(state);
|
||||
Svg::for_style(style.icon.clone())
|
||||
.contained()
|
||||
|
@ -481,7 +481,7 @@ impl AssistantPanel {
|
|||
&theme.assistant.zoom_in_button
|
||||
};
|
||||
|
||||
MouseEventHandler::<ToggleZoomButton, _>::new(0, cx, |state, _| {
|
||||
MouseEventHandler::new::<ToggleZoomButton, _>(0, cx, |state, _| {
|
||||
let style = style.style_for(state);
|
||||
Svg::for_style(style.icon.clone())
|
||||
.contained()
|
||||
|
@ -507,7 +507,7 @@ impl AssistantPanel {
|
|||
) -> impl Element<Self> {
|
||||
let conversation = &self.saved_conversations[index];
|
||||
let path = conversation.path.clone();
|
||||
MouseEventHandler::<SavedConversationMetadata, _>::new(index, cx, move |state, cx| {
|
||||
MouseEventHandler::new::<SavedConversationMetadata, _>(index, cx, move |state, cx| {
|
||||
let style = &theme::current(cx).assistant.saved_conversation;
|
||||
Flex::row()
|
||||
.with_child(
|
||||
|
@ -1821,7 +1821,7 @@ impl ConversationEditor {
|
|||
let theme = theme::current(cx);
|
||||
let style = &theme.assistant;
|
||||
let message_id = message.id;
|
||||
let sender = MouseEventHandler::<Sender, _>::new(
|
||||
let sender = MouseEventHandler::new::<Sender, _>(
|
||||
message_id.0,
|
||||
cx,
|
||||
|state, _| match message.role {
|
||||
|
@ -2047,7 +2047,7 @@ impl ConversationEditor {
|
|||
) -> impl Element<Self> {
|
||||
enum Model {}
|
||||
|
||||
MouseEventHandler::<Model, _>::new(0, cx, |state, cx| {
|
||||
MouseEventHandler::new::<Model, _>(0, cx, |state, cx| {
|
||||
let style = style.model.style_for(state);
|
||||
Label::new(self.conversation.read(cx).model.clone(), style.text.clone())
|
||||
.contained()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue