diff --git a/extensions/react-widget/src/components/SearchBar.tsx b/extensions/react-widget/src/components/SearchBar.tsx index 7fd44c730..aff036d07 100644 --- a/extensions/react-widget/src/components/SearchBar.tsx +++ b/extensions/react-widget/src/components/SearchBar.tsx @@ -236,7 +236,13 @@ export const SearchBar = ({ return 'ontouchstart' in window; } const isTouch = isTouchDevice(); - + const getKeyboardInstruction = () => { + if (isResultVisible) return "Enter" + if (browserOS === 'mac') + return "⌘ K" + else + return "Ctrl K" + } React.useEffect(() => { const handleFocusSearch = (event: KeyboardEvent) => { if ( @@ -361,11 +367,22 @@ export const SearchBar = ({ ) } - { - setIsWidgetOpen(true) - }} title={`${isTouch ? "Tap" : "Press Enter"} to Ask the AI`}> - {isTouch ? "Tap" : "Enter"} - + { + isTouch ? + + { + setIsWidgetOpen(true) + }} + title={"Tap to Ask the AI"}> + Tap + + : + + {getKeyboardInstruction()} + + }