mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +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
@@ -7,7 +7,6 @@ use super::*;
|
||||
|
||||
impl ChatWidget {
|
||||
pub(super) fn on_exec_approval_request(&mut self, _id: String, ev: ExecApprovalRequestEvent) {
|
||||
self.record_visible_turn_activity();
|
||||
let ev2 = ev.clone();
|
||||
self.defer_or_handle(
|
||||
|q| q.push_exec_approval(ev),
|
||||
@@ -20,7 +19,6 @@ impl ChatWidget {
|
||||
_id: String,
|
||||
ev: ApplyPatchApprovalRequestEvent,
|
||||
) {
|
||||
self.record_visible_turn_activity();
|
||||
let ev2 = ev.clone();
|
||||
self.defer_or_handle(
|
||||
|q| q.push_apply_patch_approval(ev),
|
||||
@@ -258,7 +256,6 @@ impl ChatWidget {
|
||||
request_id: AppServerRequestId,
|
||||
params: McpServerElicitationRequestParams,
|
||||
) {
|
||||
self.record_visible_turn_activity();
|
||||
let request_id2 = request_id.clone();
|
||||
let params2 = params.clone();
|
||||
self.defer_or_handle(
|
||||
@@ -268,7 +265,6 @@ impl ChatWidget {
|
||||
}
|
||||
|
||||
pub(super) fn on_request_user_input(&mut self, ev: ToolRequestUserInputParams) {
|
||||
self.record_visible_turn_activity();
|
||||
let ev2 = ev.clone();
|
||||
self.defer_or_handle(
|
||||
|q| q.push_user_input(ev),
|
||||
@@ -277,7 +273,6 @@ impl ChatWidget {
|
||||
}
|
||||
|
||||
pub(super) fn on_request_permissions(&mut self, ev: RequestPermissionsEvent) {
|
||||
self.record_visible_turn_activity();
|
||||
let ev2 = ev.clone();
|
||||
self.defer_or_handle(
|
||||
|q| q.push_request_permissions(ev),
|
||||
|
||||
Reference in new issue
Block a user