1560
const sessionArchived = (sessionStatus & SessionStatus.IsArchived) === SessionStatus.IsArchived;
1561
if (isChatReadOnly(chatState?.interactivity, sessionArchived)) {
1563
? { errorType: 'archived', message: 'This session is archived and read-only. Restore the session to continue the conversation.' }
1564
: { errorType: 'readOnly', message: 'This chat is read-only.' };
1565
>
this._logService.warn(`[AgentSideEffects] Rejecting turn on read-only chat=${chat} (archived=${sessionArchived}), turnId=${turnId}`);
agentSideEffects.ts
1566
>
this._stateManager.dispatchServerAction(turnChannel, {
1567
>
type: ActionType.ChatError,
1568
>
turnId,
1569
>
duration: this._turnDuration(turnStopWatch),
1570
>
error,
1571
>
});
1572
>
this._turnTracker.turnCompleted(turnChannel, turnId, 'error', { stage: 'validation', error });
1573
>
this._toolCallTracker.clearSession(turnChannel);
1574
>
return;
1575
>
}
1576
1577
const chatUri = URI.parse(chat);