From 6c364436576dc0d20faa678241016305d80c49ef Mon Sep 17 00:00:00 2001 From: timothycarambat Date: Thu, 15 May 2025 21:49:01 -0700 Subject: [PATCH] patch Cached tag in UI not showing from #3833 --- server/utils/files/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server/utils/files/index.js b/server/utils/files/index.js index 98a44253..9b0ffaf3 100644 --- a/server/utils/files/index.js +++ b/server/utils/files/index.js @@ -56,6 +56,7 @@ async function viewLocalFiles() { fileToPickerData({ pathToFile: path.join(folderPath, subfile), liveSyncAvailable, + cachefilename, }) ); filenames[cachefilename] = subfile; @@ -351,11 +352,15 @@ const FILE_READ_SIZE_THRESHOLD = 150 * (1024 * 1024); * @param {boolean} liveSyncAvailable - Whether live sync is available * @returns {Promise<{name: string, type: string, [string]: any, cached: boolean, canWatch: boolean}>} - The picker data */ -async function fileToPickerData({ pathToFile, liveSyncAvailable = false }) { +async function fileToPickerData({ + pathToFile, + liveSyncAvailable = false, + cachefilename = null, +}) { let metadata = {}; const filename = path.basename(pathToFile); const fileStats = fs.statSync(pathToFile); - const cachedStatus = await cachedVectorInformation(pathToFile, true); + const cachedStatus = await cachedVectorInformation(cachefilename, true); const canWatchStatus = liveSyncAvailable ? DocumentSyncQueue.canWatch(metadata) : false;