feat: approval for sub-agent in the TUI (#12995)

<img width="766" height="290" alt="Screenshot 2026-02-27 at 10 50 48"
src="https://github.com/user-attachments/assets/3bc96cd9-ed2c-4d67-a317-8f7b60abbbb1"
/>
This commit is contained in:
jif-oai
2026-02-28 14:07:07 +01:00
committed by GitHub
parent 83177ed7a8
commit 2b38b4e03b
7 changed files with 669 additions and 87 deletions

View File

@@ -812,6 +812,11 @@ impl BottomPane {
self.is_task_running
}
#[cfg(test)]
pub(crate) fn has_active_view(&self) -> bool {
!self.view_stack.is_empty()
}
/// Return true when the pane is in the regular composer state without any
/// overlays or popups and not running a task. This is the safe context to
/// use Esc-Esc for backtracking from the main view.
@@ -1115,6 +1120,8 @@ mod tests {
fn exec_request() -> ApprovalRequest {
ApprovalRequest::Exec {
thread_id: codex_protocol::ThreadId::new(),
thread_label: None,
id: "1".to_string(),
command: vec!["echo".into(), "ok".into()],
reason: None,