@lvce-editor/running-extensions-view 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1876,6 +1876,7 @@ const getMenuEntries = state => {
1876
1876
  id: 'separator2',
1877
1877
  label: ''
1878
1878
  }, {
1879
+ args,
1879
1880
  command: 'RunningExtensions.startProfile',
1880
1881
  flags: None$1,
1881
1882
  id: 'startProfile',
@@ -2562,8 +2563,27 @@ const setExtensions = (state, extensions) => {
2562
2563
  };
2563
2564
  };
2564
2565
 
2565
- const startProfile = async state => {
2566
- await invoke$3('ConfirmPrompt.prompt', extensionHostProfilingNotAvailable(), undefined);
2566
+ const startProfile = async (state, index) => {
2567
+ const {
2568
+ extensions,
2569
+ platform
2570
+ } = state;
2571
+ const extension = extensions[index];
2572
+ if (!extension) {
2573
+ return state;
2574
+ }
2575
+ if (platform !== Electron) {
2576
+ await invoke$3('ConfirmPrompt.prompt', extensionHostProfilingNotAvailable(), undefined);
2577
+ return state;
2578
+ }
2579
+ const windowId = await getWindowId();
2580
+ try {
2581
+ const uri = extension.isolated ? await invoke$1('ElectronDeveloper.takeWorkerCpuProfile', windowId, extension.workerName || extensionApiElectron(extension.id)) : await invoke$1('ElectronDeveloper.takeWindowCpuProfile', windowId);
2582
+ await invoke('Main.openUri', uri);
2583
+ } catch (error) {
2584
+ const message = error instanceof Error ? error.message : String(error);
2585
+ await invoke$3('ConfirmPrompt.prompt', message, undefined);
2586
+ }
2567
2587
  return state;
2568
2588
  };
2569
2589
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/running-extensions-view",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "Running Extensions View Worker",
5
5
  "repository": {
6
6
  "type": "git",