mirror of
https://github.com/openai/codex.git
synced 2026-10-26 18:38:47 +00:00
Acknowledge pending TUI steers by submission ID (#42451)
## Why Completion receipts for identical user messages could acknowledge the wrong pending steer. When the receipt arrived while another thread was displayed, the stale pending state could later be restored and resubmitted. ## What changed - Assign each TUI submission a client message ID and pass it through turn start and steer requests. - Preserve pending steer IDs across thread input snapshots and match completion receipts by ID, while retaining content-based matching for older app servers that do not echo IDs. - Acknowledge matching receipts for inactive threads before their notifications can be discarded, including threads stored in the agents overview. ## Testing Added coverage for identical steer receipts and for switching within and between tasks before interrupting an active turn. GitOrigin-RevId: 28bd80a735ff86cd7bf836f24b448e7499f0a902
This commit is contained in:
@@ -30,6 +30,7 @@ pub(crate) enum AppCommand {
|
||||
command: String,
|
||||
},
|
||||
UserTurn {
|
||||
client_user_message_id: String,
|
||||
items: Vec<UserInput>,
|
||||
cwd: PathBuf,
|
||||
approval_policy: AskForApproval,
|
||||
@@ -113,6 +114,7 @@ impl AppCommand {
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(crate) fn user_turn(
|
||||
client_user_message_id: String,
|
||||
items: Vec<UserInput>,
|
||||
cwd: PathBuf,
|
||||
approval_policy: AskForApproval,
|
||||
@@ -126,6 +128,7 @@ impl AppCommand {
|
||||
personality: Option<Personality>,
|
||||
) -> Self {
|
||||
Self::UserTurn {
|
||||
client_user_message_id,
|
||||
items,
|
||||
cwd,
|
||||
approval_policy,
|
||||
|
||||
Reference in New Issue
Block a user