mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
Checkpoint: File edits
Automatic checkpoint created by Claude Code - Branch: v3 - Timestamp: 2026-01-07T20:35:47Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
492bf83702
commit
652a810393
1 file changed
+9
-4
@@ -118,13 +118,18 @@ export class CLI {
|
||||
// Find and execute command
|
||||
const commandName = commandPath[0];
|
||||
// First check the parser's registry (for dynamically registered commands)
|
||||
// Then fall back to the static registry
|
||||
const command = this.parser.getCommand(commandName) || getCommand(commandName);
|
||||
// Then fall back to the static registry, then try lazy loading
|
||||
let command = this.parser.getCommand(commandName) || getCommand(commandName);
|
||||
|
||||
// If not found in sync registry, try lazy loading
|
||||
if (!command && hasCommand(commandName)) {
|
||||
command = await getCommandAsync(commandName);
|
||||
}
|
||||
|
||||
if (!command) {
|
||||
this.output.printError(`Unknown command: ${commandName}`);
|
||||
// Smart suggestions
|
||||
const availableCommands = Array.from(new Set(commands.map(c => c.name)));
|
||||
// Smart suggestions - include lazy-loadable commands in suggestions
|
||||
const availableCommands = Array.from(new Set([...commands.map(c => c.name), ...getCommandNames()]));
|
||||
const { message } = suggestCommand(commandName, availableCommands);
|
||||
this.output.writeln(this.output.dim(` ${message}`));
|
||||
process.exit(1);
|
||||
|
||||
Reference in new issue
Block a user