mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-27 05:24:34 -07:00
Extensions MCP refactor (#12413)
This commit is contained in:
@@ -192,11 +192,9 @@ describe('loggers', () => {
|
||||
getFileFilteringRespectGitIgnore: () => true,
|
||||
getFileFilteringAllowBuildArtifacts: () => false,
|
||||
getDebugMode: () => true,
|
||||
getMcpServers: () => ({
|
||||
'test-server': {
|
||||
command: 'test-command',
|
||||
},
|
||||
}),
|
||||
getMcpServers: () => {
|
||||
throw new Error('Should not call');
|
||||
},
|
||||
getQuestion: () => 'test-question',
|
||||
getTargetDir: () => 'target-dir',
|
||||
getProxy: () => 'http://test.proxy.com:8080',
|
||||
@@ -206,6 +204,13 @@ describe('loggers', () => {
|
||||
{ name: 'ext-one', id: 'id-one' },
|
||||
{ name: 'ext-two', id: 'id-two' },
|
||||
] as GeminiCLIExtension[],
|
||||
getMcpClientManager: () => ({
|
||||
getMcpServers: () => ({
|
||||
'test-server': {
|
||||
command: 'test-command',
|
||||
},
|
||||
}),
|
||||
}),
|
||||
} as unknown as Config;
|
||||
|
||||
const startSessionEvent = new StartSessionEvent(mockConfig);
|
||||
|
||||
@@ -74,7 +74,8 @@ export class StartSessionEvent implements BaseTelemetryEvent {
|
||||
|
||||
constructor(config: Config, toolRegistry?: ToolRegistry) {
|
||||
const generatorConfig = config.getContentGeneratorConfig();
|
||||
const mcpServers = config.getMcpServers();
|
||||
const mcpServers =
|
||||
config.getMcpClientManager()?.getMcpServers() ?? config.getMcpServers();
|
||||
|
||||
let useGemini = false;
|
||||
let useVertex = false;
|
||||
|
||||
Reference in New Issue
Block a user