mirror of
https://github.com/openai/codex.git
synced 2026-04-30 01:16:54 +00:00
[chore] add additional_details to StreamErrorEvent + wire through (#8307)
### What Builds on #8293. Add `additional_details`, which contains the upstream error message, to relevant structures used to pass along retryable `StreamError`s. Uses the new TUI status indicator's `details` field (shows under the status header) to display the `additional_details` error to the user on retryable `Reconnecting...` errors. This adds clarity for users for retryable errors. Will make corresponding change to VSCode extension to show `additional_details` as expandable from the `Reconnecting...` cell. Examples: <img width="1012" height="326" alt="image" src="https://github.com/user-attachments/assets/f35e7e6a-8f5e-4a2f-a764-358101776996" /> <img width="1526" height="358" alt="image" src="https://github.com/user-attachments/assets/0029cbc0-f062-4233-8650-cc216c7808f0" />
This commit is contained in:
@@ -145,9 +145,15 @@ impl EventProcessorWithJsonOutput {
|
||||
};
|
||||
vec![ThreadEvent::ItemCompleted(ItemCompletedEvent { item })]
|
||||
}
|
||||
EventMsg::StreamError(ev) => vec![ThreadEvent::Error(ThreadErrorEvent {
|
||||
message: ev.message.clone(),
|
||||
})],
|
||||
EventMsg::StreamError(ev) => {
|
||||
let message = match &ev.additional_details {
|
||||
Some(details) if !details.trim().is_empty() => {
|
||||
format!("{} ({})", ev.message, details)
|
||||
}
|
||||
_ => ev.message.clone(),
|
||||
};
|
||||
vec![ThreadEvent::Error(ThreadErrorEvent { message })]
|
||||
}
|
||||
EventMsg::PlanUpdate(ev) => self.handle_plan_update(ev),
|
||||
_ => Vec::new(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user