diff --git a/client/src/components/Chat/Input/Files/AttachFileChat.tsx b/client/src/components/Chat/Input/Files/AttachFileChat.tsx index d49230ff89..6bdecca22a 100644 --- a/client/src/components/Chat/Input/Files/AttachFileChat.tsx +++ b/client/src/components/Chat/Input/Files/AttachFileChat.tsx @@ -4,18 +4,21 @@ import { supportsFiles, mergeFileConfig, isAgentsEndpoint, + isAssistantsEndpoint, fileConfig as defaultFileConfig, } from 'librechat-data-provider'; import type { EndpointFileConfig } from 'librechat-data-provider'; import { useGetFileConfig } from '~/data-provider'; import AttachFileMenu from './AttachFileMenu'; import { useChatContext } from '~/Providers'; +import AttachFile from './AttachFile'; function AttachFileChat({ disableInputs }: { disableInputs: boolean }) { const { conversation } = useChatContext(); const conversationId = conversation?.conversationId ?? Constants.NEW_CONVO; const { endpoint, endpointType } = conversation ?? { endpoint: null }; const isAgents = useMemo(() => isAgentsEndpoint(endpoint), [endpoint]); + const isAssistants = useMemo(() => isAssistantsEndpoint(endpoint), [endpoint]); const { data: fileConfig = defaultFileConfig } = useGetFileConfig({ select: (data) => mergeFileConfig(data), @@ -25,7 +28,9 @@ function AttachFileChat({ disableInputs }: { disableInputs: boolean }) { const endpointSupportsFiles: boolean = supportsFiles[endpointType ?? endpoint ?? ''] ?? false; const isUploadDisabled = (disableInputs || endpointFileConfig?.disabled) ?? false; - if (isAgents || (endpointSupportsFiles && !isUploadDisabled)) { + if (isAssistants && endpointSupportsFiles && !isUploadDisabled) { + return ; + } else if (isAgents || (endpointSupportsFiles && !isUploadDisabled)) { return ( ); } - return null; }