feat: add gemini-cli support for codebase context

This commit is contained in:
Ralph Khreish
2025-08-28 18:12:31 +02:00
parent 7fd751a5b8
commit 9f8cb08515
15 changed files with 50 additions and 48 deletions

View File

@@ -21,13 +21,11 @@ import { generateTextService } from '../ai-services-unified.js';
import {
getDefaultSubtasks,
getDebugFlag,
getMainProvider,
getResearchProvider
hasCodebaseAnalysis
} from '../config-manager.js';
import { getPromptManager } from '../prompt-manager.js';
import generateTaskFiles from './generate-task-files.js';
import { COMPLEXITY_REPORT_FILE } from '../../../src/constants/paths.js';
import { CUSTOM_PROVIDERS } from '../../../src/constants/providers.js';
import { ContextGatherer } from '../utils/contextGatherer.js';
import { FuzzyTaskSearch } from '../utils/fuzzyTaskSearch.js';
import { flattenTasksWithSubtasks, findProjectRoot } from '../utils.js';
@@ -457,11 +455,8 @@ async function expandTask(
// Load prompts using PromptManager
const promptManager = getPromptManager();
// Check if Claude Code is being used as the provider
const currentProvider = useResearch
? getResearchProvider(projectRoot)
: getMainProvider(projectRoot);
const isClaudeCode = currentProvider === CUSTOM_PROVIDERS.CLAUDE_CODE;
// Check if a codebase analysis provider is being used
const hasCodebaseAnalysisCapability = hasCodebaseAnalysis(useResearch, projectRoot);
// Combine all context sources into a single additionalContext parameter
let combinedAdditionalContext = '';
@@ -508,7 +503,7 @@ async function expandTask(
gatheredContext: gatheredContextText || '',
useResearch: useResearch,
expansionPrompt: expansionPromptText || undefined,
isClaudeCode: isClaudeCode,
hasCodebaseAnalysis: hasCodebaseAnalysisCapability,
projectRoot: projectRoot || ''
};