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:
@@ -52,7 +52,8 @@ jest.unstable_mockModule('../../scripts/modules/config-manager.js', () => ({
|
||||
VALID_PROVIDERS: ['anthropic', 'perplexity'],
|
||||
validateProvider: jest.fn(() => true),
|
||||
validateProviderModelCombination: jest.fn(() => true),
|
||||
isApiKeySet: jest.fn(() => true)
|
||||
isApiKeySet: jest.fn(() => true),
|
||||
hasCodebaseAnalysis: jest.fn(() => false)
|
||||
}));
|
||||
|
||||
// Mock utils comprehensively to prevent CLI behavior
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* Tests for the add-task.js module
|
||||
*/
|
||||
import { jest } from '@jest/globals';
|
||||
import { hasCodebaseAnalysis } from '../../../../../scripts/modules/config-manager.js';
|
||||
|
||||
// Mock the dependencies before importing the module under test
|
||||
jest.unstable_mockModule('../../../../../scripts/modules/utils.js', () => ({
|
||||
@@ -100,7 +101,7 @@ jest.unstable_mockModule(
|
||||
'../../../../../scripts/modules/config-manager.js',
|
||||
() => ({
|
||||
getDefaultPriority: jest.fn(() => 'medium'),
|
||||
isClaudeCode: jest.fn(() => false)
|
||||
hasCodebaseAnalysis: jest.fn(() => false)
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
createGetTagAwareFilePathMock,
|
||||
createSlugifyTagForFilePathMock
|
||||
} from './setup.js';
|
||||
import { hasCodebaseAnalysis } from '../../../../../scripts/modules/config-manager.js';
|
||||
|
||||
// Mock the dependencies before importing the module under test
|
||||
jest.unstable_mockModule('../../../../../scripts/modules/utils.js', () => ({
|
||||
@@ -188,7 +189,7 @@ jest.unstable_mockModule(
|
||||
getAllProviders: jest.fn(() => ['anthropic', 'openai', 'perplexity']),
|
||||
getVertexProjectId: jest.fn(() => undefined),
|
||||
getVertexLocation: jest.fn(() => undefined),
|
||||
isClaudeCode: jest.fn(() => false)
|
||||
hasCodebaseAnalysis: jest.fn(() => false)
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
import { jest } from '@jest/globals';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { hasCodebaseAnalysis } from '../../../../../scripts/modules/config-manager.js';
|
||||
|
||||
// Mock the dependencies
|
||||
jest.unstable_mockModule('../../../../../src/utils/path-utils.js', () => ({
|
||||
@@ -302,7 +303,7 @@ jest.unstable_mockModule(
|
||||
getAllProviders: jest.fn(() => ['anthropic', 'openai', 'perplexity']),
|
||||
getVertexProjectId: jest.fn(() => undefined),
|
||||
getVertexLocation: jest.fn(() => undefined),
|
||||
isClaudeCode: jest.fn(() => false)
|
||||
hasCodebaseAnalysis: jest.fn(() => false)
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
@@ -125,7 +125,8 @@ jest.unstable_mockModule(
|
||||
getDebugFlag: jest.fn(() => false),
|
||||
getDefaultNumTasks: jest.fn(() => 10),
|
||||
getMainProvider: jest.fn(() => 'openai'),
|
||||
getResearchProvider: jest.fn(() => 'perplexity')
|
||||
getResearchProvider: jest.fn(() => 'perplexity'),
|
||||
hasCodebaseAnalysis: jest.fn(() => false)
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
@@ -187,7 +187,8 @@ jest.unstable_mockModule(
|
||||
getDefaultNumTasks: jest.fn(() => 10),
|
||||
getDefaultPriority: jest.fn(() => 'medium'),
|
||||
getMainProvider: jest.fn(() => 'openai'),
|
||||
getResearchProvider: jest.fn(() => 'perplexity')
|
||||
getResearchProvider: jest.fn(() => 'perplexity'),
|
||||
hasCodebaseAnalysis: jest.fn(() => false)
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ jest.unstable_mockModule(
|
||||
'../../../../../scripts/modules/config-manager.js',
|
||||
() => ({
|
||||
getDebugFlag: jest.fn(() => false),
|
||||
isClaudeCode: jest.fn(() => false)
|
||||
hasCodebaseAnalysis: jest.fn(() => false)
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ jest.unstable_mockModule(
|
||||
() => ({
|
||||
getDebugFlag: jest.fn(() => false),
|
||||
isApiKeySet: jest.fn(() => true),
|
||||
isClaudeCode: jest.fn(() => false)
|
||||
hasCodebaseAnalysis: jest.fn(() => false)
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ jest.unstable_mockModule(
|
||||
'../../../../../scripts/modules/config-manager.js',
|
||||
() => ({
|
||||
getDebugFlag: jest.fn(() => false),
|
||||
isClaudeCode: jest.fn(() => false)
|
||||
hasCodebaseAnalysis: jest.fn(() => false)
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user