Add MCP loading indicator when initializing Gemini CLI (#6923)

This commit is contained in:
Pascal Birchler
2025-08-28 21:53:56 +02:00
committed by GitHub
parent ecdea602a3
commit 03bcbcc10d
5 changed files with 96 additions and 7 deletions
+5 -1
View File
@@ -54,6 +54,7 @@ import type { AnyToolInvocation } from '../tools/tools.js';
import { WorkspaceContext } from '../utils/workspaceContext.js';
import { Storage } from './storage.js';
import { FileExclusions } from '../utils/ignorePatterns.js';
import type { EventEmitter } from 'node:events';
export enum ApprovalMode {
DEFAULT = 'default',
@@ -207,6 +208,7 @@ export interface ConfigParameters {
skipNextSpeakerCheck?: boolean;
extensionManagement?: boolean;
enablePromptCompletion?: boolean;
eventEmitter?: EventEmitter;
}
export class Config {
@@ -282,6 +284,7 @@ export class Config {
private initialized: boolean = false;
readonly storage: Storage;
private readonly fileExclusions: FileExclusions;
private readonly eventEmitter?: EventEmitter;
constructor(params: ConfigParameters) {
this.sessionId = params.sessionId;
@@ -356,6 +359,7 @@ export class Config {
this.storage = new Storage(this.targetDir);
this.enablePromptCompletion = params.enablePromptCompletion ?? false;
this.fileExclusions = new FileExclusions(this);
this.eventEmitter = params.eventEmitter;
if (params.contextFileName) {
setGeminiMdFilename(params.contextFileName);
@@ -803,7 +807,7 @@ export class Config {
}
async createToolRegistry(): Promise<ToolRegistry> {
const registry = new ToolRegistry(this);
const registry = new ToolRegistry(this, this.eventEmitter);
// helper to create & register core tools that are enabled
// eslint-disable-next-line @typescript-eslint/no-explicit-any