feat: add codebase context capabilities to gemini-cli (#1163)

* feat: add support for claude code context

- code context for:
  - add-task
  - update-subtask
  - update-task
  - update

* feat: fix CI and format + refactor

* chore: format

* chore: fix test

* feat: add gemini-cli support for codebase context

* feat: add google cli integration and fix tests

* chore: apply requested coderabbit changes

* chore: bump gemini cli package
This commit is contained in:
Ralph Khreish
2025-08-28 22:44:52 +02:00
committed by GitHub
parent 8783708e5e
commit 37af0f1912
28 changed files with 212 additions and 95 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,11 @@ 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 +506,7 @@ async function expandTask(
gatheredContext: gatheredContextText || '',
useResearch: useResearch,
expansionPrompt: expansionPromptText || undefined,
isClaudeCode: isClaudeCode,
hasCodebaseAnalysis: hasCodebaseAnalysisCapability,
projectRoot: projectRoot || ''
};