mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-10 20:48:54 +01:00
feat: chat ui and functionality for prompts (auto-send not working)
This commit is contained in:
parent
7c3356e10b
commit
607a5a2fcf
18 changed files with 636 additions and 19 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { v4 } from 'uuid';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { useMemo } from 'react';
|
||||
import { useQueryClient } from '@tanstack/react-query';
|
||||
import {
|
||||
Constants,
|
||||
|
|
@ -213,17 +214,18 @@ export default function useChatFunctions({
|
|||
submissionFiles.length > 0;
|
||||
|
||||
if (setFiles && reuseFiles === true) {
|
||||
currentMsg.files = [...submissionFiles];
|
||||
currentMsg.files = submissionFiles;
|
||||
setFiles(new Map());
|
||||
setFilesToDelete({});
|
||||
} else if (setFiles && files && files.size > 0) {
|
||||
currentMsg.files = Array.from(files.values()).map((file) => ({
|
||||
const chatFiles = Array.from(files.values()).map((file) => ({
|
||||
file_id: file.file_id,
|
||||
filepath: file.filepath,
|
||||
type: file.type ?? '', // Ensure type is not undefined
|
||||
height: file.height,
|
||||
width: file.width,
|
||||
}));
|
||||
currentMsg.files = chatFiles;
|
||||
setFiles(new Map());
|
||||
setFilesToDelete({});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue