From f0aff164822f5e248655eaeb87b70a0cd80860b7 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Fri, 12 Jan 2024 10:22:30 -0800 Subject: [PATCH] Dismiss the chat widget on dispose (#202363) --- .../notebook/browser/view/cellParts/chat/cellChatController.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.ts b/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.ts index f2f620ce9d9ba..1406eab2b188b 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.ts @@ -155,6 +155,8 @@ export class NotebookCellChatController extends Disposable { // might not be attached } + // dismiss since we can't restore the widget properly now + this.dismiss(false); this._widget?.dispose(); this._inlineChatListener?.dispose(); this._toolbar?.dispose();