Parse and expose stream errors (#2540)

This commit is contained in:
easong-openai
2025-08-21 01:15:24 -07:00
committed by GitHub
parent d2b2a6d13a
commit 8ad56be06e
7 changed files with 61 additions and 2 deletions

View File

@@ -446,6 +446,10 @@ pub enum EventMsg {
BackgroundEvent(BackgroundEventEvent),
/// Notification that a model stream experienced an error or disconnect
/// and the system is handling it (e.g., retrying with backoff).
StreamError(StreamErrorEvent),
/// Notification that the agent is about to apply a code patch. Mirrors
/// `ExecCommandBegin` so frontends can show progress indicators.
PatchApplyBegin(PatchApplyBeginEvent),
@@ -721,6 +725,11 @@ pub struct BackgroundEventEvent {
pub message: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct StreamErrorEvent {
pub message: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PatchApplyBeginEvent {
/// Identifier so this can be paired with the PatchApplyEnd event.