From a752a217bf93f857a3519e70e204965aace6aad8 Mon Sep 17 00:00:00 2001 From: linonetwo Date: Sun, 11 Aug 2024 19:45:18 +0800 Subject: [PATCH] feat: not show recent when have text --- .../widgets/build-in-sub-plugins/search-recent.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/commandpalette/widgets/build-in-sub-plugins/search-recent.ts b/src/commandpalette/widgets/build-in-sub-plugins/search-recent.ts index b963fc6..6681e19 100644 --- a/src/commandpalette/widgets/build-in-sub-plugins/search-recent.ts +++ b/src/commandpalette/widgets/build-in-sub-plugins/search-recent.ts @@ -9,7 +9,7 @@ import { lingo } from '../utils/lingo'; export const plugin = (id: string): AutocompletePlugin> => { let setContext: StateUpdater | undefined; let refresh: () => Promise | undefined; - const deleteIcon = getIconSvg('$:/core/images/delete-button'); + const deleteIcon = getIconSvg('$:/core/images/delete-button', undefined); const recentSearchesPlugin = createLocalStorageRecentSearchesPlugin({ key: `recent-${id}`, subscribe(parameters) { @@ -26,6 +26,11 @@ export const plugin = (id: string): AutocompletePlugin 0) return []; + const items = source.getItems(parameters); + return await items; + }, onSelect({ item }) { onSelect(item.id); },