feat: moved a2ui surface to a separate panel
This commit is contained in:
11
src/app.rs
11
src/app.rs
@@ -90,6 +90,7 @@ pub(crate) struct App {
|
||||
pub(super) a2ui_image_requests: HashSet<String>,
|
||||
pub(super) a2ui_image_loading: bool,
|
||||
pub(super) pending_a2ui_dismissal: Option<String>,
|
||||
pub(super) a2ui_auto_switch_pending: bool,
|
||||
pub(super) generating: bool,
|
||||
pub(super) context_used: u32,
|
||||
pub(super) context_limit: u32,
|
||||
@@ -141,6 +142,7 @@ pub(crate) struct App {
|
||||
pub(super) enum DetailTab {
|
||||
#[default]
|
||||
Chat,
|
||||
A2ui,
|
||||
Stats,
|
||||
}
|
||||
|
||||
@@ -264,6 +266,7 @@ pub(crate) enum Message {
|
||||
SetSessionState(i32, SessionState),
|
||||
ToggleArchivedSessions(i32),
|
||||
ShowChat,
|
||||
ShowA2ui,
|
||||
ShowStats,
|
||||
ToggleSidebar,
|
||||
StartSidebarDrag,
|
||||
@@ -346,6 +349,7 @@ impl App {
|
||||
a2ui_image_requests: HashSet::new(),
|
||||
a2ui_image_loading: false,
|
||||
pending_a2ui_dismissal: None,
|
||||
a2ui_auto_switch_pending: false,
|
||||
generating: false,
|
||||
context_used: 0,
|
||||
context_limit,
|
||||
@@ -464,6 +468,7 @@ impl App {
|
||||
a2ui_image_requests: HashSet::new(),
|
||||
a2ui_image_loading: false,
|
||||
pending_a2ui_dismissal: None,
|
||||
a2ui_auto_switch_pending: false,
|
||||
generating: false,
|
||||
context_used: 0,
|
||||
context_limit,
|
||||
@@ -571,7 +576,11 @@ impl App {
|
||||
Message::FocusPrevious => {
|
||||
return iced::widget::operation::focus_previous().chain(reveal_focused());
|
||||
}
|
||||
Message::ShowChat => self.detail_tab = DetailTab::Chat,
|
||||
Message::ShowChat => {
|
||||
self.detail_tab = DetailTab::Chat;
|
||||
return scroll_chat_to_end();
|
||||
}
|
||||
Message::ShowA2ui => self.detail_tab = DetailTab::A2ui,
|
||||
Message::ShowStats => {
|
||||
self.detail_tab = DetailTab::Stats;
|
||||
self.scan_kv_cache();
|
||||
|
||||
Reference in New Issue
Block a user