Add CancelSessionAction and integrate into inline chat actions#297048
Merged
Add CancelSessionAction and integrate into inline chat actions#297048
Conversation
fixes pressing Cancel not doing anything
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds a new CancelSessionAction for inline chat to fix an issue where pressing Cancel was not working. The changes update the inline chat overlay widget to use the new action instead of the shared chat cancel action, and ensure proper separation between hover mode and non-hover mode cancel behaviors.
Changes:
- Added new
CancelSessionActionclass that extendsKeepOrUndoSessionActionto handle cancellation during inline chat sessions - Updated
InlineChatSessionOverlayWidgetto reference the new action ID'inlineChat2.cancel'instead ofCancelChatActionId - Registered the new action in the inline chat contribution file
- Modified
CancelActionin chatExecuteActions.ts to exclude hover mode from its menu visibility
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.ts | Adds CancelSessionAction class with keybindings, menu entries, and preconditions for handling cancel during inline chat requests |
| src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.ts | Registers the new CancelSessionAction |
| src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.ts | Updates action ID reference from CancelChatActionId to 'inlineChat2.cancel' and removes unused import |
| src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.ts | Adds CTX_HOVER_MODE.negate() condition to CancelAction menu to prevent it from showing in inline chat hover mode |
justschen
approved these changes
Feb 23, 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.
fixes pressing Cancel not doing anything