Skip to content

Commit 8982d70

Browse files
committed
CopilotCLI: Hide plan when switching sessions
1 parent 0c57652 commit 8982d70

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,6 +1981,19 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
19811981
this.clearQuestionCarousel();
19821982
}
19831983

1984+
let hasMatchingPlanReviewResource = false;
1985+
if (e.currentSessionResource) {
1986+
for (const r of this._planReviewSessionResources.values()) {
1987+
if (isEqual(r, e.currentSessionResource)) {
1988+
hasMatchingPlanReviewResource = true;
1989+
break;
1990+
}
1991+
}
1992+
}
1993+
if (this._planReviewSessionResources.size > 0 && (!e.currentSessionResource || !hasMatchingPlanReviewResource)) {
1994+
this.clearPlanReview();
1995+
}
1996+
19841997
// Swap the visible tool confirmation carousel for the new session
19851998
this._syncToolConfirmationCarouselForSession();
19861999

0 commit comments

Comments
 (0)