mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Clear pending TUI questions when accepting a new prompt (#44328)
## Why Unanswered questions from the previous prompt remain visible after a new follow-up. Clear them when the user moves on to new work. ## What changed - Clear pending questions when a model prompt is submitted or queued, and when a review starts. Clear again on queued prompt delivery to remove questions that arrived while waiting. - Retain seen question IDs so replay cannot restore cleared questions. - Track question answers separately from prompts through queues, retries, thread restoration, and reconnects so delivering an answer preserves other pending questions. - Preserve questions for local commands and rejected submissions. ## Testing Add regression tests for immediate and queued follow-ups, replay suppression, slash prompts, reviews, rejected input, and answer preservation across delivery and recovery. Add a snapshot of the composer after questions are cleared. GitOrigin-RevId: 76353c6ee098c1505678ac43b1dc6391ea9fa738
This commit is contained in:
1 parent
f11d0dd012
commit
2808a9c348
20 files changed
+528
-26
No files matched your search
@@ -6,6 +6,7 @@
|
||||
//! Its entry notice is shared across chats until the backend confirms ordinary usage has recovered.
|
||||
|
||||
use super::ChatWidget;
|
||||
use super::QueuedUserMessage;
|
||||
use super::luna_reserve_return::ReserveReturnModel;
|
||||
use crate::app_command::AppCommand;
|
||||
use crate::backend_banners::BackendBanner;
|
||||
@@ -221,7 +222,10 @@ impl ChatWidget {
|
||||
self.finalize_turn();
|
||||
self.input_queue
|
||||
.queued_user_messages
|
||||
.push_front(prompt.into());
|
||||
.push_front(QueuedUserMessage {
|
||||
source: self.safety_buffering_source,
|
||||
..QueuedUserMessage::from(prompt)
|
||||
});
|
||||
self.input_queue
|
||||
.queued_user_message_history_records
|
||||
.push_front(super::UserMessageHistoryRecord::UserMessageText);
|
||||
|
||||
Reference in new issue
Block a user