Skip to content

Conversation

@jruales
Copy link
Contributor

@jruales jruales commented Nov 4, 2025

Another partial fix for: microsoft/vscode#252415

@jruales jruales force-pushed the dev/jruales/command-not-found-default-case branch from 0d58c5b to 1849b78 Compare November 4, 2025 00:32
@jruales jruales marked this pull request as ready for review November 4, 2025 00:34
@jruales jruales requested review from bhavyaus and Copilot November 4, 2025 00:34
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 PR improves handling of VS Code commands that exist but have unmet preconditions. The changes provide better error messaging and fallback behavior when commands cannot be executed due to precondition failures.

Key changes:

  • Enhanced error handling in VSCodeCmdTool to differentiate between non-existent commands and commands with unmet preconditions
  • Updated vscodeContext.ts to always fetch commands without precondition filtering, ensuring more commands are discoverable
  • Improved error messages with consistent formatting (added backticks around command names)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/extension/tools/node/vscodeCmdTool.tsx Fixed typo (allcommandsallCommands), added fallback logic to check if command exists when preconditions aren't met, and improved error message consistency with backticks
src/extension/context/node/resolvers/vscodeContext.ts Changed to fetch commands without precondition filtering and added fallback to open command palette when command is not found
Comments suppressed due to low confidence (1)

src/extension/context/node/resolvers/vscodeContext.ts:78

  • Corrected grammar from '1 arguments' to '1 argument'.
				// We only know how to handle 1 arguments

bhavyaus
bhavyaus previously approved these changes Nov 4, 2025
@jruales jruales added this pull request to the merge queue Nov 4, 2025
@jruales jruales removed this pull request from the merge queue due to a manual request Nov 4, 2025
@jruales jruales force-pushed the dev/jruales/command-not-found-default-case branch from 9e8ffb8 to ef8f2d1 Compare November 4, 2025 01:16
@jruales jruales added this pull request to the merge queue Nov 4, 2025
@jruales jruales added this to the October 2025 milestone Nov 4, 2025
Merged via the queue into main with commit c395f40 Nov 4, 2025
16 checks passed
@jruales jruales deleted the dev/jruales/command-not-found-default-case branch November 4, 2025 01:41
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.

3 participants