Skip to content

Comments

Add CancelSessionAction and integrate into inline chat actions#297048

Merged
jrieken merged 2 commits intomainfrom
joh/healthy-beetle
Feb 23, 2026
Merged

Add CancelSessionAction and integrate into inline chat actions#297048
jrieken merged 2 commits intomainfrom
joh/healthy-beetle

Conversation

@jrieken
Copy link
Member

@jrieken jrieken commented Feb 23, 2026

fixes pressing Cancel not doing anything

fixes pressing Cancel not doing anything
Copilot AI review requested due to automatic review settings February 23, 2026 17:47
@jrieken jrieken enabled auto-merge (squash) February 23, 2026 17:47
@jrieken jrieken self-assigned this Feb 23, 2026
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 23, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 CancelSessionAction class that extends KeepOrUndoSessionAction to handle cancellation during inline chat sessions
  • Updated InlineChatSessionOverlayWidget to reference the new action ID 'inlineChat2.cancel' instead of CancelChatActionId
  • Registered the new action in the inline chat contribution file
  • Modified CancelAction in 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

@jrieken jrieken merged commit b7238ce into main Feb 23, 2026
20 checks passed
@jrieken jrieken deleted the joh/healthy-beetle branch February 23, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants