304
305
case ActionType.ChatTurnStarted: {
307
>
...state,
308
>
activeTurn: {
309
>
id: action.turnId,
310
>
startedAt: action.startedAt,
311
>
message: action.message,
312
>
responseParts: [],
313
>
usage: undefined,
314
>
},
315
>
};
316
>
next = {
317
>
...next,
318
>
status: withStatusFlag(summaryStatus(next), SessionStatus.IsRead, false),
319
>
modifiedAt: new Date(Date.now()).toISOString(),
320
>
};
321
>
322
>
// If this turn was auto-started from a pending message, remove it
323
>
if (action.queuedMessageId) {
324
if (next.steeringMessage?.id === action.queuedMessageId) {
325
next = { ...next, steeringMessage: undefined };