2099
this._logService.info(`[Copilot:${context.sessionId}] sendMessage: cachedEntry=${hadCachedEntry}, hasActiveClient=${!!activeClient}, activeClientId=${activeClient ? '(set)' : '(none)'}`);
2100
if (entry && activeClient && await activeClient.requiresRestart(entry.appliedSnapshot)) {
2101
>
this._logService.info(`[Copilot:${context.sessionId}] Session config changed (requiresRestart=true), refreshing session. clients=[${[...activeClient.toolSet.clientIds()].join(', ') || '(none)'}]`);
copilotAgent.ts
2102
>
// Finish disconnecting before resuming the same SDK session id.
2103
>
await entry.destroySession();
2104
>
this._sessions.get(context.sessionId)?.clearDefaultChat();
2105
>
entry = undefined;
2106
>
}
2107
2108
if (!entry) {
2109
>
this._logService.info(`[Copilot:${context.sessionId}] No cached entry${hadCachedEntry ? ' (was evicted by requiresRestart)' : ''}, calling _resumeSession`);
copilotAgent.ts
2110
>
}
2111
entry ??= await this._resumeSession(context.sessionId);
2113
>
// Reset per-turn streaming state on the session so that the
2114
>
// next text/reasoning chunk (and any host-emitted announcement)
2115
>
// allocates a fresh response part.
2116
if (turnId) {
2117
entry.resetTurnState(turnId, senderClientId);