diff --git a/packages/cli/src/ui/components/SettingsDialog.tsx b/packages/cli/src/ui/components/SettingsDialog.tsx index 50571f9fbd..2bfbe7a9fa 100644 --- a/packages/cli/src/ui/components/SettingsDialog.tsx +++ b/packages/cli/src/ui/components/SettingsDialog.tsx @@ -164,7 +164,6 @@ export function SettingsDialog({ }); }, [settingKeys, selectedScope, settings, modifiedSettings, pendingSettings]); - // Use fuzzy search hook const { filteredItems, searchBuffer, maxLabelWidth } = useFuzzyList({ items, }); diff --git a/packages/cli/src/ui/hooks/useFuzzyList.ts b/packages/cli/src/ui/hooks/useFuzzyList.ts index 44ccfaadd8..be0b3832df 100644 --- a/packages/cli/src/ui/hooks/useFuzzyList.ts +++ b/packages/cli/src/ui/hooks/useFuzzyList.ts @@ -1,6 +1,6 @@ /** * @license - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * SPDX-License-Identifier: Apache-2.0 */ @@ -70,8 +70,11 @@ export function useFuzzyList({ onSearch?.(searchQuery); }; - // eslint-disable-next-line @typescript-eslint/no-floating-promises - doSearch(); + void doSearch().catch((error) => { + // eslint-disable-next-line no-console + console.error('Search failed:', error); + setFilteredKeys(items.map((i) => i.key)); // Reset to all items on error + }); return () => { active = false;