fix(cursor): harden runtime follow-up regressions

This commit is contained in:
Tam Nhu Tran committed 2026-04-02 03:21:38 -04:00
1 parent 2d67f40175
commit f7ddad6c19
7 files changed
+126 -32

No files matched your search

@@ -6,6 +6,7 @@ import * as path from 'path';
import {
executeCursorProfile,
generateCursorEnv,
resolveCursorImageAnalysisEnv,
} from '../../../src/cursor/cursor-profile-executor';
import { saveCredentials } from '../../../src/cursor/cursor-auth';
import type { CursorConfig } from '../../../src/config/unified-config-types';
@@ -57,6 +58,14 @@ describe('cursor-profile-executor', () => {
expect(env.CLAUDE_CONFIG_DIR).toBe('/tmp/claude-config');
});
it('skips image-analysis provider routing for cursor unless explicitly mapped', async () => {
const { env, warning } = await resolveCursorImageAnalysisEnv();
expect(env.CCS_CURRENT_PROVIDER).toBe('');
expect(env.CCS_IMAGE_ANALYSIS_SKIP).toBe('1');
expect(warning).toBeNull();
});
it('fails fast when Cursor integration is disabled', async () => {
const exitCode = await executeCursorProfile({ ...BASE_CONFIG, enabled: false }, []);
expect(exitCode).toBe(1);