@lvce-editor/quick-pick-worker 4.5.0 → 4.5.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.
@@ -3642,6 +3642,15 @@ const createCustomPick = value => {
3642
3642
  uri: ''
3643
3643
  };
3644
3644
  };
3645
+ const shouldCloseBeforeSelect = (subId, pick) => {
3646
+ if (subId !== Commands$1) {
3647
+ return false;
3648
+ }
3649
+ const {
3650
+ id
3651
+ } = pick;
3652
+ return typeof id === 'string' && id.startsWith('ext.');
3653
+ };
3645
3654
  const selectIndex = async (state, index, button = /* left */0) => {
3646
3655
  const {
3647
3656
  items,
@@ -3657,6 +3666,11 @@ const selectIndex = async (state, index, button = /* left */0) => {
3657
3666
  return state;
3658
3667
  }
3659
3668
  const fn = getSelect(subId);
3669
+ if (shouldCloseBeforeSelect(subId, pick)) {
3670
+ await closeWidget(state.uid);
3671
+ void fn(pick, value);
3672
+ return state;
3673
+ }
3660
3674
  const selectPickResult = await fn(pick, value);
3661
3675
  object(selectPickResult);
3662
3676
  string(selectPickResult.command);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/quick-pick-worker",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/lvce-editor/quick-pick-worker.git"