mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-05 19:01:12 -07:00
Refactor: Migrate CLI appEvents to Core coreEvents (#15737)
This commit is contained in:
@@ -5,9 +5,13 @@
|
||||
*/
|
||||
|
||||
import { useEffect, useState } from 'react';
|
||||
import { AppEvent, appEvents } from './../../utils/events.js';
|
||||
import { Box, Text } from 'ink';
|
||||
import { type McpClient, MCPServerStatus } from '@google/gemini-cli-core';
|
||||
import {
|
||||
CoreEvent,
|
||||
coreEvents,
|
||||
type McpClient,
|
||||
MCPServerStatus,
|
||||
} from '@google/gemini-cli-core';
|
||||
import { GeminiSpinner } from './GeminiRespondingSpinner.js';
|
||||
import { theme } from '../semantic-colors.js';
|
||||
|
||||
@@ -45,9 +49,9 @@ export const ConfigInitDisplay = () => {
|
||||
}
|
||||
};
|
||||
|
||||
appEvents.on(AppEvent.McpClientUpdate, onChange);
|
||||
coreEvents.on(CoreEvent.McpClientUpdate, onChange);
|
||||
return () => {
|
||||
appEvents.off(AppEvent.McpClientUpdate, onChange);
|
||||
coreEvents.off(CoreEvent.McpClientUpdate, onChange);
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user