fix: display errors when using opencode run ... (#751)

This commit is contained in:
Aiden Cline
2025-07-08 10:38:11 -05:00
committed by GitHub
parent 562bdb95e2
commit 8322f18e03
2 changed files with 17 additions and 0 deletions

View File

@@ -99,6 +99,7 @@ export namespace Session {
Error: Bus.event(
"session.error",
z.object({
sessionID: z.string().optional(),
error: MessageV2.Assistant.shape.error,
}),
),
@@ -727,6 +728,7 @@ export namespace Session {
next.error = new NamedError.Unknown({ message: JSON.stringify(e) }, { cause: e })
}
Bus.publish(Event.Error, {
sessionID: next.sessionID,
error: next.error,
})
}