dsh-preview-panel
其他 活跃维护

dsh-preview-panel

Jiong-w-ang/dsh-preview-panel

轻量级多标签分屏预览面板插件,支持在同一区域内并行预览文档、代码片段与网页内容,可自由切换标签、调整分屏布局,操作流畅无额外配置负担,开箱即用可快速接入现有开发工作流。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
0
Open Issues
TypeScript
主要语言
None
开源协议
66 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:Jiong-w-ang/dsh-preview-panel
git clone https://github.com/Jiong-w-ang/dsh-preview-panel.git
git clone git@github.com:Jiong-w-ang/dsh-preview-panel.git
README.md main

@deepseek-ai/dsh-client-ui-preview

English | 中文

Preview panel for agent-produced artifacts. The browser half registers one entry into the conversation view ring (conversation.view, id preview): it accumulates the files a turn produced (from the mutation tools' render-intent locations, filtered to a preview whitelist) and renders the selected file in a sandboxed surface — HTML in a sandbox-scoped iframe, images and SVG inline, and JSON/Markdown as read-only code. The package is a pure consumer: composing it out of cordis.yml removes the tab at zero cost.

Usage

Compose the package into the client and the preview tab appears beside the chat view:

plugins:
  '@deepseek-ai/dsh-client-ui-preview': true

For each turn the panel accumulates files whose render-intent locations end in a whitelisted extension (.html, .htm, .svg, .png, .jpg, .jpeg, .json, .md), deduplicated by path and newest-turn-first. Selecting a file reads it through the host's session.readFile RPC and renders it by MIME:

  • text/html — a sandbox="allow-scripts" iframe; the page's scripts run against an opaque origin and cannot reach the shell
  • image/png / image/jpeg / image/svg+xml — an inline <img> over a base64 data URL
  • application/json / text/markdown / anything else — a read-only code block (Markdown renders as formatted text)

The host refuses reads outside the session cwd, outside the extension whitelist, or above 20 MiB (5 MiB returns a truncated preview with a warning).

Model Experience

None, as the preview panel renders session data in the browser; nothing here reaches a model request.

KV Cache effect

None; this package neither assembles nor sends a provider request.

Known Limitations and Deferred Work

  • File content read is a new host→client RPC — the panel reads produced-file bytes through a session.readFile remote limited to the session cwd, a preview extension whitelist, and a size ceiling; rendering falls back to a not-previewable notice when the host refuses.