prev/next A2UI surface and better dismissal
This commit is contained in:
@@ -179,9 +179,6 @@ impl App {
|
||||
if !cards.is_empty() {
|
||||
body = body.push(tool_cards(cards));
|
||||
}
|
||||
if self.a2ui.surfaces_for_message(message.id).next().is_some() {
|
||||
body = body.push(self.a2ui_surfaces(message.id));
|
||||
}
|
||||
}
|
||||
let user = message.user;
|
||||
messages = messages.push(
|
||||
@@ -293,10 +290,24 @@ impl App {
|
||||
.spacing(6)
|
||||
.align_y(Alignment::Center),
|
||||
);
|
||||
let transcript = scrollable(messages)
|
||||
.id(chat_scroll_id())
|
||||
.height(Length::Fill);
|
||||
let workspace: Element<'_, Message> =
|
||||
if let Some(surface) = self.displayed_a2ui_surface() {
|
||||
column![
|
||||
container(surface).height(Length::FillPortion(1)),
|
||||
rule::horizontal(1),
|
||||
container(transcript).height(Length::FillPortion(1)),
|
||||
]
|
||||
.height(Length::Fill)
|
||||
.spacing(8)
|
||||
.into()
|
||||
} else {
|
||||
transcript.into()
|
||||
};
|
||||
let conversation = column![
|
||||
scrollable(messages)
|
||||
.id(chat_scroll_id())
|
||||
.height(Length::Fill),
|
||||
workspace,
|
||||
container(composer_content,)
|
||||
.padding(16)
|
||||
.width(Length::Fill)
|
||||
|
||||
Reference in New Issue
Block a user