mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Feat: Files uploaded via the dialog box can be uploaded without binding to a dataset. #9590 (#11630)
### What problem does this PR solve? Feat: Files uploaded via the dialog box can be uploaded without binding to a dataset. #9590 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -86,7 +86,7 @@ export const useSendMessage = (controller: AbortController) => {
|
||||
const { conversationId, isNew } = useGetChatSearchParams();
|
||||
const { handleInputChange, value, setValue } = useHandleMessageInputChange();
|
||||
|
||||
const { handleUploadFile, fileIds, clearFileIds, isUploading, removeFile } =
|
||||
const { handleUploadFile, isUploading, removeFile, files, clearFiles } =
|
||||
useUploadFile();
|
||||
|
||||
const { send, answer, done } = useSendMessageWithSse(
|
||||
@ -208,7 +208,7 @@ export const useSendMessage = (controller: AbortController) => {
|
||||
|
||||
addNewestQuestion({
|
||||
content: value,
|
||||
doc_ids: fileIds,
|
||||
files: files,
|
||||
id,
|
||||
role: MessageType.User,
|
||||
});
|
||||
@ -218,16 +218,16 @@ export const useSendMessage = (controller: AbortController) => {
|
||||
id,
|
||||
content: value.trim(),
|
||||
role: MessageType.User,
|
||||
doc_ids: fileIds,
|
||||
files: files,
|
||||
});
|
||||
}
|
||||
clearFileIds();
|
||||
clearFiles();
|
||||
}, [
|
||||
value,
|
||||
addNewestQuestion,
|
||||
fileIds,
|
||||
files,
|
||||
done,
|
||||
clearFileIds,
|
||||
clearFiles,
|
||||
setValue,
|
||||
handleSendMessage,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user