mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
return to prompt
This commit is contained in:
@@ -628,7 +628,7 @@ impl AgentTask {
|
||||
let event = Event {
|
||||
id: self.sub_id,
|
||||
msg: EventMsg::BackgroundEvent(BackgroundEventEvent {
|
||||
message: "Turn interrupted — returning to the prompt.".to_string(),
|
||||
message: "Response interrupted.".to_string(),
|
||||
}),
|
||||
};
|
||||
let tx_event = self.sess.tx_event.clone();
|
||||
|
||||
@@ -10,6 +10,7 @@ use codex_core::protocol::AgentMessageEvent;
|
||||
use codex_core::protocol::AgentReasoningDeltaEvent;
|
||||
use codex_core::protocol::AgentReasoningEvent;
|
||||
use codex_core::protocol::ApplyPatchApprovalRequestEvent;
|
||||
use codex_core::protocol::BackgroundEventEvent;
|
||||
use codex_core::protocol::ErrorEvent;
|
||||
use codex_core::protocol::Event;
|
||||
use codex_core::protocol::EventMsg;
|
||||
@@ -220,6 +221,13 @@ impl ChatWidget<'_> {
|
||||
pub(crate) fn handle_codex_event(&mut self, event: Event) {
|
||||
let Event { id, msg } = event;
|
||||
match msg {
|
||||
EventMsg::BackgroundEvent(BackgroundEventEvent { message }) => {
|
||||
self.add_to_history(HistoryCell::new_background_event(message.clone()));
|
||||
if message.contains("Turn interrupted") {
|
||||
self.bottom_pane.set_task_running(false);
|
||||
}
|
||||
self.request_redraw();
|
||||
}
|
||||
EventMsg::SessionConfigured(event) => {
|
||||
self.bottom_pane
|
||||
.set_history_metadata(event.history_log_id, event.history_entry_count);
|
||||
|
||||
Reference in New Issue
Block a user