1017
}));
1018
if (status === 'failed' && params.turn.error) {
1020
>
return [
1021
>
...preflightFlush,
1022
>
...orphanedToolCallActions,
1023
>
{
1024
>
type: ActionType.ChatError,
1025
>
turnId,
1026
>
duration,
1027
>
error: {
1028
>
errorType: 'CodexError',
1029
>
...extractForwardedErrorInfo(errMessage),
1030
>
},
1031
>
},
1032
>
{
1033
>
type: ActionType.ChatTurnComplete,
1034
>
turnId,
1035
>
duration,
1036
>
},
1037
>
];
1038
>
}
1039
if (status === 'interrupted') {
1040
return [...preflightFlush, ...orphanedToolCallActions, { type: ActionType.ChatTurnCancelled, turnId, duration }];