mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-09 04:02:35 +00:00
One Vite build emits dist/index.html and dist/preview.html sharing every chunk; the only difference is one prepended bootstrap entry whose module connects the worker host, so the page from the stock entry onward is the served startup chain verbatim. The dist moves to a relative base so the preview mounts under any static directory, and the served form anchors deep SPA-fallback paths with a rendered <base href="/">. The preview-boot e2e serves the real built pages, packs the VFS image when absent, and holds the boot line's lowering contract, the interactive hero, and a clean page-error channel in headless Chromium.
13 lines
730 B
TypeScript
13 lines
730 B
TypeScript
/**
|
|
* Worker-preview bootstrap: the one module preview.html adds ahead of the
|
|
* stock entry tag. Connecting the worker host installs the boot globals and
|
|
* settles `__DSH_BOOT_READY__`, where the stock entry's pre-boot await holds,
|
|
* so everything after this module is the served startup chain verbatim. A
|
|
* failed handshake rejects the deferred into the boot page's failure
|
|
* rendering; this module owns no page painting.
|
|
*/
|
|
import DshWorker from '@deepseek-ai/dsh-experimental-webworker-runtime/worker?worker'
|
|
import { connectWorkerHost, IMAGE_FILE_NAME } from '@deepseek-ai/dsh-experimental-webworker-runtime/client'
|
|
|
|
await connectWorkerHost(new DshWorker({ name: 'dsh-host' }), { image: `preview/${IMAGE_FILE_NAME}` })
|