Function
resolvePreviewUrl
(
definition: SandboxDefinition,
threadId: string,
)
Source from the content-addressed store, hash-verified
| 473 | * so the host resolves it and feeds it into the system prompt. |
| 474 | */ |
| 475 | export async function resolvePreviewUrl( |
| 476 | definition: SandboxDefinition, |
| 477 | threadId: string, |
| 478 | ): Promise<string> { |
| 479 | const handle = await definition.ensure({ threadId, runId: 'resolve-preview' }) |
| 480 | const channel = await handle.ports.connect(PREVIEW_PORT) |
| 481 | return channel.url |
| 482 | } |
Tested by
no test coverage detected