2543
2544
private async _disposeChat(session: URI, chat: URI): Promise<void> {
2546
return;
2547
}
2549
>
// Resolve the chat's backing SDK chat id — from the in-memory
2550
>
// session, the live backing map, or (for legacy sessions) a one-time
2551
>
// read of the agent's pre-orchestrator catalog — so we can delete it
2552
>
// from the SDK's on-disk store. Without this a fresh process could
2553
>
// re-resume an orphaned chat. The durable peer-chat catalog is
2554
>
// owned by the orchestrator now, so this no longer rewrites
2555
>
// `copilot.chats`; it only drops the live backing and SDK chat.
2556
>
let sdkSessionId = this._findPeerChat(session, chat)?.sessionId
2557
?? this._chatBackings.get(chatKey)?.sdkSessionId;
2559
const parsed = parseChatUri(chat);
2560
if (parsed) {