mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-04-23 13:08:11 +00:00
fix vector cache not deleting cache after unembedding items with folders (#630)
This commit is contained in:
parent
8a7324d0e7
commit
288ff0d18c
3 changed files with 6 additions and 2 deletions
collector/utils/extensions/YoutubeTranscript
frontend/src/components/Modals/MangeWorkspace/Documents/Directory
server/utils/files
|
@ -88,6 +88,7 @@ async function loadYouTubeTranscript({ url }) {
|
||||||
data: {
|
data: {
|
||||||
title: metadata.title,
|
title: metadata.title,
|
||||||
author: metadata.author,
|
author: metadata.author,
|
||||||
|
destination: outFolder,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,8 @@ export default function Directory({
|
||||||
) : !!files.items ? (
|
) : !!files.items ? (
|
||||||
files.items.map(
|
files.items.map(
|
||||||
(item, index) =>
|
(item, index) =>
|
||||||
item.type === "folder" && (
|
(item.name === "custom-documents" ||
|
||||||
|
(item.type === "folder" && item.items.length > 0)) && (
|
||||||
<FolderRow
|
<FolderRow
|
||||||
key={index}
|
key={index}
|
||||||
item={item}
|
item={item}
|
||||||
|
|
|
@ -47,7 +47,9 @@ async function purgeFolder(folderName = null) {
|
||||||
|
|
||||||
const filenames = fs
|
const filenames = fs
|
||||||
.readdirSync(subFolderPath)
|
.readdirSync(subFolderPath)
|
||||||
.map((file) => path.join(subFolderPath, file));
|
.map((file) =>
|
||||||
|
path.join(subFolderPath, file).replace(documentsPath + "/", "")
|
||||||
|
);
|
||||||
const workspaces = await Workspace.where();
|
const workspaces = await Workspace.where();
|
||||||
|
|
||||||
const purgePromises = [];
|
const purgePromises = [];
|
||||||
|
|
Loading…
Add table
Reference in a new issue