mirror of
https://github.com/google-gemini/gemini-cli
synced 2026-04-21 13:37:17 +00:00
fix(cli): register extension lifecycle events in DebugProfiler (#20101)
Co-authored-by: Adib234 <30782825+Adib234@users.noreply.github.com>
This commit is contained in:
parent
352fb0c976
commit
07d2187a76
1 changed files with 14 additions and 0 deletions
|
|
@ -171,6 +171,16 @@ export const DebugProfiler = () => {
|
|||
appEvents.on(eventName, handler);
|
||||
}
|
||||
|
||||
// Register handlers for extension lifecycle events emitted on coreEvents
|
||||
// but not part of the CoreEvent enum, to prevent false-positive idle warnings.
|
||||
const extensionEvents = [
|
||||
'extensionsStarting',
|
||||
'extensionsStopping',
|
||||
] as const;
|
||||
for (const eventName of extensionEvents) {
|
||||
coreEvents.on(eventName, handler);
|
||||
}
|
||||
|
||||
return () => {
|
||||
stdin.off('data', handler);
|
||||
stdout.off('resize', handler);
|
||||
|
|
@ -183,6 +193,10 @@ export const DebugProfiler = () => {
|
|||
appEvents.off(eventName, handler);
|
||||
}
|
||||
|
||||
for (const eventName of extensionEvents) {
|
||||
coreEvents.off(eventName, handler);
|
||||
}
|
||||
|
||||
profiler.profilersActive--;
|
||||
};
|
||||
}, []);
|
||||
|
|
|
|||
Loading…
Reference in a new issue