Gate tip.planMode on the openPlan command being registered - #328262
Merged
Megan Rogge (meganrogge) merged 6 commits intoAug 3, 2026
Merged
Conversation
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix unhandled error for chat open plan command
Gate tip.planMode on the openPlan command being registered
Jul 30, 2026
Megan Rogge (meganrogge)
approved these changes
Jul 30, 2026
Megan Rogge (meganrogge)
marked this pull request as ready for review
July 30, 2026 21:09
Megan Rogge (meganrogge)
enabled auto-merge (squash)
July 30, 2026 21:09
Contributor
There was a problem hiding this comment.
Pull request overview
Prevents the Plan mode tip from linking to an unavailable command.
Changes:
- Adds required-command metadata to chat tips.
- Filters tips using command registration.
- Tests Plan tip exclusion when its command is unavailable.
Show a summary per file
| File | Description |
|---|---|
chatTipCatalog.ts |
Marks the Plan tip as requiring openPlan. |
chatTipService.ts |
Checks required commands during eligibility. |
chatTipService.test.ts |
Covers registered and unavailable Plan commands. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Medium
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Megan Rogge (meganrogge)
approved these changes
Jul 30, 2026
Collaborator
|
Copilot resolve the merge conflicts in this pull request |
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Contributor
Author
Megan Rogge (meganrogge)
approved these changes
Jul 31, 2026
…ty up to date Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Megan Rogge (meganrogge)
approved these changes
Aug 3, 2026
Megan Rogge (meganrogge)
enabled auto-merge (squash)
August 3, 2026 20:47
Megan Rogge (meganrogge)
approved these changes
Aug 3, 2026
Paul (pwang347)
approved these changes
Aug 3, 2026
Dmitriy Vasyura (dmitrivMS)
approved these changes
Aug 3, 2026
Megan Rogge (meganrogge)
deleted the
copilot/fix-unhandled-error-chat-command
branch
August 3, 2026 21:13
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Clicking the "Plan agent" link in the
tip.planModechat tip threwcommand 'workbench.action.chat.openPlan' not found.workbench.action.chat.openPlanis not a built-in command — "Plan" is a custom chat mode, and its open-command is registered dynamically byModeActionsContributiononly when a Plan mode is present in the focused widget. The tip'swhenclause (chatModeName != 'Plan') is true for everyone not currently in Plan mode, including users with no Plan mode at all, so the tip and its dead command link were shown even though the command was never registered.Changes
chatTipCatalog.ts— Added optionalrequiresCommands?: readonly string[]toITipDefinition; setrequiresCommands: ['workbench.action.chat.openPlan']ontip.planMode.chatTipService.ts—_isEligiblenow skips a tip when any of itsrequiresCommandsis absent fromCommandsRegistry.chatTipService.test.ts— RegisteropenPlaninsetup()(mirrors "Plan mode available"); added a test assertingtip.planModeis never shown when the command is unregistered.This is reusable: any tip linking to an optionally-available command can guard itself the same way to avoid "command not found" errors.