refactor(client): update file handling in file upload functions

This commit is contained in:
dakai
2024-10-06 15:30:24 +08:00
parent 1f2dea448a
commit e6ef10e96e
5 changed files with 42 additions and 38 deletions

View File

@@ -351,6 +351,7 @@ export const useChatStore = createPersistStore(
if (attachFiles && attachFiles.length > 0) {
let fileContent = userContent + " Here are the files: \n";
for (let i = 0; i < attachFiles.length; i++) {
fileContent += attachFiles[i].name + "\n";
fileContent += await readFileContent(attachFiles[i]);
}
mContent = [