MCPcopy Index your code
hub / github.com/Xyntopia/taskyon / getFileMappingByUuid

Function getFileMappingByUuid

src/modules/taskManager.ts:185–205  ·  view source on GitHub ↗
(
  uuid: string
)

Source from the content-addressed store, hash-verified

183}
184
185export async function getFileMappingByUuid(
186 uuid: string
187): Promise<FileMappingDocType | null> {
188 const db = await getTaskyonDB();
189
190 // Find the document with the matching UUID
191 const fileMappingDoc = await db.filemappings.findOne(uuid).exec();
192
193 // Check if the document exists
194 if (!fileMappingDoc) {
195 console.log(`No file mapping found for UUID: ${uuid}`);
196 return null;
197 }
198
199 // Return the found document
200 return {
201 uuid: fileMappingDoc.uuid,
202 opfs: fileMappingDoc.opfs,
203 openAIFileId: fileMappingDoc.openAIFileId,
204 };
205}
206
207export async function getFile(uuid: string) {
208 const fileMap = await getFileMappingByUuid(uuid);

Callers 2

getFileFunction · 0.85

Calls 1

getTaskyonDBFunction · 0.85

Tested by

no test coverage detected