1140
};
1141
}
1143
>
const snapshot = await this._agentService.subscribe(URI.parse(params.channel), client.clientId);
1144
>
client.subscriptions.set(classified.uri, classified);
1145
>
this._clearClientToolCallDisconnectTimeout(client.clientId, classified.uri);
1146
>
// `IStateSnapshot` is widened with `ChatState` (see sessionProtocol.ts);
1147
>
// the generated wire `Snapshot` union does not list it yet. The value
1148
>
// is JSON over the wire, so narrowing at this boundary is safe.
1149
>
return { snapshot: snapshot as SubscribeResult['snapshot'] };
1150
>
} catch (err) {
1151
if (err instanceof ProtocolError) {
1152
throw err;