File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -357,6 +357,10 @@ export interface ResponseErrorEvent {
357357 param : string | null
358358 sequence_number : number
359359 type : "error"
360+ error ?: {
361+ code : string | null
362+ message : string
363+ }
360364}
361365
362366export interface ResponseFunctionCallArgumentsDeltaEvent {
@@ -655,10 +659,20 @@ const createResponsesWebSocketStreamChunk = (
655659 copilot_quota_snapshots ?: Record < string , CopilotQuotaSnapshot >
656660 id ?: unknown
657661 type ?: unknown
662+ error ?: {
663+ code : string | null
664+ message : string
665+ }
666+ code ?: string | null
667+ message ?: string
658668 }
659669 if ( parsed . type === "response.completed" ) {
660670 logCopilotQuotaSnapshots ( parsed . copilot_quota_snapshots )
661671 }
672+ if ( parsed . type === "error" && parsed . error ) {
673+ parsed . code = parsed . error . code
674+ parsed . message = parsed . error . message
675+ }
662676 return {
663677 data : JSON . stringify ( parsed ) ,
664678 event : typeof parsed . type === "string" ? parsed . type : undefined ,
You can’t perform that action at this time.
0 commit comments