Build an accessible URL for a file stored via session-data API
(filePath: string)
| 22 | |
| 23 | /** Build an accessible URL for a file stored via session-data API */ |
| 24 | function 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 | |
| 31 | export function getImageGenToolDefinitions(): Array<{ |
| 32 | type: 'function'; |
no test coverage detected