feat: enhance app descriptors with additional metadata and support for various file types

This commit is contained in:
shiyu
2025-12-12 18:09:44 +08:00
parent 1cda987723
commit 686202a0dd
11 changed files with 161 additions and 29 deletions
+9 -1
View File
@@ -46,7 +46,15 @@ function registerPluginAsApp(p: PluginItem) {
});
}
loadApps();
const appsLoadedPromise = loadApps();
export async function ensureAppsLoaded() {
await appsLoadedPromise;
}
export function listSystemApps(): AppDescriptor[] {
return apps.filter(a => !a.key.startsWith('plugin:'));
}
export function getAppsForEntry(entry: VfsEntry): AppDescriptor[] {
return apps.filter(a => a.supported(entry));