fix vector cache not deleting cache after unembedding items with folders (#630)

This commit is contained in:
Sean Hatfield 2024-01-22 13:03:05 -08:00 committed by GitHub
parent 8a7324d0e7
commit 288ff0d18c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 2 deletions

View File

@ -88,6 +88,7 @@ async function loadYouTubeTranscript({ url }) {
data: {
title: metadata.title,
author: metadata.author,
destination: outFolder,
},
};
}

View File

@ -91,7 +91,8 @@ export default function Directory({
) : !!files.items ? (
files.items.map(
(item, index) =>
item.type === "folder" && (
(item.name === "custom-documents" ||
(item.type === "folder" && item.items.length > 0)) && (
<FolderRow
key={index}
item={item}

View File

@ -47,7 +47,9 @@ async function purgeFolder(folderName = null) {
const filenames = fs
.readdirSync(subFolderPath)
.map((file) => path.join(subFolderPath, file));
.map((file) =>
path.join(subFolderPath, file).replace(documentsPath + "/", "")
);
const workspaces = await Workspace.where();
const purgePromises = [];