mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Represent terminal input in approval reviews (#40528)
## What changed - Add a `writeStdin` Guardian action carrying the approval, process, input, and working-directory details. - Distinguish `command` and `writeStdin` execution approval requests while defaulting missing kinds to `command` for compatibility with older events. - Render terminal-input review progress, denials, timeouts, and retry actions in the TUI, and record the action separately in analytics. - Keep terminal-input reviews as child approvals so they do not change the parent command item's lifecycle or reconstructed history. ## Testing - Cover Guardian serialization, app-server protocol conversion, command history reconstruction, analytics classification, and TUI review flows for terminal input. GitOrigin-RevId: b083d5e2963bdd23b928644ec03c7eb68ebf2950
This commit is contained in:
1 parent
a7b86b6201
commit
9c9675d3d0
51 files changed
+833
-26
No files matched your search
@@ -54,6 +54,9 @@ impl ChatWidget {
|
||||
.ok()
|
||||
.or_else(|| Some(command.join(" ")))
|
||||
}
|
||||
GuardianAssessmentAction::WriteStdin { .. } => {
|
||||
Some(auto_review_denials::action_summary(action))
|
||||
}
|
||||
GuardianAssessmentAction::ApplyPatch { files, .. } => Some(if files.len() == 1 {
|
||||
format!("apply_patch touching {}", files[0].display())
|
||||
} else {
|
||||
@@ -85,7 +88,8 @@ impl ChatWidget {
|
||||
argv.clone()
|
||||
})
|
||||
.filter(|command| !command.is_empty()),
|
||||
GuardianAssessmentAction::ApplyPatch { .. }
|
||||
GuardianAssessmentAction::WriteStdin { .. }
|
||||
| GuardianAssessmentAction::ApplyPatch { .. }
|
||||
| GuardianAssessmentAction::NetworkAccess { .. }
|
||||
| GuardianAssessmentAction::McpToolCall { .. }
|
||||
| GuardianAssessmentAction::RequestPermissions { .. } => None,
|
||||
@@ -160,6 +164,12 @@ impl ChatWidget {
|
||||
)
|
||||
} else {
|
||||
match &ev.action {
|
||||
GuardianAssessmentAction::WriteStdin { .. } => {
|
||||
history_cell::new_guardian_timed_out_action_request(format!(
|
||||
"codex could {}",
|
||||
auto_review_denials::action_summary(&ev.action)
|
||||
))
|
||||
}
|
||||
GuardianAssessmentAction::ApplyPatch { files, .. } => {
|
||||
let files = files
|
||||
.iter()
|
||||
@@ -204,6 +214,12 @@ impl ChatWidget {
|
||||
)
|
||||
} else {
|
||||
match &ev.action {
|
||||
GuardianAssessmentAction::WriteStdin { .. } => {
|
||||
history_cell::new_guardian_denied_action_request(format!(
|
||||
"codex to {}",
|
||||
auto_review_denials::action_summary(&ev.action)
|
||||
))
|
||||
}
|
||||
GuardianAssessmentAction::ApplyPatch { files, .. } => {
|
||||
let files = files
|
||||
.iter()
|
||||
|
||||
Reference in new issue
Block a user