MCPcopy Index your code
hub / github.com/TanStack/ai / resolvePreviewUrl

Function resolvePreviewUrl

examples/sandbox-web/src/sandbox-agent.ts:475–482  ·  view source on GitHub ↗
(
  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 */
475export 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}

Callers 1

api.run.tsFile · 0.90

Calls 1

connectMethod · 0.65

Tested by

no test coverage detected