mirror of
https://github.com/openai/codex.git
synced 2026-11-26 07:26:11 +00:00
Keep interrupted prompts in conversation history (#33198)
## What changed - Leave an output-free interrupted prompt in the transcript and open a blank composer for the user's next instruction. - Use the normal interruption notice for both `Esc` and `Ctrl-C` interrupts. - Track safety-buffering prompts separately so failed retries can still restore the prompt, including after switching between threads. ## Testing - Cover output-free `Esc` and `Ctrl-C` interrupts, failed safety-buffer retries, and restoration of safety-buffer state from thread snapshots. GitOrigin-RevId: 30b368d00dfdb981d06d4c95ce3f252389b7917c
This commit is contained in:
1 parent
4df8027a97
commit
70a0b1eef8
29 files changed
+186
-269
No files matched your search
@@ -403,7 +403,7 @@ impl ChatWidget {
|
||||
self.quit_shortcut_expires_at = None;
|
||||
self.quit_shortcut_key = None;
|
||||
self.bottom_pane.clear_quit_shortcut_hint();
|
||||
if self.submit_op(AppCommand::interrupt_and_restore_prompt_if_no_output()) {
|
||||
if self.submit_op(AppCommand::interrupt()) {
|
||||
self.pause_active_goal_for_interrupt();
|
||||
}
|
||||
} else {
|
||||
@@ -421,9 +421,7 @@ impl ChatWidget {
|
||||
|
||||
self.arm_quit_shortcut(key);
|
||||
|
||||
if self.is_cancellable_work_active()
|
||||
&& self.submit_op(AppCommand::interrupt_and_restore_prompt_if_no_output())
|
||||
{
|
||||
if self.is_cancellable_work_active() && self.submit_op(AppCommand::interrupt()) {
|
||||
self.pause_active_goal_for_interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user