@lvce-editor/quick-pick-worker 4.29.0 → 4.29.2

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.
@@ -2927,7 +2927,7 @@ const getPicks$c = async () => {
2927
2927
  const emptyMatches = [];
2928
2928
 
2929
2929
  const getWorkspacePath = async () => {
2930
- return invoke$4('Workspace.getPath');
2930
+ return invoke$4('Workspace.getUri');
2931
2931
  };
2932
2932
 
2933
2933
  const state$1 = {};
@@ -3099,7 +3099,14 @@ const getPicks$b = async searchValue => {
3099
3099
  // If preferences are unavailable, preserve the existing uncached search behavior.
3100
3100
  }
3101
3101
  const cached = cacheEnabled ? await get(workspace) : undefined;
3102
- const response = await searchFile(workspace, searchValue, true, '', cacheEnabled ? cached?.hash ?? null : undefined);
3102
+ let response;
3103
+ try {
3104
+ response = await searchFile(workspace, searchValue, true, '', cacheEnabled ? cached?.hash ?? null : undefined);
3105
+ } catch (error) {
3106
+ const message = error instanceof Error ? error.message : String(error);
3107
+ await invoke$4('Notification.create', 'error', `Could not search workspace files: ${message}`);
3108
+ return [];
3109
+ }
3103
3110
  let files;
3104
3111
  if (isFileList(response)) {
3105
3112
  files = response;
@@ -3581,7 +3588,7 @@ const shouldHide = item => {
3581
3588
  return true;
3582
3589
  };
3583
3590
 
3584
- const selectPickBuiltin = async item => {
3591
+ const selectPickBuiltin = async (item, applicationId) => {
3585
3592
  if (item.id === 'QuickPick.showColorTheme') {
3586
3593
  return {
3587
3594
  command: OpenColorTheme
@@ -3594,7 +3601,11 @@ const selectPickBuiltin = async item => {
3594
3601
  }
3595
3602
  const args = item.args || [];
3596
3603
  // TODO ids should be all numbers for efficiency -> also directly can call command
3597
- await invoke$4(item.id, ...args);
3604
+ if (applicationId === undefined) {
3605
+ await invoke$4(item.id, ...args);
3606
+ } else {
3607
+ await invoke$4('Application.execute', applicationId, item.id, ...args);
3608
+ }
3598
3609
  if (shouldHide(item)) {
3599
3610
  return {
3600
3611
  command: Hide
@@ -3631,7 +3642,7 @@ const selectPick$b = async (item, _value = '', applicationId) => {
3631
3642
  if (id.startsWith('ext.')) {
3632
3643
  return selectPickExtension(item, applicationId);
3633
3644
  }
3634
- return selectPickBuiltin(item);
3645
+ return selectPickBuiltin(item, applicationId);
3635
3646
  };
3636
3647
 
3637
3648
  const getOptions = args => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/quick-pick-worker",
3
- "version": "4.29.0",
3
+ "version": "4.29.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/lvce-editor/quick-pick-worker.git"