-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(cli): improve error message for custom mode not found #4982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Changed error from 'Invalid mode' to 'Mode not found' with search path details - Added SearchedPath interface and getSearchedPaths() export for error reporting - Added debug logging to help diagnose custom modes loading issues - Shows exactly where CLI searched for custom modes (global and project paths) - Added 14 unit tests for customModes.ts Fixes #4575, fixes #4600
🦋 Changeset detectedLatest commit: a30a4c5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge OverviewThis PR improves the error message when a custom mode is not found in the CLI. The changes:
The implementation is clean and well-structured. The code follows existing patterns in the codebase and includes proper TypeScript types. Files Reviewed (5 files)
|
Code Review SummaryStatus: No Issues Found | Recommendation: Merge OverviewThis PR improves the error message when a custom mode is not found in the CLI. The changes:
The implementation is clean and well-structured. The code follows existing patterns in the codebase and includes proper TypeScript types. Files Reviewed (6 files)
|
Summary
This PR improves the CLI error message when a custom mode is not found, addressing issues #4575 and #4600.
It follows up on #4861 and resolves conflicts.
Changes
cli/src/config/customModes.tsSearchedPathinterface to track search locationsgetSearchedPaths()export for error reportingcli/src/index.tscli/src/commands/mode.ts/modeslash command to use the same improved error messagegetSearchedPaths()for consistency between--modeflag and/modecommandcli/src/config/__tests__/customModes.test.tsBefore
After
Testing
Fixes #4575
Fixes #4600