watericetangcw/dsh-page-preview 预览 preview

watericetangcw/dsh-page-preview

一个Cordis插件,使DeepSeek Harness能够主动预览并显示网页。

Project Overview项目介绍

dsh-page-preview is a native plugin built exclusively for DeepSeek Harness, designed to render HTML previews directly within DSH’s web interface. It offers two core preview modes: inline rendering of HTML code blocks generated by the DeepSeek LLM, and a draggable floating window that can preview local HTML files, local directories with an index.html, and remote URLs. To install the plugin, you just run a single terminal command: dsh plugin --profile web add github:watericetangcw/dsh-page-preview. After installation completes, you only need to restart dsh web and refresh your browser page to start using it.

This plugin is targeted at developers who use DeepSeek Harness to build and test static HTML pages and components. It eliminates the need to leave the DSH interface or open a separate browser window to check the output of generated code. For inline previews, you simply instruct DSH to output your HTML inside a html page-preview code block, and the plugin will automatically render it into a collapsible interactive panel below the LLM’s response. For floating window previews, you call the preview_register tool with your target path or URL to launch the preview.

dsh-page-preview is released under the permissive MIT open source license, so it is free to use, modify, and distribute for both personal and commercial projects. The floating preview window can be dragged, resized, and opened to full screen, and content scales proportionally to avoid distortion when the window is resized. Previews are isolated per DSH session, so switching between sessions will not disrupt open previews, and closing the window minimizes it to a clickable icon in the top-right corner. No extra dependencies are required beyond a working DSH installation.

这是一个专为 DeepSeek Harness 开发的原生插件,核心功能是在 DSH 网页界面内实现 HTML 页面的预览能力。它支持两种预览模式:一是将模型输出的特定 HTML 代码块在行内渲染为可交互预览面板,二是通过右下角浮动小窗预览任意本地页面或远程网址。用户仅需执行一条命令即可完成安装,安装后重启 dsh web 并刷新浏览器页面即可使用。

面向使用 DSH 开发静态页面的开发者,可帮用户无需退出 DSH 界面就能直接查看页面生成效果,省去切换本地浏览器打开文件的步骤。使用行内预览时,只需提示 DSH 输出包裹在 ```html page-preview 标记中的代码块,内容渲染完成后就会自动生成可交互预览面板。使用浮动小窗时,只需调用 preview_register 工具传入目标路径或网址即可开启预览。

本插件采用 MIT 许可证开源,免费供个人和商业使用。浮动小窗支持拖动、缩放、全屏展示,内容会按比例自适应显示,不会被小窗压缩。预览内容按会话隔离,切换不同会话不会互相干扰,关闭小窗后会最小化到右上角,点击即可恢复。目前仅适配 DSH 网页端,无需额外依赖,安装后即可正常运行。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:watericetangcw/dsh-page-preview

把 watericetangcw/dsh-page-preview 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-page-preview

让 DeepSeek Harness 直接在网页里把页面「显示」给你看

License: MIT DeepSeek Harness

English · 简体中文

行内预览与浮动小窗的实际使用截图

一次安装,永久可用:既能把模型生成的 HTML 代码块行内渲染成可交互预览,也能用右下角浮动小窗实时预览任意本地页面或网址。

✨ 功能亮点

🖥️ 行内预览

让 DSH 输出一个 html page-preview 代码块,答案发完后,它就会变成消息下方的一个可交互预览面板——全屏、收起、在新窗口打开,样样都行,而代码块本身依然是普通代码块。

🪟 浮动小窗

四个工具,随时预览:

工具 作用
preview_register 注册并打开预览:本地 HTML 文件、含 index.html 的目录,或 http(s) 网址
preview_replace 换一个页面继续预览
preview_refresh 改完文件后一键刷新
preview_unregister 解除注册并关闭

小窗可拖动、可缩放、可全屏;内容按虚拟桌面宽度等比缩放,小窗也不会把页面挤扁。关闭小窗时会「飞」向右上角,化成一枚带绿色呼吸灯的胶囊,点一下即恢复。预览按会话隔离,切换会话互不打扰。

🚀 快速安装

一条命令即可:

dsh plugin --profile web add github:watericetangcw/dsh-page-preview

安装完成后重启 dsh web,并刷新一次浏览器页面,即可使用。

🧪 快速体验

复制下面的提示词发给 DSH,立刻看到效果:

① 行内预览——生成并展示一个页面

请编写一个完整的静态 HTML 页面(CSS 与 JS 全部内联),用 `html page-preview` 代码块展示出来,内容是一个实时时钟卡片。

② 浮动小窗——预览一个在线页面

请用 preview_register 预览这个网页:https://watericetangcw.github.io/dsh-page-preview/hello-world

③ 浮动小窗——预览本地工程并刷新

请用 preview_register 预览 docs/demo-site 目录,然后把页面标题改成「dsh-page-preview 演示」,再调用 preview_refresh 让我看到更新。

📖 使用方式

  • 行内预览:让 DSH 输出 ```html page-preview ... ```(CSS 与 JS 需全部内联)。
  • 浮动小窗:直接调用 preview_register 传入路径或网址即可,其余三个工具用于替换、刷新与关闭。

🔗 链接

📄 许可证

MIT © 2026 WateRice

← 上一个 Prev harness-pet 下一个 Next dsh-updater-ui →