Skip to content

Commit dfa22cc

Browse files
committed
simpler API use, microsoft#60332
1 parent 4580803 commit dfa22cc

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/vs/workbench/parts/extensions/electron-browser/extensionsAutoProfiler.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { IExtensionHostProfileService } from 'vs/workbench/parts/extensions/elec
1717
import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
1818
import { localize } from 'vs/nls';
1919
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
20-
import { Action } from 'vs/base/common/actions';
2120
import { RuntimeExtensionsInput } from 'vs/workbench/services/extensions/electron-browser/runtimeExtensionsInput';
2221

2322
export class ExtensionsAutoProfiler extends Disposable implements IWorkbenchContribution {
@@ -133,14 +132,15 @@ export class ExtensionsAutoProfiler extends Disposable implements IWorkbenchCont
133132
// user-facing message when very bad...
134133
const prompt = top.percentage >= 99 && top.total >= 5e6;
135134
if (prompt) {
136-
this._notificationService.notify({
137-
severity: Severity.Info,
138-
silent: true,
139-
message: localize('unresponsive-exthost', "Extension '{0}' froze the extension host for more than {1} seconds.", extension.displayName || extension.name, Math.round(duration / 1e6)),
140-
actions: {
141-
primary: [new Action('foo', localize('show', 'Show Extensions'), undefined, true, () => this._editorService.openEditor(new RuntimeExtensionsInput()))]
142-
}
143-
});
135+
this._notificationService.prompt(
136+
Severity.Info,
137+
localize('unresponsive-exthost', "Extension '{0}' froze the extension host for more than {1} seconds.", extension.displayName || extension.name, Math.round(duration / 1e6)),
138+
[{
139+
label: localize('show', 'Show Extensions'),
140+
run: () => this._editorService.openEditor(new RuntimeExtensionsInput())
141+
}],
142+
{ silent: true }
143+
);
144144
}
145145

146146
const path = join(tmpdir(), `exthost-${Math.random().toString(16).slice(2, 8)}.cpuprofile`);

0 commit comments

Comments
 (0)