chore: fix test

This commit is contained in:
Ralph Khreish
2025-08-28 18:00:10 +02:00
parent a9c548e8ae
commit 7112a1d10b
3 changed files with 1504 additions and 415 deletions

File diff suppressed because one or more lines are too long

View File

@@ -17,7 +17,8 @@ import {
getDebugFlag, getDebugFlag,
getProjectName, getProjectName,
getMainProvider, getMainProvider,
getResearchProvider getResearchProvider,
isClaudeCode
} from '../config-manager.js'; } from '../config-manager.js';
import { getPromptManager } from '../prompt-manager.js'; import { getPromptManager } from '../prompt-manager.js';
import { import {
@@ -415,16 +416,12 @@ async function analyzeTaskComplexity(options, context = {}) {
const promptManager = getPromptManager(); const promptManager = getPromptManager();
// Check if Claude Code is being used as the provider // Check if Claude Code is being used as the provider
const currentProvider = useResearch
? getResearchProvider(projectRoot)
: getMainProvider(projectRoot);
const isClaudeCode = currentProvider === CUSTOM_PROVIDERS.CLAUDE_CODE;
const promptParams = { const promptParams = {
tasks: tasksData.tasks, tasks: tasksData.tasks,
gatheredContext: gatheredContext || '', gatheredContext: gatheredContext || '',
useResearch: useResearch, useResearch: useResearch,
isClaudeCode: isClaudeCode, isClaudeCode: isClaudeCode(useResearch, projectRoot),
projectRoot: projectRoot || '' projectRoot: projectRoot || ''
}; };

View File

@@ -301,7 +301,8 @@ jest.unstable_mockModule(
// Additional functions // Additional functions
getAllProviders: jest.fn(() => ['anthropic', 'openai', 'perplexity']), getAllProviders: jest.fn(() => ['anthropic', 'openai', 'perplexity']),
getVertexProjectId: jest.fn(() => undefined), getVertexProjectId: jest.fn(() => undefined),
getVertexLocation: jest.fn(() => undefined) getVertexLocation: jest.fn(() => undefined),
isClaudeCode: jest.fn(() => false)
}) })
); );