preview.ts 721 B

1234567891011121314
  1. /**
  2. * Worker-preview bootstrap: the one module preview.html adds ahead of the
  3. * stock entry tag. The runtime's optional source stage owns the pre-Cordis
  4. * chooser; the unchanged Host connector then owns the Worker handshake.
  5. * Everything after those calls is the served startup chain verbatim.
  6. */
  7. import DshWorker from '@deepseek-ai/dsh-experimental-webworker-runtime/worker?worker'
  8. import {
  9. chooseWorkerHostSource, connectWorkerHost, IMAGE_FILE_NAME,
  10. } from '@deepseek-ai/dsh-experimental-webworker-runtime/client'
  11. const image = `preview/${IMAGE_FILE_NAME}`
  12. const source = await chooseWorkerHostSource({ image })
  13. await connectWorkerHost(new DshWorker({ name: 'dsh-host' }), { image, overlays: source.overlays })