diff --git a/client/src/components/SidePanel/Builder/Action.tsx b/client/src/components/SidePanel/Builder/Action.tsx index b129cc0d15..53b3c9040b 100644 --- a/client/src/components/SidePanel/Builder/Action.tsx +++ b/client/src/components/SidePanel/Builder/Action.tsx @@ -1,32 +1,40 @@ import { useState } from 'react'; import type { Action } from 'librechat-data-provider'; import GearIcon from '~/components/svg/GearIcon'; +import { cn } from '~/utils'; export default function Action({ action, onClick }: { action: Action; onClick: () => void }) { const [isHovering, setIsHovering] = useState(false); return ( -
+
{ + if (e.key === 'Enter' || e.key === ' ') { + onClick(); + } + }} + className="flex w-full rounded-lg text-sm hover:cursor-pointer focus:outline-none focus:ring-2 focus:ring-text-primary" + onMouseEnter={() => setIsHovering(true)} + onMouseLeave={() => setIsHovering(false)} + aria-label={`Action for ${action.metadata.domain}`} + >
setIsHovering(true)} - onMouseLeave={() => setIsHovering(false)} + className="h-9 grow overflow-hidden text-ellipsis whitespace-nowrap px-3 py-2" + style={{ wordBreak: 'break-all' }} > -
- {action.metadata.domain} -
- {isHovering && ( - + {action.metadata.domain} +
+
+
);