@lvce-editor/file-search-worker 6.0.0 → 6.2.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.
@@ -2283,7 +2283,14 @@ const warn = (...args) => {
2283
2283
  const state$2 = {
2284
2284
  menuEntries: []
2285
2285
  };
2286
- const getAll = () => {
2286
+ const getAll = async () => {
2287
+ try {
2288
+ // @ts-ignore
2289
+ const entries = await invoke$1('Layout.getAllQuickPickMenuEntries');
2290
+ return entries || [];
2291
+ } catch {
2292
+ // ignore
2293
+ }
2287
2294
  return state$2.menuEntries;
2288
2295
  };
2289
2296
  const add = menuEntries => {
@@ -2292,7 +2299,7 @@ const add = menuEntries => {
2292
2299
 
2293
2300
  // TODO combine Ajax with cache (specify strategy: cacheFirst, networkFirst)
2294
2301
  const getBuiltinPicks = async () => {
2295
- const builtinPicks = getAll();
2302
+ const builtinPicks = await getAll();
2296
2303
  return builtinPicks;
2297
2304
  };
2298
2305
  const prefixIdWithExt = item => {
@@ -2310,6 +2317,7 @@ const prefixIdWithExt = item => {
2310
2317
  };
2311
2318
  const getExtensionPicks = async () => {
2312
2319
  try {
2320
+ // TODO ask extension host worker directly
2313
2321
  // TODO don't call this every time
2314
2322
  const extensionPicks = await invoke$1('ExtensionHost.getCommands');
2315
2323
  if (!extensionPicks) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-search-worker",
3
- "version": "6.0.0",
3
+ "version": "6.2.0",
4
4
  "keywords": [
5
5
  "text-search"
6
6
  ],