dsh-line-select
Manifest validLine-range selection: browse workspace files, preview code with line numbers, visually select a line range, and write a `@path:start-end` reference into the composer; the agent receives the exact sele
dsh-line-select · 行选区插件
DeepSeek Harness Web GUI 插件:浏览当前工作区文件、带行号预览代码、可视化选中行范围,并把 @相对路径:start-end 引用写入输入框——agent 发送消息时会自动拿到所选行的原文,精准修改第 10–50 行这类区间。
功能
- 文件树浏览:输入框上方新增「⛶ 行选区」按钮,面板内浏览工作区目录(隐藏文件跳过、目录优先)
- 带行号预览:点击文件打开只读代码视图(语法纯文本 + 行号,深色/浅色主题自适应)
- 行范围选择:点击行号选起点,再点一次定终点(双向都行,自动取 min–max),选区高亮显示
- 写入输入框:一键把
@src/app.ts:10-50追加到当前草稿;Host 端在发送前自动把该引用展开为<workspace-selection>注入,agent 无需自己读文件就能看到第 10–50 行原文 - 选中文件(整文件引用):底部「选中文件」按钮把
@src/app.ts写入草稿,让 agent 用 read 工具读整个文件(不把大文件内容灌进上下文) - 也支持手写引用:直接在输入框输入
@src/app.ts:10-50、@src/app.ts:10(单行)或@src/app.ts(整文件),无需打开面板
安装
dsh plugin --profile web add <本目录或 tarball 路径>
安装后重启 dsh web。
卸载:
dsh plugin --profile web remove dsh-line-select
工作原理
| 层 | 说明 |
|---|---|
| Host(lib/index.js) | lineSelect Typert Remote 服务(strict manifest):list 列目录、read 带行号读文件;agent/pre-step 扫描用户消息里的 @path:start-end,读取行范围并注入 <workspace-selection path="…" start-line="…" end-line="…"><line n="…">…</line></workspace-selection> |
| Client(lib/client.js) | conversation.input.dock 条目:面板 UI + 选区交互;通过 inputActions.setDraft 写入草稿(官方公开 seam) |
安全
- 所有路径经
confine()强制限制在会话 cwd 内(拒绝绝对路径、盘符与..穿越) - 只读:不写盘、不执行任何文件内容
- 上限:单文件 ≤ 1MB(超限只读头部)、预览 ≤ 800 行、单次注入 ≤ 400 行
- 零第三方运行时依赖(仅
@deepseek-ai/dsh-typert-protocol与@deepseek-ai/dsh-llmpeer 依赖,由 DSH profile 提供)
许可
MIT
Compatibility
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.0 | — | — |
Similar plugins
Codex-style `@file` mentions: search workspace files in the composer and attach their contents to prompts.
★ 0
dsh plugin --profile web add dsh-at-fileCodex-style @file/@folder mentions for the DSH web composer: workspace file/folder picker menu, plain-text colored mention tokens via the platform lexicon scan, and a nested-git-aware file index.
★ 0
↓ 215/wk
dsh plugin --profile web add dsh-file-mentionLike Codex/Claude Code: drag any file or folder (no format limit) onto the DSH web page and its real absolute path is inserted into the composer instantly — no typing paths by hand. Workspace-first sm
★ 0
dsh plugin --profile web add dsh-drag-pathby FSMargoo
Codex-style @file mentions for DeepSeek Harness: search workspace files in the composer and attach their path to prompts.
★ 513
↓ 1.9k/wk
MIT
JavaScript
Sep 1, 2026
dsh plugin --profile web add dsh-at-fileby a735624258
DSH 实现 workbuddy 同款选择 skill 功能 | WorkBuddy-style skill picker for DeepSeek Harness: pick a skill in the composer, insert the official /skill-name gesture, and DSH loads it with your message.
★ 28
MIT
JavaScript
Sep 13, 2026
dsh plugin --profile web add dsh-skill-pickerComposer code-quote collapse for the DSH Web UI: pasting a `path:line` header followed by code folds the input into one compact inline quote token (Ctrl+Z reverses it), and at send time the `agent/pre
★ 0
dsh plugin --profile web add dsh-code-quote