1836
}
1837
if (!snapshot) {
1838
>
// Chat channel URIs carry their owning session URI. The chat
agentService.ts
1839
>
// snapshot only materializes once that session is restored
1840
>
// (which seeds the default chat state), so restore the parent
1841
>
// session rather than the chat URI itself. This makes the
1842
>
// chat-channel subscribe self-sufficient and independent of
1843
>
// whether the session channel was subscribed first.
1844
>
const parsedChatSession = parseDefaultChatUri(resourceStr);
1845
>
if (parsedChatSession !== undefined) {
1846
if (!this._stateManager.getSessionState(parsedChatSession)) {
1847
const parentUri = URI.parse(parsedChatSession);