dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Live-preview panel for DeepSeek Harness: preview workspace pages beside the chat, auto-reload on save. · DeepSeek Harness 实时预览插件:边聊边看你的页面,改完自动刷新。
A DeepSeek Harness plugin that adds a live-preview panel to the Web UI. Pick a workspace, browse to an HTML
page, and it renders beside the conversation — every save reloads it. The agent can open pages too, through the
live_preview tool.
Built for the "let me see what you are making" loop: chat on the left, your page on the right, no window switching.
HTML badgelive_preview with open / close / refresh / root / focus / cleardsh web app or the desktop app)Clone this repository anywhere on the Harness host.
Install it as a local bundle — ask the Harness agent, or call the plugin manager directly:
plugin_manager install_bundle(target: "/absolute/path/to/dsh-live-preview")
(In the UI: Plugins → Add → local bundle directory.)
Refresh the Web UI (Ctrl+R). An eye icon appears in the session header.
A local-directory install links the checkout in place. If you move or delete the folder, reinstall the bundle.
window.open, so
the Host opens it instead.)Ask the agent to open a page for you:
Open the live preview on maas-home-preview/index.html
The agent calls live_preview({ action: "open", path: "maas-home-preview/index.html" }).
When a watched file changes, the plugin works out where the edit landed and tells the preview to point at it:
data-lp-line markers on elements. The change is diffed against the last served
revision, and the element nearest the changed source line is scrolled into view and outlined.The focus is carried through the reload (stored in sessionStorage), so it lands after the page has reloaded.
You can also drive it explicitly:
{ "action": "focus", "selector": "#hero" }
{ "action": "focus", "path": "index.html", "line": 312 }
{ "action": "clear" }
The panel shows the current target with Locate (re-apply) and × (clear) actions; it fades after ~15 seconds.
Edit the plugin row's config in your cordis.patch.yml patch layer:
- id: dsh-live-preview
config:
port: 8123 # 0 = pick a free port; a busy port falls back automatically
autoReload: true # broadcast reloads by default
roots: [] # extra absolute directories allowed as preview roots
ignore: ["node_modules", ".git", "dist", "build", ".tmp", ".venv"]
panelWidthRatio: 0.46 # initial panel width
Harness Web UI (:59936, authenticated)
├── session header utilities → eye toggle (client plugin)
├── shell.overlay → preview panel (React, theme tokens)
│ │ fetch same-origin JSON API (/dsh-live-preview/*)
│ │ iframe → loopback preview server
└────────┼──────────────────────────────────────────────
▼
Host plugin (zero dependencies)
├── loopback preview server :8123 (read-only)
│ ├── static files + reload script injection
│ ├── per-file fs.watch (only served files) → SSE reload (+ /__live/version fallback)
│ └── token + cookie auth, realpath containment
└── same-origin API: /info /state /tree /root /panel /refresh
live_preview opens a page by resolving the path against the caller's session working directory, then picking
the nearest registered workspace as the preview root.
127.0.0.1 only?t=) or the dshprev HttpOnly cookierealpath + containment; .., encoded traversal and symlink escapes are rejectednpm run dev is not proxied (planned)window.__ModuleLoader__, slot APIs) is internal to Harness; a major Harness upgrade may need a
small plugin updategit clone https://github.com/2011126630z-commits/dsh-live-preview
cd dsh-live-preview
npm test # node:test — auth, traversal, MIME, injection (syntax-checked), SSE, port fallback, cleanup
MIT