Update ImportFolderButton.tsx

added fix
This commit is contained in:
Anirban Kar
2024-12-08 04:12:29 +05:30
committed by GitHub
parent 64814d56c5
commit 11f93a8800

View File

@@ -54,10 +54,10 @@ export const ImportFolderButton: React.FC<ImportFolderButtonProps> = ({ classNam
toast.info(`Skipping ${binaryFilePaths.length} binary files`);
}
const { userMessage, assistantMessage } = await createChatFromFolder(textFiles, binaryFilePaths, folderName);
const messages = await createChatFromFolder(textFiles, binaryFilePaths, folderName);
if (importChat) {
await importChat(folderName, [userMessage, assistantMessage]);
await importChat(folderName, [...messages]);
}
toast.success('Folder imported successfully');