@lvce-editor/quick-pick-worker 3.1.0 → 3.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.
- package/dist/quickPickWorkerMain.js +18 -4
- package/package.json +1 -1
|
@@ -1593,7 +1593,7 @@ const updateIconCache = (iconCache, missingRequests, newIcons) => {
|
|
|
1593
1593
|
return newFileIconCache;
|
|
1594
1594
|
};
|
|
1595
1595
|
|
|
1596
|
-
const getPath = dirent => {
|
|
1596
|
+
const getPath$1 = dirent => {
|
|
1597
1597
|
return dirent.path;
|
|
1598
1598
|
};
|
|
1599
1599
|
const toDirent = pick => {
|
|
@@ -1609,7 +1609,7 @@ const getQuickPickFileIcons = async (items, fileIconCache) => {
|
|
|
1609
1609
|
const missingRequests = getMissingIconRequests(dirents, fileIconCache);
|
|
1610
1610
|
const newIcons = await requestFileIcons(missingRequests);
|
|
1611
1611
|
const newFileIconCache = updateIconCache(fileIconCache, missingRequests, newIcons);
|
|
1612
|
-
const paths = dirents.map(getPath);
|
|
1612
|
+
const paths = dirents.map(getPath$1);
|
|
1613
1613
|
const icons = getIconsCached(paths, newFileIconCache);
|
|
1614
1614
|
return {
|
|
1615
1615
|
icons,
|
|
@@ -2618,15 +2618,29 @@ const getRecentlyOpened = () => {
|
|
|
2618
2618
|
return invoke(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
|
|
2619
2619
|
};
|
|
2620
2620
|
|
|
2621
|
-
const
|
|
2621
|
+
const getPath = uri => {
|
|
2622
2622
|
if (uri.startsWith('file://')) {
|
|
2623
2623
|
return uri.slice('file://'.length);
|
|
2624
2624
|
}
|
|
2625
2625
|
return uri;
|
|
2626
2626
|
};
|
|
2627
|
+
const getLabel = uri => {
|
|
2628
|
+
const path = getPath(uri);
|
|
2629
|
+
if (path.startsWith('/')) {
|
|
2630
|
+
return pathBaseName(path);
|
|
2631
|
+
}
|
|
2632
|
+
return path;
|
|
2633
|
+
};
|
|
2634
|
+
const getDescription = uri => {
|
|
2635
|
+
const path = getPath(uri);
|
|
2636
|
+
if (path.startsWith('/')) {
|
|
2637
|
+
return pathDirName(path);
|
|
2638
|
+
}
|
|
2639
|
+
return '';
|
|
2640
|
+
};
|
|
2627
2641
|
const toProtoVisibleItem = uri => {
|
|
2628
2642
|
return {
|
|
2629
|
-
description:
|
|
2643
|
+
description: getDescription(uri),
|
|
2630
2644
|
direntType: Directory,
|
|
2631
2645
|
fileIcon: '',
|
|
2632
2646
|
icon: '',
|