dsh-envelope-highlight
Restore syntax highlighting of read/write tool envelopes inside run_code (PTC / Code Mode) result cards
flashyiyi
@flashyiyi
⬇ 1
★ 0
master
安装
dsh plugin --profile web add github:flashyiyi/dsh-envelope-highlight
需要可复现安装时,可在仓库后追加 #commit 固定提交。
Restore syntax highlighting of read/write tool envelopes inside run_code (PTC / Code Mode) result cards
该插件未提供要点说明,请参考仓库 README。
dsh-plugincode-modedshptcsyntax-highlightingdeepseek-harness
- 安装并启动 DeepSeek Harness:
npx @deepseek-ai/dsh web - 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
- 用 dsh plugins list 确认已安装,必要时重启 Harness 生效
插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。
| 代码仓库 | github.com/flashyiyi/dsh-envelope-highlight |
| 许可证 | 未标注(见仓库) |
| 主要语言 | master |
| 下载量 | 1 |
| GitHub 星标 | 0 |
| 最近推送 | 2026-08-29 |
| 收录日期 | 2026-09-19 |
| 分类 | 工具与能力 |
事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。
以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。
# dsh-envelope-highlight
Restore syntax highlighting of read-tool results inside `run_code` (PTC / Code Mode).
## Problem
In native mode, the `read` tool's result renders as a line-numbered,
syntax-highlighted code view (`ReadBlock` + shiki). In **PTC / Code Mode**,
the model calls tools through `run_code` programs, and read results arrive in
two shapes — both rendered as **plain text** by the official UI:
1. **Structured object** `{ path, lines, totalLines }` — returned from the
program, it lands in the `run_code` card's OUT area as raw JSON;
2. **Envelope text** (`…\nfile\n…\n`,
tool-fs's `formatReadOutput`) — the read sub-call (code-dispatch) content.
The syntax highlighting is lost in both cases.
## Solution
This plugin registers two keyed `tool.call.toolview` views:
- **`run_code`** (not registered by the shipped UI — zero replacement risk):
read envelopes and read-result JSON in the OUT area are parsed and rendered
as `ReadBlock` — file line numbers in the gutter, shiki syntax
highlighting, the same visual language as the native read card.
- **`read`** (`priority: -1`, shadowing the official row): code-dispatch
sub-calls (whose `resultView` is always null) get their envelope content
rendered as `ReadBlock`; native read calls are reproduced exactly like the
official `ReadRow`.
Non-read output stays exactly as before.
## Install
```bash
dsh plugin --profile add dsh-envelope-highlight
```
## Build (from source)
```bash
# requires a dsh source checkout (DSH_CHECKOUT) with tsc/tsdown
npm run build # host (tsc) + client (tsdown) → lib/
npm pack
```
## Scope
- ✅ `run_code` chat-row result card: read envelopes + read-result JSON →
highlighted `ReadBlock`
- ✅ `read` sub-call rows under the run_code tree (code-dispatch) →
highlighted `ReadBlock`; native read rows unchanged
- ❌ Details panel (`conversation.details.tool`) — not covered yet
## License
MIT
数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。