mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-15 10:14:36 +00:00
fix(cursor): add enabled field to tests, simplify cursor routing
- Add missing enabled field to CursorConfig in test assertions - Consolidate duplicate dynamic import in ccs.ts cursor routing
This commit is contained in:
1 parent
6af718626f
commit
f9834c81c9
2 files changed
+10
-11
No files matched your search
+3
-8
@@ -558,15 +558,10 @@ async function main(): Promise<void> {
|
||||
// Note: cursor does not have enable/disable — it uses daemon start/stop instead
|
||||
const CURSOR_SUBCOMMANDS = ['auth', 'status', 'models', 'start', 'stop', 'help', '--help', '-h'];
|
||||
if (firstArg === 'cursor') {
|
||||
if (args.length > 1 && CURSOR_SUBCOMMANDS.includes(args[1])) {
|
||||
// `ccs cursor <subcommand>` - route to cursor command handler
|
||||
const { handleCursorCommand } = await import('./commands/cursor-command');
|
||||
const exitCode = await handleCursorCommand(args.slice(1));
|
||||
process.exit(exitCode);
|
||||
}
|
||||
// Bare `ccs cursor` - show help instead of reserved-name error
|
||||
const { handleCursorCommand } = await import('./commands/cursor-command');
|
||||
const exitCode = await handleCursorCommand([]);
|
||||
const exitCode = await handleCursorCommand(
|
||||
args.length > 1 && CURSOR_SUBCOMMANDS.includes(args[1]) ? args.slice(1) : []
|
||||
);
|
||||
process.exit(exitCode);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user