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:
balibabu
2025-12-01 16:29:02 +08:00
committed by GitHub
parent 221947acc4
commit 1120575021
11 changed files with 60 additions and 466 deletions

View File

@ -29,7 +29,7 @@ export function useSendMultipleChatMessage(
api.completeConversation,
);
const { handleUploadFile, fileIds, clearFileIds } = useUploadFile();
const { handleUploadFile, files, clearFiles } = useUploadFile();
const { setFormRef, getLLMConfigById, isLLMConfigEmpty } =
useBuildFormRefs(chatBoxIds);
@ -181,7 +181,7 @@ export function useSendMultipleChatMessage(
id,
role: MessageType.User,
chatBoxId,
doc_ids: fileIds,
files,
});
}
});
@ -195,22 +195,22 @@ export function useSendMultipleChatMessage(
id,
content: value.trim(),
role: MessageType.User,
doc_ids: fileIds,
files,
},
chatBoxId,
});
}
});
}
clearFileIds();
clearFiles();
}, [
value,
chatBoxIds,
allDone,
clearFileIds,
clearFiles,
isLLMConfigEmpty,
addNewestQuestion,
fileIds,
files,
setValue,
sendMessage,
]);