mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-04 13:21:17 +00:00
feat: match Code Interpreter file upload to the File Search dropzone
Swap Code Interpreter's thin btn-neutral bar for the same dashed dropzone (DropzoneContent + dropzoneClassName) File Search already uses, so the two capabilities' upload UIs are consistent.
This commit is contained in:
parent
7d18dd6dc4
commit
cec2b92459
1 changed files with 15 additions and 15 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import { memo, useMemo, useRef, useState } from 'react';
|
||||
import { useFormContext } from 'react-hook-form';
|
||||
import { AttachmentIcon } from '@librechat/client';
|
||||
import { EToolResources, EModelEndpoint, AgentCapabilities } from 'librechat-data-provider';
|
||||
import type { ExtendedFile, AgentForm } from '~/common';
|
||||
import { useFileHandlingNoChatContext } from '~/hooks/Files/useFileHandling';
|
||||
import { useAgentFileConfig, useLocalize, useLazyEffect } from '~/hooks';
|
||||
import DropzoneContent, { dropzoneClassName } from '../UploadDropzone';
|
||||
import FileRow from '~/components/Chat/Input/Files/FileRow';
|
||||
import { isEphemeralAgent } from '~/common';
|
||||
|
||||
|
|
@ -87,23 +87,23 @@ function Files({
|
|||
<button
|
||||
type="button"
|
||||
disabled={uploadDisabled}
|
||||
className="btn btn-neutral border-token-border-light relative h-9 w-full rounded-lg text-sm font-medium"
|
||||
className={dropzoneClassName}
|
||||
onClick={handleButtonClick}
|
||||
>
|
||||
<div className="flex w-full items-center justify-center gap-1">
|
||||
<input
|
||||
multiple={true}
|
||||
type="file"
|
||||
style={{ display: 'none' }}
|
||||
tabIndex={-1}
|
||||
ref={fileInputRef}
|
||||
disabled={uploadDisabled}
|
||||
onChange={handleFileUpload}
|
||||
/>
|
||||
<AttachmentIcon className="text-token-text-primary h-4 w-4" />
|
||||
{localize('com_ui_upload_code_environment')}
|
||||
</div>
|
||||
<DropzoneContent
|
||||
label={localize('com_ui_upload_code_environment')}
|
||||
hint={localize('com_ui_upload_files_hint')}
|
||||
/>
|
||||
</button>
|
||||
<input
|
||||
multiple={true}
|
||||
type="file"
|
||||
style={{ display: 'none' }}
|
||||
tabIndex={-1}
|
||||
ref={fileInputRef}
|
||||
disabled={uploadDisabled}
|
||||
onChange={handleFileUpload}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue