fix(cli): improve error message for custom mode not found#4982
fix(cli): improve error message for custom mode not found#4982marius-kilocode merged 12 commits intomainfrom
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