diff --git a/client/src/components/Chat/Input/DuringRunSendButton.tsx b/client/src/components/Chat/Input/DuringRunSendButton.tsx index 73fc9845a1..ea84300e75 100644 --- a/client/src/components/Chat/Input/DuringRunSendButton.tsx +++ b/client/src/components/Chat/Input/DuringRunSendButton.tsx @@ -1,9 +1,9 @@ import React, { forwardRef, useMemo } from 'react'; import { useRecoilValue } from 'recoil'; -import * as Ariakit from '@ariakit/react'; import { useWatch } from 'react-hook-form'; -import { SendIcon } from '@librechat/client'; +import { SendActions, SendIcon } from '@librechat/client'; import { Zap, Clock, OctagonPause, ZapOff } from 'lucide-react'; +import type { SendAction } from '@librechat/client'; import type { Control } from 'react-hook-form'; import type { ComposerKeyContext, KeyChordSource } from '~/utils/shortcuts'; import type { SteeringControls } from '~/hooks/Chat/useSteering'; @@ -13,25 +13,9 @@ import { useLocalize } from '~/hooks'; import { cn } from '~/utils'; import store from '~/store'; -const ROW_CLASS = - 'flex w-full cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm text-text-primary hover:bg-surface-tertiary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-xheavy aria-disabled:cursor-not-allowed aria-disabled:opacity-50'; - -function Kbd({ children }: { children: React.ReactNode }) { - return ( - - {children} - - ); -} - -type ActionRow = { - key: string; - label: string; - kbd?: string; - icon: React.ReactNode; - disabled?: boolean; - onClick: () => void; -}; +/** The rows, the popover and the chord chips are shared with every other chat + * surface that can submit more than one way — see `SendActions`. */ +type ActionRow = SendAction; type DuringRunSendButtonProps = { control: Control<{ text: string }>; @@ -141,7 +125,7 @@ const DuringRunSendButton = React.memo( key: 'steer', label: localize('com_ui_steer'), kbd: steerKbd, - icon: