mirror of
https://github.com/openai/codex.git
synced 2026-05-05 22:01:37 +03:00
TUI: prompt to implement plan and switch to Execute (#9712)
## Summary - Replace the plan‑implementation prompt with a standard selection popup. - “Yes” submits a user turn in Execute via a dedicated app event to preserve normal transcript behavior. - “No” simply dismisses the popup. <img width="977" height="433" alt="Screenshot 2026-01-22 at 2 00 54 PM" src="https://github.com/user-attachments/assets/91fad06f-7b7a-4cd8-9051-f28a19b750b2" /> ## Changes - Add a plan‑implementation popup using `SelectionViewParams`. - Add `SubmitUserMessageWithMode` so “Yes” routes through `submit_user_message` (ensures user history + separator state). - Track `saw_plan_update_this_turn` so the prompt appears even when only `update_plan` is emitted. - Suppress the plan popup on replayed turns, when messages are queued, or when a rate‑limit prompt is pending. - Add `execute_mode` helper for collaboration modes. - Add tests for replay/queued/rate‑limit guards and plan update without final message. - Add snapshots for both the default and “No”‑selected popup states.
This commit is contained in:
@@ -240,6 +240,12 @@ pub(crate) enum AppEvent {
|
||||
/// Open the custom prompt option from the review popup.
|
||||
OpenReviewCustomPrompt,
|
||||
|
||||
/// Submit a user message with an explicit collaboration mode.
|
||||
SubmitUserMessageWithMode {
|
||||
text: String,
|
||||
collaboration_mode: CollaborationMode,
|
||||
},
|
||||
|
||||
/// Open the approval popup.
|
||||
FullScreenApprovalRequest(ApprovalRequest),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user