mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-30 07:51:07 -07:00
Show notification when there's a conflict with an extensions command (#17890)
This commit is contained in:
@@ -127,6 +127,17 @@ export interface AgentsDiscoveredPayload {
|
||||
agents: AgentDefinition[];
|
||||
}
|
||||
|
||||
export interface SlashCommandConflict {
|
||||
name: string;
|
||||
renamedTo: string;
|
||||
loserExtensionName?: string;
|
||||
winnerExtensionName?: string;
|
||||
}
|
||||
|
||||
export interface SlashCommandConflictsPayload {
|
||||
conflicts: SlashCommandConflict[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Payload for the 'quota-changed' event.
|
||||
*/
|
||||
@@ -155,6 +166,7 @@ export enum CoreEvent {
|
||||
AgentsDiscovered = 'agents-discovered',
|
||||
RequestEditorSelection = 'request-editor-selection',
|
||||
EditorSelected = 'editor-selected',
|
||||
SlashCommandConflicts = 'slash-command-conflicts',
|
||||
QuotaChanged = 'quota-changed',
|
||||
}
|
||||
|
||||
@@ -185,6 +197,7 @@ export interface CoreEvents extends ExtensionEvents {
|
||||
[CoreEvent.AgentsDiscovered]: [AgentsDiscoveredPayload];
|
||||
[CoreEvent.RequestEditorSelection]: never[];
|
||||
[CoreEvent.EditorSelected]: [EditorSelectedPayload];
|
||||
[CoreEvent.SlashCommandConflicts]: [SlashCommandConflictsPayload];
|
||||
}
|
||||
|
||||
type EventBacklogItem = {
|
||||
@@ -322,6 +335,11 @@ export class CoreEventEmitter extends EventEmitter<CoreEvents> {
|
||||
this._emitOrQueue(CoreEvent.AgentsDiscovered, payload);
|
||||
}
|
||||
|
||||
emitSlashCommandConflicts(conflicts: SlashCommandConflict[]): void {
|
||||
const payload: SlashCommandConflictsPayload = { conflicts };
|
||||
this._emitOrQueue(CoreEvent.SlashCommandConflicts, payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notifies subscribers that the quota has changed.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user