mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-05 07:40:19 +01:00
chore: remove unnecessary comments
This commit is contained in:
parent
58678be0f8
commit
f1bc15b3d5
1 changed files with 3 additions and 3 deletions
|
|
@ -10,7 +10,7 @@ import { logger } from '~/utils';
|
||||||
interface UsePromptFileHandling {
|
interface UsePromptFileHandling {
|
||||||
fileSetter?: (files: ExtendedFile[]) => void;
|
fileSetter?: (files: ExtendedFile[]) => void;
|
||||||
initialFiles?: ExtendedFile[];
|
initialFiles?: ExtendedFile[];
|
||||||
onFileChange?: (updatedFiles: ExtendedFile[]) => void; // Callback when files are added/removed
|
onFileChange?: (updatedFiles: ExtendedFile[]) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const usePromptFileHandling = (params?: UsePromptFileHandling) => {
|
export const usePromptFileHandling = (params?: UsePromptFileHandling) => {
|
||||||
|
|
@ -47,7 +47,7 @@ export const usePromptFileHandling = (params?: UsePromptFileHandling) => {
|
||||||
filepath: data.filepath,
|
filepath: data.filepath,
|
||||||
progress: 1,
|
progress: 1,
|
||||||
attached: true,
|
attached: true,
|
||||||
preview: data.filepath || file.preview, // Use filepath for preview if available
|
preview: data.filepath || file.preview,
|
||||||
filename: data.filename || file.filename,
|
filename: data.filename || file.filename,
|
||||||
type: data.type || file.type,
|
type: data.type || file.type,
|
||||||
size: data.bytes || file.size,
|
size: data.bytes || file.size,
|
||||||
|
|
@ -152,7 +152,7 @@ export const usePromptFileHandling = (params?: UsePromptFileHandling) => {
|
||||||
encodeURIComponent(extendedFile.filename || ''),
|
encodeURIComponent(extendedFile.filename || ''),
|
||||||
);
|
);
|
||||||
formData.append('file_id', extendedFile.file_id);
|
formData.append('file_id', extendedFile.file_id);
|
||||||
formData.append('message_file', 'true'); // For prompts, treat as message attachment
|
formData.append('message_file', 'true');
|
||||||
|
|
||||||
formData.append('width', img.width.toString());
|
formData.append('width', img.width.toString());
|
||||||
formData.append('height', img.height.toString());
|
formData.append('height', img.height.toString());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue