nirvanaslash/dsh-artifact-preview
DeepSeek Harness(DSH)的Codex风格工件预览:聊天中的生成文件卡片行 + 分屏侧边预览(Markdown/代码/CSV/JSON/图片/HTML)
项目介绍Project Overview
dsh-artifact-preview 是 DSH 的 Web 客户端插件,在聊天末尾展示“产物”文件行与图片缩略图,并提供可调整的右侧分屏预览,支持 Markdown、代码、CSV、JSON、图片及 HTML/localhost iframe,还暴露全局钩子供其他插件调用。适用于希望在对话中直接查看代理生成文件的场景。注意:裸 dsh web 需先装 dsh-file-changes;文件视图与正文文件名提及仍保持系统默认打开行为。
dsh-artifact-preview is a DSH web client plugin that shows a produced-files row with image thumbnails in chat and opens a resizable split-side preview. It renders Markdown, source code, CSV, JSON, images, and HTML/localhost pages in an iframe, and exposes global hooks for other plugins. Use it to inspect agent-generated files without leaving the conversation. Caveat: bare dsh web requires the dsh-file-changes companion; file-view buttons and prose-mention previews are not bundled.
请帮我了解并安装插件:【dsh-artifact-preview】【https://github.com/nirvanaslash/dsh-artifact-preview】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add github:nirvanaslash/dsh-artifact-preview
把 nirvanaslash/dsh-artifact-preview 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-artifact-preview
Codex-style artifact preview for DeepSeek Harness (DSH).
dsh-artifact-preview is a client plugin (dsh.client.platform: "web") that makes produced files visible and inspectable right in the chat:
- Produced-files row in chat — after the agent writes files, the closing message shows a "产物" row with file chips and inline image thumbnails; clicking any of them opens the side preview.
- Split-screen side preview panel — a resizable right-hand panel (real split, conversation stays visible and unobstructed) rendering:
- Markdown → rich text (headings, tables, lists, code fences, links, images; relative local images resolve automatically)
- Source code (
.py .js .ts .sh .css …) → dark syntax highlighting - CSV → HTML table
- JSON → collapsible tree
- Images (
.png .jpg .gif .webp .svg …) → checkerboard-backed centered view - HTML / localhost ports → iframe (with port chips for dev servers, URL bar, back/forward/reload, open-external)
- Global hooks (
window.__dshOpenFilePreview/__dshCanPreviewPath) so other plugins can route "open file" intents into the preview panel.
Install
From GitHub (the package declares dsh.bundle + dsh.client, so dsh plugin add installs the dependency and auto-registers the preview as an active client-plugin layer — no manual profile editing):
dsh plugin --profile web add github:nirvanaslash/dsh-artifact-preview
Restart the dsh web service (or DSH Desktop) and refresh the page.
Once the package is published to npm, dsh plugin --profile web add dsh-artifact-preview and the Marketplace search path work the same way.
Prerequisites
- DSH Desktop (or a
dsh webprofile that has thedsh-file-changescompanion installed) — the preview fetches file content through its/dsh-files/static/<absolute-path>route. On DSH Desktop this route is built in; on a baredsh webinstall add thedsh-file-changescompanion first. - A model that produces files via
write/edit-style tools (that is how a turn's "produced files" are tracked).
Compatibility
- Built for DSH
0.1.0-rc.7(bundled in DSH Desktop 2.0.1) client plugin ABI:window.__ModuleLoader__module format,dsh.clientmetadata,dsh.bundlepatch registration, and theconversation.chat.turnTailchain slot. Chain-slot election relies on lowpriority(-100) to win the produced-files row over the official deliverables row; verify behavior after DSH upgrades.
Known boundaries
- The chat row and preview panel are fully self-contained in this package.
- Two optional behaviors are not bundled because they require patching DSH core files (intentionally left out of a public package): multi-type preview buttons in the file view, and "open → preview" for file-name mentions inside message prose. Without them, file-view preview keeps DSH's original HTML-only behavior and prose mentions open with the system app.
License
MIT
nexu-io/open-design
freestylefly/awesome-gpt-image-2
anywhere-labs/dsh-desktop
walkinglabs/learn-harness-engineering
awesome-dsh-plugin/awesome-dsh-plugin
MemTensor/MemOS