From e2c2a7db6ae49eeef996b23e23c215faa6c5b3a2 Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Wed, 25 Feb 2026 12:57:36 -0600 Subject: [PATCH] fix chat tip getting stuck when mode changes (#297744) fix #297287 --- .../workbench/contrib/chat/browser/widget/chatWidget.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts b/src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts index 9b1dea8a0be3..3238bb06704a 100644 --- a/src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts +++ b/src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts @@ -2076,6 +2076,14 @@ export class ChatWidget extends Disposable implements IChatWidget { this.chatSuggestNextWidget.hide(); this.chatTipService.resetSession(); + // Switching sessions resets tip service state; clear any rendered tip so + // empty-state rendering picks a fresh, context-appropriate tip. + this._gettingStartedTipPartRef = undefined; + this._gettingStartedTipPart.clear(); + const tipContainer = this.inputPart.gettingStartedTipContainerElement; + dom.clearNode(tipContainer); + dom.setVisibility(false, tipContainer); + this._codeBlockModelCollection.clear(); this.viewModel = this.instantiationService.createInstance(ChatViewModel, model, this._codeBlockModelCollection, undefined);