DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

dsh-paste-code-block

Paste Code Block

Cherry Studio 风格的 DSH Web 粘贴功能:粘贴的文本/代码会变成带边框、可折叠、带语言标签的卡片,显示本地化名称(中文/English),并提供一键移除按钮;发送时还原为围栏代码块——并折叠回收起状态,可展开

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add dsh-paste-code-block@0.2.7
README兼容性版本
Preview — pasted blocks become tidy cards

兼容性与来源证明

Paste Code Block 以 dsh-paste-code-block 发布,当前版本为 0.2.7。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/11/5

版本

0.2.7stable
2026/10/18
0.2.6stable
2026/10/8
0.2.5stable
2026/9/14
查看其余 4 个版本收起版本
0.1.3stable
2026/9/14
0.1.2stable
2026/9/12
0.1.1stable
2026/9/11
0.1.0stable
2026/9/9

相关插件

正在加载相关插件…

最新版
0.2.7
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
661.7 kB
文件数
27
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 3
周下载
313
安全扫描
✓ v0.2.7 扫描通过
最近提交
2026/10/8
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 ui-customization 分类下经过校验的插件。

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Experimental Session Titles Bundle@deepseek-ai/dsh-experimental-session-titles-bundle新的用户提示到达时刷新会话标题。Personalized Recommendations@deepseek-ai/dsh-personalized-recommendations回答下方以卡片形式提供个性化页面和内置插件推荐Experimental Agent Team Web Profile@deepseek-ai/dsh-experimental-agent-team-web-profile用于 Agent Teams Remote 和 UI 插件的实验性 Web 配置层

README

dsh-paste-code-block

Cherry Studio‑style text/code block pasting for DeepSeek Harness Web

Paste long code or text into the DSH Web composer → it lands as a bordered, collapsible, language‑tagged card instead of a wall of text. Names follow the DSH interface language (中文 / English). On send, the original content is restored as a fenced code block — and in the conversation it stays folded into click‑to‑expand cards, so your bubbles never become text walls again.

English | 简体中文

Preview — pasted blocks become tidy cards

Why

Copying a 200‑line stack trace, an API response, or a long log into a chat input turns the composer into an unreadable blob. This plugin folds any qualifying paste into a chip (built on DSH's own hidden‑reference mechanism, the same one file uploads use) plus an editing detail card — the draft stays clean, and the content stays fully editable and restorable.

Features

  • 🧩 Auto block detection — pasted text with ``` fences, newlines, heavy indentation, or length ≥ 96 becomes a card; ordinary short prose pastes through untouched.
  • 🏷️ Language tags — auto-detects Python / JS / JSON / YAML / SQL / bash / HTML·XML / C++ / Go / Ruby (incl. shebangs); plain-text blocks are tagged text.
  • ✏️ In-card editing — edit the content right in the detail card; the edited text is exactly what gets sent. Plus copy, collapse/expand, and hide.
  • 🈯 Localized names — chips are named in the current DSH language: 代码块 1 / Code #1, 文本块 N / Text #N. A leading glyph and tint tells the two apart at a glance — </> blue for code, Aa gray for text. Switching Settings → Language live-retitles every chip.
  • × One-click remove — every chip carries its own × delete button (the detail card has one too); a removed number is recycled immediately.
  • 📤 Fenced restore on send — each card expands back into a ```lang … ``` block when you send; a failed send automatically refills the input.
  • 📦 Folded after send — sent blocks keep folding in the transcript: every fenced block inside your own messages renders as a collapsed card (python · 128 行 / python · 128 lines). Click the header to expand, again to collapse; the card's copy button grabs the original fenced text verbatim. Bare ``` fences fold as code (only an explicit ```text folds as a text block).
  • 💾 Mid-draft safe — DSH persists a composer draft as plain text, so pasted blocks are automatically re-attached when the composer is rebuilt (workspace switch on the new-session page, page reload); hand-deleted blocks are never "resurrected".
  • 🔢 Smart numbering — code and text count apart; the smallest free number is always reused.
  • 📱 Every surface — pure client plugin; works on desktop & mobile web, follows light/dark themes.

How it works

Four steps: copy · paste · tidy · send

Localization

Chip labels, tooltips, line counts, and the send-time error notice all render through the official DSH locale service: the plugin registers a paste-code-block dictionary namespace with complete zh / en key sets, and its composer dock declares that namespace, so everything re-renders on every language switch.

Block names follow the UI language

  • New pastes are named in whatever language is active at paste time.
  • Existing chips are re-titled live when you flip 设置 → 语言 / Settings → Language — no reload needed.
  • Clicks and deletes match chips across languages: a 代码块 2 chip still resolves to its block after switching to English (where it now reads Code #2), and vice versa.

Install

Requires DSH 0.1.x (developer preview — APIs may change). Published on npm — install by name:

dsh plugin --profile web add dsh-paste-code-block

Or from this repository / a local checkout:

dsh plugin --profile web add github:cjm-m/dsh-paste-code-block   # from GitHub
dsh plugin --profile web add file:/path/to/dsh-paste-code-block  # from a local folder

Restart dsh web after installing.

Usage

  1. Copy any code or multi-line text from anywhere.
  2. Paste into the DSH input → it collapses into a chip such as 代码块 1 / Code #1.
  3. Click the chip to open the card: read, edit inline, copy, collapse. Click the chip's (or the card's) × to delete that block.
  4. Send — the full original text goes out as a proper fenced code block.
  5. In the conversation it stays folded: each block sits in the bubble as a collapsed card — click the header to expand and read, click again to collapse.

Detection threshold: contains a newline / ≥ 2 lines / length ≥ 96 / indented & brace-dense / fenced — any one turns the paste into a block.

Notes & boundaries

  • Blocks are appended at the end of the draft (reusing DSH's hidden-reference semantics), which keeps cursor/undo stable.
  • Plain-text blocks are sent wrapped in ```text ``` so they never smear into one line.
  • Removing a chip any other way (e.g. Backspace) also frees its number — plugin state is reconciled against the editor continuously.
  • Deleting one block never touches the others, and removal is an ordinary editor edit — Ctrl+Z brings it back.
  • Creating a block leaves no stray space: DSH appends a separating space after a freshly inserted chip, and the plugin removes exactly that one character, so text typed after a block does not start with a space and pasting several blocks never piles spaces into the message. Spaces you typed yourself are never touched by pasting or deleting.
  • Post-send folding is display-only: it restyles your own message bubbles (and steering rows / the send echo) in the DOM. Stored messages are never modified, the bubble's own copy / edit / delete bar keeps working on the original text, and assistant messages are left alone.
  • Draft-rebuild recovery keeps a small localStorage mirror (block payloads plus a draft fingerprint; written while you edit, cleared when you send, expired after two weeks). If the browser blocks local storage (private mode), blocks still survive a same-tab workspace switch from memory — just not a full page reload.

Project layout

dsh-paste-code-block/
├── src/
│   ├── client.js       # Web (browser) half — paste capture, chips, detail card, × delete, sent-message fold, draft-rebuild recovery
│   ├── index.js        # Host (node) half — intentionally empty (pure UI plugin)
│   ├── parse.js        # Pure block-detection + fence-splitting logic (canonical, unit-tested)
│   └── i18n.js         # Locale dictionaries, label & fold-title builders (canonical, unit-tested)
├── tests/
│   ├── parse.test.js     # node:test unit tests for src/parse.js
│   ├── i18n.test.js      # node:test unit tests for src/i18n.js
│   └── fold-smoke.test.js # end-to-end fold scan against a DOM shim (runs the real client bundle)
├── docs/
│   ├── design.md       # Design rationale (numbering, anchors, codec, i18n, chip ×, sent-message fold, draft-rebuild recovery)
│   └── images/         # README mockups (PNG + editable SVG sources)
├── cordis.patch.yml    # DSH bundle patch declaring the host plugin
├── package.json        # Package + DSH plugin manifest
├── README.md           # English
└── README.zh-CN.md     # 简体中文

Development

npm run check   # syntax-check the JS halves
npm test        # run unit tests (node:test, 61 tests)

License

MIT — see LICENSE.