mirror of
https://github.com/openai/codex.git
synced 2026-10-24 18:18:41 +00:00
Add simple pop-all overlay flow
This commit is contained in:
@@ -5650,6 +5650,9 @@ impl App {
|
||||
AppEvent::OpenReviewCustomPrompt => {
|
||||
self.chat_widget.show_review_custom_prompt();
|
||||
}
|
||||
AppEvent::DismissAllBottomPaneViews => {
|
||||
self.chat_widget.dismiss_all_bottom_pane_views();
|
||||
}
|
||||
AppEvent::SubmitUserMessageWithMode {
|
||||
text,
|
||||
collaboration_mode,
|
||||
|
||||
@@ -553,6 +553,9 @@ pub(crate) enum AppEvent {
|
||||
/// Open the custom prompt option from the review popup.
|
||||
OpenReviewCustomPrompt,
|
||||
|
||||
/// Dismiss all active bottom-pane views.
|
||||
DismissAllBottomPaneViews,
|
||||
|
||||
/// Submit a user message with an explicit collaboration mask.
|
||||
SubmitUserMessageWithMode {
|
||||
text: String,
|
||||
|
||||
@@ -386,6 +386,12 @@ impl BottomPane {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn pop_all_views(&mut self) {
|
||||
while !self.view_stack.is_empty() {
|
||||
self.pop_active_view();
|
||||
}
|
||||
}
|
||||
|
||||
fn on_view_stack_depth_decreased(&mut self) {
|
||||
if self.view_stack.is_empty() {
|
||||
self.on_active_view_complete();
|
||||
|
||||
@@ -5220,6 +5220,11 @@ impl ChatWidget {
|
||||
self.request_redraw();
|
||||
}
|
||||
|
||||
pub(crate) fn dismiss_all_bottom_pane_views(&mut self) {
|
||||
self.bottom_pane.pop_all_views();
|
||||
self.request_redraw();
|
||||
}
|
||||
|
||||
pub(crate) fn no_modal_or_popup_active(&self) -> bool {
|
||||
self.bottom_pane.no_modal_or_popup_active()
|
||||
}
|
||||
@@ -10530,6 +10535,7 @@ impl ChatWidget {
|
||||
},
|
||||
user_facing_hint: None,
|
||||
});
|
||||
tx3.send(AppEvent::DismissAllBottomPaneViews);
|
||||
})],
|
||||
dismiss_on_select: true,
|
||||
search_value: Some(option),
|
||||
|
||||
Reference in New Issue
Block a user