make sure to clear plan mode widget if canceled#314221
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates chat plan-review lifecycle handling so docked plan review UI is dismissed when a response is cancelled or later rendered in a completed state, preventing stale widgets from lingering above the input. It fits into the chat workbench model/rendering flow by coordinating response cancellation state in chatModel, runtime plan-review state in chatPlanReviewData, and cleanup in the list renderer.
Changes:
- Added a
dismiss()helper toChatPlanReviewDatato mark pending plan reviews as used, clear draft state, and resolve their deferred completion. - Updated
ChatResponseModel.cancel()to dismiss pending plan reviews (and question carousels) when a response is cancelled. - Updated the chat list renderer to always clear the docked plan-review widget once the response is complete, including the cancelled/reloaded case.
Show a summary per file
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatPlanReviewData.ts |
Adds centralized plan-review dismissal logic. |
src/vs/workbench/contrib/chat/common/model/chatModel.ts |
Hooks plan-review dismissal into response cancellation. |
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts |
Clears docked plan-review UI when the response completes/cancels. |
Copilot's findings
- Files reviewed: 3/3 changed files
- Comments generated: 1
aeschli
approved these changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
clears plan mode widget if we stop or reload.