WIP
This commit is contained in:
parent
5f172a52a4
commit
a1c8f01ff3
1 changed files with 22 additions and 16 deletions
|
@ -1140,6 +1140,7 @@ impl Render for AssistantPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
v_stack()
|
v_stack()
|
||||||
|
.size_full()
|
||||||
.on_action(cx.listener(|this, _: &workspace::NewFile, cx| {
|
.on_action(cx.listener(|this, _: &workspace::NewFile, cx| {
|
||||||
this.new_conversation(cx);
|
this.new_conversation(cx);
|
||||||
}))
|
}))
|
||||||
|
@ -1156,22 +1157,26 @@ impl Render for AssistantPanel {
|
||||||
} else {
|
} else {
|
||||||
Some(self.toolbar.clone())
|
Some(self.toolbar.clone())
|
||||||
})
|
})
|
||||||
.child(if let Some(editor) = self.active_editor() {
|
.child(
|
||||||
editor.clone().into_any_element()
|
div()
|
||||||
} else {
|
.flex_1()
|
||||||
uniform_list(
|
.child(if let Some(editor) = self.active_editor() {
|
||||||
cx.view().clone(),
|
editor.clone().into_any_element()
|
||||||
"saved_conversations",
|
} else {
|
||||||
self.saved_conversations.len(),
|
uniform_list(
|
||||||
|this, range, cx| {
|
cx.view().clone(),
|
||||||
range
|
"saved_conversations",
|
||||||
.map(|ix| this.render_saved_conversation(ix, cx))
|
self.saved_conversations.len(),
|
||||||
.collect()
|
|this, range, cx| {
|
||||||
},
|
range
|
||||||
)
|
.map(|ix| this.render_saved_conversation(ix, cx))
|
||||||
.track_scroll(self.saved_conversations_scroll_handle.clone())
|
.collect()
|
||||||
.into_any_element()
|
},
|
||||||
})
|
)
|
||||||
|
.track_scroll(self.saved_conversations_scroll_handle.clone())
|
||||||
|
.into_any_element()
|
||||||
|
}),
|
||||||
|
)
|
||||||
.border()
|
.border()
|
||||||
.border_color(gpui::red())
|
.border_color(gpui::red())
|
||||||
}
|
}
|
||||||
|
@ -2469,6 +2474,7 @@ impl Render for ConversationEditor {
|
||||||
|
|
||||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||||
div()
|
div()
|
||||||
|
.size_full()
|
||||||
.relative()
|
.relative()
|
||||||
.capture_action(cx.listener(ConversationEditor::cancel_last_assist))
|
.capture_action(cx.listener(ConversationEditor::cancel_last_assist))
|
||||||
.capture_action(cx.listener(ConversationEditor::save))
|
.capture_action(cx.listener(ConversationEditor::save))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue