diff --git a/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts b/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts index 1a4b90632fb524..8e579717a74788 100644 --- a/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts +++ b/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts @@ -1934,7 +1934,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge // when the session type changes (different session types may have // different model pools via targetChatSessionType). const newSessionType = this.getCurrentSessionType(); - if (newSessionType !== this._currentSessionType) { + if (e.currentSessionResource && newSessionType !== this._currentSessionType) { this._currentSessionType = newSessionType; this.initSelectedModel(); }