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

Function buildFileUrl

apps/webuiapps/src/lib/imageGenTools.ts:24–29  ·  view source on GitHub ↗

Build an accessible URL for a file stored via session-data API

(filePath: string)

Source from the content-addressed store, hash-verified

22
23/** Build an accessible URL for a file stored via session-data API */
24function buildFileUrl(filePath: string): string {
25 const session = getSessionPath();
26 const cleaned = filePath.startsWith('/') ? filePath.slice(1) : filePath;
27 const fullPath = session ? `${session}/apps/${cleaned}` : `apps/${cleaned}`;
28 return `/api/session-data?path=${encodeURIComponent(fullPath)}`;
29}
30
31export function getImageGenToolDefinitions(): Array<{
32 type: 'function';

Callers 1

executeImageGenToolFunction · 0.85

Calls 1

getSessionPathFunction · 0.90

Tested by

no test coverage detected