codacus commited on
Commit
11f93a8
·
unverified ·
1 Parent(s): 64814d5

Update ImportFolderButton.tsx

Browse files
app/components/chat/ImportFolderButton.tsx CHANGED
@@ -54,10 +54,10 @@ export const ImportFolderButton: React.FC<ImportFolderButtonProps> = ({ classNam
54
  toast.info(`Skipping ${binaryFilePaths.length} binary files`);
55
  }
56
 
57
- const { userMessage, assistantMessage } = await createChatFromFolder(textFiles, binaryFilePaths, folderName);
58
 
59
  if (importChat) {
60
- await importChat(folderName, [userMessage, assistantMessage]);
61
  }
62
 
63
  toast.success('Folder imported successfully');
 
54
  toast.info(`Skipping ${binaryFilePaths.length} binary files`);
55
  }
56
 
57
+ const messages = await createChatFromFolder(textFiles, binaryFilePaths, folderName);
58
 
59
  if (importChat) {
60
+ await importChat(folderName, [...messages]);
61
  }
62
 
63
  toast.success('Folder imported successfully');