feat: propagate approval request of unsubscribed threads (#9232)

A thread can now be spawned by another thread. In order to process the
approval requests of such sub-threads, we need to detect those event and
show them in the TUI.

This is a temporary solution while the UX is being figured out. This PR
should be reverted once done
This commit is contained in:
jif-oai
2026-01-16 11:23:01 +01:00
committed by GitHub
parent 0cce6ebd83
commit f5b3e738fb
2 changed files with 180 additions and 14 deletions

View File

@@ -14,6 +14,7 @@ use codex_common::approval_presets::ApprovalPreset;
use codex_core::protocol::Event;
use codex_core::protocol::RateLimitSnapshot;
use codex_file_search::FileMatch;
use codex_protocol::ThreadId;
use codex_protocol::openai_models::ModelPreset;
use crate::bottom_pane::ApprovalRequest;
@@ -41,6 +42,10 @@ pub(crate) enum WindowsSandboxFallbackReason {
#[derive(Debug)]
pub(crate) enum AppEvent {
CodexEvent(Event),
ExternalApprovalRequest {
thread_id: ThreadId,
event: Event,
},
/// Start a new session.
NewSession,