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:
Tam Nhu Tran committed 2026-02-12 07:55:35 +07:00
1 parent 6af718626f
commit f9834c81c9
2 files changed
+10 -11

No files matched your search

+3 -8
View File
@@ -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);
}