@lvce-editor/quick-pick-worker 4.11.0 → 4.12.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.
@@ -3304,6 +3304,10 @@ const isQuickInput = args => {
3304
3304
  const options = args.at(-1);
3305
3305
  return options?.mode === 'quickInput';
3306
3306
  };
3307
+ const isStaticQuickInput = args => {
3308
+ const options = args.at(-1);
3309
+ return options?.mode === 'quickInput' && options.quickInputId === undefined;
3310
+ };
3307
3311
 
3308
3312
  // TODO when user types letters -> no need to query provider again -> just filter existing results
3309
3313
  const setValue = async (state, newValue) => {
@@ -3324,11 +3328,12 @@ const setValue = async (state, newValue) => {
3324
3328
  }
3325
3329
  const prefix = getQuickPickPrefix(newValue);
3326
3330
  const subId = getQuickPickSubProviderId(providerId, prefix);
3327
- const newPicks = subId === LanguageMode$1 ? state.picks : await getPicks(subId, newValue, args, {
3331
+ const quickInput = isQuickInput(args);
3332
+ const newPicks = isStaticQuickInput(args) || subId === LanguageMode$1 ? state.picks : await getPicks(subId, newValue, args, {
3328
3333
  assetDir,
3329
3334
  platform
3330
3335
  });
3331
- const filterValue = isQuickInput(args) ? '' : getFilterValue(providerId, subId, newValue);
3336
+ const filterValue = quickInput ? '' : getFilterValue(providerId, subId, newValue);
3332
3337
  const items = filterQuickPickItems(newPicks, filterValue);
3333
3338
  const focusedIndex = items.length === 0 ? -1 : 0;
3334
3339
  const sliced = items.slice(minLineY, maxLineY);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/quick-pick-worker",
3
- "version": "4.11.0",
3
+ "version": "4.12.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/lvce-editor/quick-pick-worker.git"