feat: add optional feature flag for code context (#1165)

* feat: add featureFlag for codebase analysis

* chore: add changeset

* chore: run format
This commit is contained in:
Ralph Khreish
2025-08-29 00:28:00 +02:00
committed by GitHub
parent be0c0f267c
commit c4f92f6a0a
14 changed files with 98 additions and 38 deletions

View File

@@ -426,7 +426,11 @@ async function addTask(
useResearch,
priority: effectivePriority,
dependencies: numericDependencies,
hasCodebaseAnalysis: hasCodebaseAnalysis(useResearch, projectRoot),
hasCodebaseAnalysis: hasCodebaseAnalysis(
useResearch,
projectRoot,
session
),
projectRoot: projectRoot
}
);

View File

@@ -419,7 +419,11 @@ async function analyzeTaskComplexity(options, context = {}) {
tasks: tasksData.tasks,
gatheredContext: gatheredContext || '',
useResearch: useResearch,
hasCodebaseAnalysis: hasCodebaseAnalysis(useResearch, projectRoot),
hasCodebaseAnalysis: hasCodebaseAnalysis(
useResearch,
projectRoot,
session
),
projectRoot: projectRoot || ''
};

View File

@@ -458,7 +458,8 @@ async function expandTask(
// Check if a codebase analysis provider is being used
const hasCodebaseAnalysisCapability = hasCodebaseAnalysis(
useResearch,
projectRoot
projectRoot,
session
);
// Combine all context sources into a single additionalContext parameter

View File

@@ -77,7 +77,7 @@ export class PrdParseConfig {
* Check if codebase analysis is available (Claude Code or Gemini CLI)
*/
hasCodebaseAnalysis() {
return hasCodebaseAnalysis(this.research, this.projectRoot);
return hasCodebaseAnalysis(this.research, this.projectRoot, this.session);
}
}

View File

@@ -232,7 +232,11 @@ async function updateSubtaskById(
updatePrompt: prompt,
useResearch: useResearch,
gatheredContext: gatheredContext || '',
hasCodebaseAnalysis: hasCodebaseAnalysis(useResearch, projectRoot),
hasCodebaseAnalysis: hasCodebaseAnalysis(
useResearch,
projectRoot,
session
),
projectRoot: projectRoot
};

View File

@@ -458,7 +458,11 @@ async function updateTaskById(
useResearch: useResearch,
currentDetails: taskToUpdate.details || '(No existing details)',
gatheredContext: gatheredContext || '',
hasCodebaseAnalysis: hasCodebaseAnalysis(useResearch, projectRoot),
hasCodebaseAnalysis: hasCodebaseAnalysis(
useResearch,
projectRoot,
session
),
projectRoot: projectRoot
};

View File

@@ -436,7 +436,11 @@ async function updateTasks(
updatePrompt: prompt,
useResearch,
projectContext: gatheredContext,
hasCodebaseAnalysis: hasCodebaseAnalysis(useResearch, projectRoot),
hasCodebaseAnalysis: hasCodebaseAnalysis(
useResearch,
projectRoot,
session
),
projectRoot: projectRoot
}
);