Side web-preview panel: local static hosting, Markdown/code/image preview, one-click run of non-static projects (Cargo/npm/Go/Python) with live logs, web element mark & annotate, and link-click takeover into the side panel.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:zoumutou/dsh-web-preview
GitHub-sourced plugins run build scripts on your machine at install time. Only install sources you trust, and pin a commit (github:owner/repo#sha).
README
DeepSeek Harness(DSH)侧边网页预览面板 —— 一个标准 Cordis 插件包(Host + Client 双半), 把工作区目录托管成 iframe 预览,并支持项目运行、元素标记批注与链接点击接管。
功能
- 侧边预览:对话右上角 ▶ 按钮打开右侧玻璃卡片式预览面板(每个会话独立状态), 地址栏实时同步、可拖动调宽(挤压对话 → 400px 封顶 → 覆盖模式)
- 本地文件预览:工作区静态文件经 Harness 自身的 HTTP 服务托管
(
/__dsh-preview/<sessionId>/...)—— Markdown 渲染、代码带行号、图片直显、 HTML 原样 - 项目运行:自动检测项目类型(Cargo / package.json / go.mod / Python),
▶ 运行 / ⏹ 停止,日志实时滚动、自动识别
localhost:PORT并加载预览; 「日志→对话」一键把日志发给 AI 辅助诊断 - 元素标记:🖉 标记模式(悬停手型高亮、点击选取元素、批注气泡、一键发送到对话), 选择器/HTML 快照自动剥离内部标记类
- 链接点击接管:对话里点击 http(s) 链接、相对/绝对文件路径、纯文本路径 (自动转链接)→ 全部在侧边打开;Cmd/Ctrl+点击保留浏览器默认行为
- 会话隔离:每个会话独立的预览状态、根目录(默认当前会话所属工作区)、运行进程
安装
要求 DSH(DeepSeek Harness)Web 版。在 profile 目录(如 ~/.dsh/profiles/web):
npm install dsh-web-preview-panel
然后在 cordis.patch.yml 中挂载:
- insert:
- name: dsh-web-preview-panel
重启 dsh web 即生效。
开发
npm run build # 产出 lib/index.js(host)与 lib/client.js(ModuleLoader bundle)
src/host.js—— Host 半:webServer路由(静态托管 +POST /apiJSON RPC)、subprocess项目运行、fs文件访问src/client.js—— Client 半:React 面板 UI、标记/批注、点击接管、会话隔离; 通过fetch('/__dsh-preview/api')与 Host 通信
协议
GET/HEAD /__dsh-preview/<sessionId>/<path>—— 静态文件 / Markdown / 代码 / 图片POST /__dsh-preview/api——{ method, args }JSON RPC:set-rootpagesresolve-pathdetect-projectrun-projectproject-statusstop-projectstate
License
MIT
Links
More in this category
zhu1090093659/dsh-web-ui#packages/dsh-web-ui-all★ 1880
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
ccch1mneyyy/dsh-TUI★ 876
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
omdsh-dev/DSH-better-sidebar★ 740
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
huiliyi37/dsh-tianshu-tui★ 132
A terminal UI (TUI) for DeepSeek Harness.
omdsh-dev/dsh-at-file★ 126
Codex-style `@file` mentions: search workspace files in the composer and attach their contents to prompts.
Nagi-ovo/dsh-visualize★ 82
In-conversation generative UI: the model renders interactive HTML cards into the chat stream, with streaming preview and sandboxed rendering.