DSH Plugins Marketplace

DSH Plugins

Plugins

/

Sessions & Messages

/

luxueliu-dsh-md-writing-tools

l

luxueliu-dsh-md-writing-tools

Identified

DSH Sidebar Writing Still Requires Manual Clicking? Get the Full Word-Style Shortcut Suite in One Install: Bold/Italic/Strikethrough/Inline Code/Heading Level Up & Down/Insert Link/Format Painter; press the same key again to remove formatting, full-line awareness across multiple lines, and one-click reinstall when your sidebar upgrade gets overwritten — DeepSeek Harness Writing Plugin

给 DSH 侧边栏装上 Word 手感

dsh-md-writing-tools — 给 dsh-better-sidebar 的 CodeMirror 编辑器装上 Word 级 Markdown 写作快捷键:加粗、斜体、标题、格式刷,一次配齐。 host 侧幂等注入,dsh-better-sidebar 升级被覆盖后一键装回即自动重打。

dsh-plugin dsh-better-sidebar

这是什么

VS Code 里你可能用惯了一整套"给 Markdown 做 Word 操作"的快捷键(加粗/斜体/删除线/标题/格式刷……)。 dsh-better-sidebar 的编辑器是 CodeMirror,默认只有 Ctrl+S 保存,其它格式化键位一个没有。

本插件在 DSH 启动时自动向 dsh-better-sidebar/lib/client-editor.js 注入一套完整的 Markdown 格式化键位, 把它变成你熟悉的"Word 式写作"体验。

快捷键总表

快捷键功能说明
Ctrl/⌘+B加粗选中文字包 **text**;光标处插入占位
Ctrl/⌘+/斜体包 *text*
Ctrl/⌘+-删除线包 ~~text~~
Ctrl/⌘+`` 行内代码包 `text`
Ctrl/⌘+Alt+←标题变小一级对光标所在行/选中多行生效(### → ####)
Ctrl/⌘+Alt+→标题变大一级#### → ###;无标题行加一级 #
Ctrl/⌘+K插入链接选中文字 → [text](https://github.com/luxueliu/luxueliu-dsh-md-writing-tools/blob/HEAD/url),光标停在 url 处
Ctrl/⌘+Alt+C格式刷(复制格式)选中带格式文本,识别加粗/斜体/删除线/代码/标题
Ctrl/⌘+Alt+V格式刷(粘贴格式)选中目标文本应用刚复制的格式
Esc取消格式刷清除已复制的格式

智能行为(移植自 VS Code markdown-writing-tools):

  • 重复按键 = 取消格式:对已加粗文本再按 Ctrl+B 会去掉 **,不是越包越厚。
  • 多行/整行感知:跨多行选中时,对每一行分别处理;表格单元格、引用块、列表项、标题前缀都能保留。
  • 标题逐级:Ctrl/Alt+←→ 对整行生效,支持引用块内标题(> ## x)。
  • 格式刷:先 Ctrl+Alt+C 复制(状态栏可感知),再选中目标 Ctrl+Alt+V 应用,一次即清。

安装

# 推荐:从 GitHub 仓库安装(自动触发注入)
dsh plugin --profile web add luxueliu/luxueliu-dsh-md-writing-tools

# 或发布到 npm 后:
# dsh plugin --profile web add luxueliu-dsh-md-writing-tools

装完重启 DSH(插件在启动时注入),然后硬刷新浏览器(Ctrl+Shift+R)加载新的编辑器 bundle。

better-sidebar 升级后一键装回

dsh-better-sidebar 升级会覆盖 client-editor.js(本地注入丢失)。此时:

# 方式一:重装本插件(触发重新注入)
dsh plugin --profile web add luxueliu/luxueliu-dsh-md-writing-tools
# 方式二:直接重打(不经过插件安装流程,在插件仓库目录内执行)
node lib/index.js

注入是幂等的:检测到 marker(/* dsh-md-writing-tools:injected */)就跳过,文件被覆盖后自动重打,不会重复叠加。

原理

  • dsh-better-sidebar 只向插件开放 registerTab / registerFileViewer / openFile 扩展点,不提供编辑器 keymap API。
  • 因此本插件采用 host 侧注入:apply(ctx) 时定位 dsh-better-sidebar/lib/client-editor.js, 在 CodeMirror 编辑器创建处插入格式化函数 + keymap 挂载(...mdwtKeymap),写回文件。
  • 插入代码全部为浏览器端普通 JS(无依赖),打包产物语法校验通过。
  • 备份:注入前若存在 .bak.* 基线备份,可用 restoreAndInject() 还原后再注入。

目录结构

lib/
  index.js      # DSH 插件入口:apply() 时自动注入
  inject.js     # 注入器:定位 bundle / 幂等检查 / 注入 / 备份还原
  snippet.txt   # 注入到浏览器 bundle 的代码块(格式化函数 + keymap)
package.json
README.md

开发

node --check lib/index.js && node --check lib/inject.js   # 语法检查
node lib/index.js                                         # 手动触发一次注入

Roadmap / 已知限制

  • 本地 MD 双击默认用 dsh 侧边栏打开:已调研,当前无现成通道——
    • DSH web 核心无 URL 深链参数(?open=/?path= 均不支持);
    • dsh-better-sidebar 的 /sidebar/api 无 open 方法(只有 fs/git/sidechat 等);
    • sidebar_open 背后的推送通道(AgentOpenRegistry)是 better-sidebar 内部对象,不对外暴露。
    • 要落地需上游支持(DSH/better-sidebar 加深链或 open HTTP 端点)或本地补丁(重装即丢,不推荐)。
    • 当前替代:聊天里文件链接点击(interceptOpenPath 默认开)→ 侧边栏编辑器打开,走的是同一套渲染。

License

MIT

Comments

Loading…

Similar plugins

dsh-writing-studio

by tea-whale

DeepSeek Harness (DSH) 写作工具插件:长文工作流、风格控制与 8 套常用写作模板,进度落盘、跨轮次续写。零运行时依赖。

Development & InfrastructureManifest valid

★ 1

MIT

JavaScript

Sep 9, 2026

dsh plugin --profile web add dsh-writing-studio

by hh719509125

DeepSeek Harness (DSH) 文档编辑插件:在右侧栏的文档预览里就地编辑文本文件并保存,支持 Ctrl+S、冲突保护、行尾逐字节保留。In-place document editor for the DSH Sidebar preview: Ctrl+S, conflict protection, byte-exact line-ending preservation.

Tools & CapabilitiesManifest valid

★ 5

MIT

JavaScript

Oct 8, 2026

dsh plugin --profile web add @local/dsh-plugin-document-editor

by kee0012

DSH 提示词优化插件:输入框工具栏一键 ✨ 优化(直接写回可还原),风格/上下文/还原等设置收纳进 ▾ 弹出层。

Development & InfrastructureManifest valid

★ 2

↓ 356/wk

MIT

JavaScript

Oct 13, 2026

dsh plugin --profile web add dsh-prompt-optimizer

by ruiyukirin

DSH 输入框一键提示词增强按钮 | One-click prompt enhancement for the DeepSeek Harness composer: rewrite the unsent draft into a clearer, more specific prompt, restore the original with one click. Ported from Tencent WorkBuddy's EnhancePrompt design; independent model call that never touches the session log.

UI & ExperienceSessions & MessagesManifest valid

★ 1

MIT

JavaScript

Oct 25, 2026

dsh plugin --profile web add dsh-prompt-optimization-master

by csiroqa

DeepSeek Harness(DSH)全局快捷键插件:会话切换、发送/清空草稿、停止生成、复制与归档,键位可在设置中自定义。Global keyboard shortcuts plugin for DeepSeek Harness.

Manifest valid

★ 0

MIT

TypeScript

Aug 23, 2026

dsh plugin --profile web add @dsh-plugin/hotkeys

by 1250589385

DSH 快捷发送插件:在输入框下方、上下文进度旁提供可自定义的快捷指令按钮,一键把预设文字直接发送到当前对话,省去重复打字;每条指令的名称、字号、透明度、模块化形状与发送内容均可就地编辑,右键按钮组可拖动换位置。修复上下文进度与累计使用区域被挤压后无法点击的问题。

UI & ExperienceTerminal & ClientsManifest valid

★ 0

MIT

JavaScript

Oct 23, 2026

dsh plugin --profile web add dsh-quick-send