dsh-trans-md
其他 活跃维护

dsh-trans-md

passerby325799/dsh-trans-md

自动将超过15行的最终回复写入工作区Markdown文件,聊天窗口只留内容摘要与文件路径。不需要手动复制粘贴,保持对话简洁清爽,同时方便随时打开文件查看完整输出。

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

dsh-trans-md

Long replies become Markdown files — for DeepSeek Harness (dsh).

Very long assistant replies can be truncated mid-stream by the transport. dsh-trans-md moves the bulk of long replies into a workspace Markdown file and keeps the chat reply short. It also saves tokens: content written to a file as a tool argument is paid for once, while a long chat reply stays in context and is re-sent on every later request.

Install

dsh plugin --profile web add github:<owner>/dsh-trans-md

Restart dsh (or reload the profile), then the rule is active for new turns.

What it does

The plugin contributes one system-prompt section (order 40) stating a single rule:

  • If a user-facing final reply would exceed 15 lines, write the full content to docs/<prefix>-<topic>.md in the current workspace instead of sending it in chat.
  • The chat reply becomes a short digest (at most 10 lines) plus the file path.
  • Replies under 15 lines are sent normally in chat.
  • Writing the file and also pasting its body into chat is explicitly disallowed.
  • Investigation depth is unchanged — only the delivery location changes.

It registers no tools, no UI, and makes no network requests. The docs/ directory is created on first use.

Configuration

All fields are optional; the defaults are shown.

Key Default Meaning
enabled true Turn the rule off without uninstalling.
maxLines 15 Line threshold above which a reply goes to a file.
docsDir "docs" Workspace-relative directory for the files.
filePrefix "notes" Prefix for generated filenames.
ruleFile — Path to a Markdown file that replaces the built-in rule text entirely.
workspaceRoot — Optional absolute base path; when omitted the process working directory is used.

Set them through the profile patch:

- id: dsh-trans-md
  name: dsh-trans-md
  config:
    maxLines: 20
    docsDir: notes

Custom rule text

Point ruleFile at any Markdown file to replace the built-in instruction. A non-empty file wins entirely; an empty or unreadable file silently falls back to the built-in text, so a bad path never breaks prompt assembly. Content is capped at 4000 characters.

Scope and limits

  • This is a prompt-level instruction, not a hard interception. It makes the behaviour the strongly preferred default; it cannot guarantee it in every turn. A hard guarantee would require an output hooks layer, which this plugin deliberately does not add.
  • The rule applies to the final user-facing reply. Intermediate narration between tool calls is exempt.
  • Styles apply to the main conversation only.

Requirements

  • DeepSeek Harness with a systemPrompt service available. If that service is absent the plugin mounts and contributes nothing rather than failing profile load.
  • No runtime dependencies.

License

MIT