From acbecc0d32fc318801fed7634eb3d995db53e860 Mon Sep 17 00:00:00 2001 From: EthanHealy01 Date: Wed, 8 Oct 2025 16:57:29 +0100 Subject: [PATCH] hide stars in automate --- frontend/src/components/tools/ToolPicker.tsx | 6 ++++-- frontend/src/components/tools/shared/renderToolButtons.tsx | 4 +++- frontend/src/components/tools/toolPicker/ToolButton.tsx | 5 +++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/tools/ToolPicker.tsx b/frontend/src/components/tools/ToolPicker.tsx index 3c2b9218e..fc750f549 100644 --- a/frontend/src/components/tools/ToolPicker.tsx +++ b/frontend/src/components/tools/ToolPicker.tsx @@ -141,7 +141,7 @@ const ToolPicker = ({ selectedToolKey, onSelect, filteredTools, isSearching = fa {searchGroups.length === 0 ? ( ) : ( - searchGroups.map(group => renderToolButtons(t, group, selectedToolKey, onSelect, true, false, filteredTools)) + searchGroups.map(group => renderToolButtons(t, group, selectedToolKey, onSelect, true, false, filteredTools, true)) )} ) : ( @@ -186,6 +186,7 @@ const ToolPicker = ({ selectedToolKey, onSelect, filteredTools, isSearching = fa tool={tool} isSelected={selectedToolKey === id} onSelect={onSelect} + hasStars /> ))} @@ -202,6 +203,7 @@ const ToolPicker = ({ selectedToolKey, onSelect, filteredTools, isSearching = fa tool={tool} isSelected={selectedToolKey === id} onSelect={onSelect} + hasStars /> ))} @@ -242,7 +244,7 @@ const ToolPicker = ({ selectedToolKey, onSelect, filteredTools, isSearching = fa {allSection?.subcategories.map((sc: any) => - renderToolButtons(t, sc, selectedToolKey, onSelect, true, false) + renderToolButtons(t, sc, selectedToolKey, onSelect, true, false, undefined, true) )} diff --git a/frontend/src/components/tools/shared/renderToolButtons.tsx b/frontend/src/components/tools/shared/renderToolButtons.tsx index a6cb63961..5a84c16f3 100644 --- a/frontend/src/components/tools/shared/renderToolButtons.tsx +++ b/frontend/src/components/tools/shared/renderToolButtons.tsx @@ -14,7 +14,8 @@ export const renderToolButtons = ( onSelect: (id: string) => void, showSubcategoryHeader: boolean = true, disableNavigation: boolean = false, - searchResults?: Array<{ item: [string, any]; matchedText?: string }> + searchResults?: Array<{ item: [string, any]; matchedText?: string }>, + hasStars: boolean = false ) => { // Create a map of matched text for quick lookup const matchedTextMap = new Map(); @@ -42,6 +43,7 @@ export const renderToolButtons = ( onSelect={onSelect} disableNavigation={disableNavigation} matchedSynonym={matchedSynonym} + hasStars={hasStars} /> ); })} diff --git a/frontend/src/components/tools/toolPicker/ToolButton.tsx b/frontend/src/components/tools/toolPicker/ToolButton.tsx index 2eb3eddfe..4a86a5d85 100644 --- a/frontend/src/components/tools/toolPicker/ToolButton.tsx +++ b/frontend/src/components/tools/toolPicker/ToolButton.tsx @@ -22,9 +22,10 @@ interface ToolButtonProps { rounded?: boolean; disableNavigation?: boolean; matchedSynonym?: string; + hasStars?: boolean; } -const ToolButton: React.FC = ({ id, tool, isSelected, onSelect, disableNavigation = false, matchedSynonym }) => { +const ToolButton: React.FC = ({ id, tool, isSelected, onSelect, disableNavigation = false, matchedSynonym, hasStars = false }) => { const { t } = useTranslation(); // Special case: read and multiTool are navigational tools that are always available const isUnavailable = !tool.component && !tool.link && id !== 'read' && id !== 'multiTool'; @@ -169,7 +170,7 @@ const ToolButton: React.FC = ({ id, tool, isSelected, onSelect, ); - const star = !isUnavailable ? ( + const star = hasStars && !isUnavailable ? (