mirror of
https://github.com/openai/codex.git
synced 2026-05-02 12:21:26 +03:00
01 dynamic mount commands
This commit is contained in:
@@ -12,6 +12,7 @@ use crate::app_event_sender::AppEventSender;
|
||||
use crate::user_approval_widget::ApprovalRequest;
|
||||
|
||||
mod approval_modal_view;
|
||||
mod mount_view;
|
||||
mod bottom_pane_view;
|
||||
mod chat_composer;
|
||||
mod chat_composer_history;
|
||||
@@ -22,6 +23,7 @@ pub(crate) use chat_composer::ChatComposer;
|
||||
pub(crate) use chat_composer::InputResult;
|
||||
|
||||
use approval_modal_view::ApprovalModalView;
|
||||
use mount_view::{MountAddView, MountRemoveView};
|
||||
use status_indicator_view::StatusIndicatorView;
|
||||
|
||||
/// Pane displayed in the lower half of the chat UI.
|
||||
@@ -135,6 +137,20 @@ impl BottomPane<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Launch interactive mount-add dialog (host, container, [mode]).
|
||||
pub fn push_mount_add_interactive(&mut self) {
|
||||
let view = MountAddView::new(self.app_event_tx.clone());
|
||||
self.active_view = Some(Box::new(view));
|
||||
self.request_redraw();
|
||||
}
|
||||
|
||||
/// Launch interactive mount-remove dialog (container path).
|
||||
pub fn push_mount_remove_interactive(&mut self) {
|
||||
let view = MountRemoveView::new(self.app_event_tx.clone());
|
||||
self.active_view = Some(Box::new(view));
|
||||
self.request_redraw();
|
||||
}
|
||||
|
||||
/// Called when the agent requests user approval.
|
||||
pub fn push_approval_request(&mut self, request: ApprovalRequest) {
|
||||
let request = if let Some(view) = self.active_view.as_mut() {
|
||||
|
||||
Reference in New Issue
Block a user