fix(cursor): use getCursorConfig(), fix help text and stub messages

This commit is contained in:
Tam Nhu Tran
2026-02-12 07:31:02 +07:00
parent 4ca4a9d2ab
commit 2ba826bb72
4 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -555,7 +555,7 @@ async function main(): Promise<void> {
// Special case: cursor command (Cursor IDE integration)
// Only route to command handler for known subcommands, otherwise treat as profile
// NOTE: Bare `ccs cursor` falls through to profile detection by design (differs from copilot routing)
// Bare 'ccs cursor' falls through to profile detection (reserved name). Subcommands required.
// 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' && args.length > 1 && CURSOR_SUBCOMMANDS.includes(args[1])) {
+1 -1
View File
@@ -10,6 +10,6 @@
*/
export async function handleCursorCommand(_args: string[]): Promise<number> {
console.error('[!] Cursor command not yet implemented (task #520)');
console.error(' Available after cursor-command.ts is created');
console.error(' Full implementation coming in task #520.');
return 1;
}
+1 -1
View File
@@ -230,7 +230,7 @@ Run ${color('ccs config', 'command')} for web dashboard`.trim();
'Auto-detects token from Cursor installation',
],
[
['ccs cursor', 'Use Cursor IDE integration'],
['ccs cursor <cmd>', 'Use Cursor IDE integration'],
['ccs cursor auth', 'Import Cursor token'],
['ccs cursor status', 'Show connection status'],
['ccs cursor models', 'List available models'],
@@ -8,7 +8,11 @@ import * as fs from 'fs';
import * as path from 'path';
import { getCcsDir } from '../../utils/config-manager';
import { DEFAULT_CURSOR_CONFIG } from '../../config/unified-config-types';
import { loadOrCreateUnifiedConfig, saveUnifiedConfig } from '../../config/unified-config-loader';
import {
loadOrCreateUnifiedConfig,
saveUnifiedConfig,
getCursorConfig,
} from '../../config/unified-config-loader';
const router = Router();
@@ -17,8 +21,7 @@ const router = Router();
*/
router.get('/', (_req: Request, res: Response): void => {
try {
const config = loadOrCreateUnifiedConfig();
const cursorConfig = config.cursor ?? DEFAULT_CURSOR_CONFIG;
const cursorConfig = getCursorConfig();
res.json(cursorConfig);
} catch (error) {
res.status(500).json({ error: (error as Error).message });
@@ -84,8 +87,7 @@ router.put('/', (req: Request, res: Response): void => {
router.get('/raw', (_req: Request, res: Response): void => {
try {
const settingsPath = path.join(getCcsDir(), 'cursor.settings.json');
const config = loadOrCreateUnifiedConfig();
const cursorConfig = config.cursor ?? DEFAULT_CURSOR_CONFIG;
const cursorConfig = getCursorConfig();
// If file doesn't exist, return default structure
if (!fs.existsSync(settingsPath)) {