fix(cli): register extension lifecycle events in DebugProfiler (#20101)

Co-authored-by: Adib234 <30782825+Adib234@users.noreply.github.com>
This commit is contained in:
Eli Fayerman
2026-03-04 11:03:00 -05:00
committed by GitHub
parent 352fb0c976
commit 07d2187a76

View File

@@ -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--;
};
}, []);