From 36f465f2cf5d45b94b7ed4edaeedb863732ac7b9 Mon Sep 17 00:00:00 2001 From: p-sw Date: Sat, 8 Jun 2024 02:04:08 +0900 Subject: [PATCH] refactor(cli): remove slicing from search helper Removed the top 5 slicing constraint from the search helper function within the CLI package. This change allows to return all components whose score exceeds zero, instead of restricting it to the top 5. --- packages/cli/src/helpers/search.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/cli/src/helpers/search.ts b/packages/cli/src/helpers/search.ts index 6d2c7e8..4a4e441 100644 --- a/packages/cli/src/helpers/search.ts +++ b/packages/cli/src/helpers/search.ts @@ -56,6 +56,5 @@ export async function getSuggestion(componentNames: string[], input: string): Pr return componentJw .filter(([_, score]) => score > 0) .sort((a, b) => b[1] - a[1]) - .slice(0, 5) .map(([name]) => name) }