feat: add prompt for claude code to include context when generating tasks

This commit is contained in:
Ralph Khreish
2025-08-06 12:17:49 +02:00
parent ca4d93ee6a
commit 36468f3c93
7 changed files with 82 additions and 9 deletions

View File

@@ -19,6 +19,7 @@ import {
COMPLEXITY_REPORT_FILE,
LEGACY_TASKS_FILE
} from '../../../src/constants/paths.js';
import { CUSTOM_PROVIDERS } from '../../../src/constants/providers.js';
import { resolveComplexityReportOutputPath } from '../../../src/utils/path-utils.js';
import { ContextGatherer } from '../utils/contextGatherer.js';
import { FuzzyTaskSearch } from '../utils/fuzzyTaskSearch.js';
@@ -408,10 +409,17 @@ async function analyzeTaskComplexity(options, context = {}) {
// Load prompts using PromptManager
const promptManager = getPromptManager();
// Check if Claude Code is being used as the provider
const { getMainProvider, getResearchProvider } = await import('../config-manager.js');
const currentProvider = useResearch ? getResearchProvider(projectRoot) : getMainProvider(projectRoot);
const isClaudeCode = currentProvider === CUSTOM_PROVIDERS.CLAUDE_CODE;
const promptParams = {
tasks: tasksData.tasks,
gatheredContext: gatheredContext || '',
useResearch: useResearch
useResearch: useResearch,
isClaudeCode: isClaudeCode,
projectRoot: projectRoot || ''
};
const { systemPrompt, userPrompt: prompt } = await promptManager.loadPrompt(