MCPcopy Create free account
hub / github.com/MiniMax-AI/OpenRoom / buildTagAppMap

Function buildTagAppMap

apps/webuiapps/src/lib/cardExtractor.ts:553–565  ·  view source on GitHub ↗

* Build a dynamic tag → app ID mapping from extracted apps. * Each tag found in an app's content is mapped to that app's ID.

(apps: AppEntry[])

Source from the content-addressed store, hash-verified

551 * Each tag found in an app's content is mapped to that app's ID.
552 */
553function buildTagAppMap(apps: AppEntry[]): Record<string, string[]> {
554 const map: Record<string, string[]> = {};
555 for (const app of apps) {
556 for (const tag of app.tags) {
557 const name = tag.name.includes('/') ? tag.name.split('/') : [tag.name];
558 for (const n of name) {
559 if (!map[n]) map[n] = [];
560 if (!map[n].includes(app.id)) map[n].push(app.id);
561 }
562 }
563 }
564 return map;
565}
566
567function matchScriptToApp(
568 regexTags: string[],

Callers 1

extractCardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected