feat: add basic storage usage tracking

This commit is contained in:
2025-11-02 18:12:33 +00:00
parent d2c09f5d0f
commit 9b8367ade4
8 changed files with 129 additions and 22 deletions

View File

@@ -189,6 +189,17 @@ export const openFile = authenticatedMutation({
},
})
export const saveFile = authenticatedMutation({
args: {
name: v.string(),
directoryId: v.id("directories"),
storageId: v.id("_storage"),
},
handler: async (ctx, { name, directoryId, storageId }) => {
return await FileSystem.saveFile(ctx, { name, directoryId, storageId })
},
})
export const fetchRecentFiles = authenticatedQuery({
args: {
limit: v.number(),