DeepSeek Harness plugin

dsh-better-sidebar-terminal-plus

dsh-better-sidebar 的终端增强插件:在内置终端设置中添加「启动项」行,终端启动后自动执行配置的命令,无需注册新的 tab 类型

Jump to install

Source facts

Repository
dong-victor/dsh-better-sidebar-terminal-plus
Latest update
Aug 22, 2026
Category
Development & Runtime
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-21

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/dong-victor/dsh-better-sidebar-terminal-plus
Plugin: dsh-better-sidebar-terminal-plus
Author: dong-victor

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

@dong-victor/dsh-better-sidebar-terminal-plus

dsh-better-sidebar 的终端增强插件:内嵌 Nerd Font 图标字体、修复 xterm 图标渲染缺陷、兜底底部面板遮挡对话框、稳定终端 cwd。

不注册新的 tab 类型 — 直接扩展 dsh-better-sidebar 内置的「终端」tab。

> 历史说明:v0.2.x 的「启动项」(终端启动后自动执行命令)功能已在 v0.3.0 移除—— > dsh-better-sidebar ≥ 0.14.0 已在终端设置中官方提供「Shell 路径 / Shell 参数」 > 配置(可直接把 shell 指到任意可执行文件),该功能不再需要。

安装

dsh plugin --profile web add @dong-victor/dsh-better-sidebar-terminal-plus

功能

  • 内嵌 Nerd Font Symbols 子集:nushell 等 prompt 的 Powerline / Nerd 图标

(U+E0A0-E0FF 等 PUA 码段)不再显示为方块问号(tofu),无需安装系统字体

  • 修复图标「半边」渲染:中和 xterm DOM renderer 写入字符 span 的负

letter-spacing.xterm-rows span{letter-spacing:0 !important}

  • 底部面板遮挡兜底:新版 shell DOM 缺少内置 `[data-dsh-frame] >

[data-pane="conversation"]` 让位锚点时,注入等价的 margin 让位规则, 底部/右侧面板挤压对话列而不是浮在输入框上面

  • 抑制「底部面板自动开终端」:dsh-better-sidebar ≥ 0.14.0 首次展开底部

面板会自动塞入一个终端盖住对话下半屏,本插件通过官方设置路由默认关闭 (仍可在侧边卡片设置中手动开启)

  • 切换工作空间不重载终端:冻结内置 TerminalView 首次挂载时的 cwd,

工作空间切换不再触发 socket 重连 → shell 重启 → 历史清空;切换会话 (对话)仍按预期重挂载

⌨️ 终端快捷键(v0.4.x)

功能按键行为
中断Ctrl+Shift+C向 PTY 发送 ^C(接管原 Ctrl+C 的中断角色)
复制Ctrl+C(macOS 另支持 Cmd+C有选中文本 → 复制到系统剪贴板;无选中 → 原样放行,shell 照常收到 ^C
粘贴Ctrl+V(macOS 另支持 Cmd+V粘贴系统剪贴板(xterm 核心 paste,自动处理换行转换与 bracketed paste mode)

各平台行为

运行表面中断 Ctrl+Shift+C说明
Windows / Linux 的 Chrome 标签页❌ 被浏览器占用Chrome 在浏览器层保留 Ctrl+Shift+C 打开 DevTools,页面收不到该 keydown,任何网页代码都无法覆盖。中断请用无选中的 Ctrl+C
macOS 的 Chrome 标签页✅ 可用macOS Chrome 的 DevTools 检查器是 Cmd+Shift+C(同样被保留,故不映射 Cmd),Ctrl+Shift+C 会正常送达页面
桌面壳 / Electron 等按键可达表面✅ 可用壳层未保留该键时绑定直接生效
  • macOS 复制/粘贴:Cmd+C / Cmd+V 走浏览器原生剪贴板命令(xterm 标准路径);

Cmd+C 在 helper textarea 失焦时也由插件的 copy 探针兜底。Ctrl+C / Ctrl+V 在 macOS 上同样有效。

  • Linux:与 Windows 行为完全一致(Chrome 同样保留 Ctrl+Shift+C)。

与 shell 无关

三层机制全部位于 xterm 前端层 / PTY 标准输入层,不感知具体 shell:

  • 复制:读取 xterm 内部选择(DOM 层),不经过 PTY;
  • 粘贴:写入 xterm 输入管线(换行转换、bracketed paste mode 由 xterm 处理);
  • 中断:向前端重放 Ctrl+C keydown,xterm 键盘管线发出 \x03 字节进 PTY,

中断语义由 tty/conhost 与各 shell 自行决定。

已在 Windows 实测 ^C 中断 ping -n 30(node-pty 直连):PowerShell、cmd、 nushell 全部生效(TTL 输出冻结、cmd 回到提示符)。bash/zsh/fish 等 POSIX shell 走 tty ISIG 信号路径,同样适用。

实现说明

不 import @xterm/xterm,也不持有实例(Terminal 是视图 effect 内的闭包局部 变量)——全部通过 xterm 已绑定的 DOM 事件驱动:

  • 复制:向 .xterm 根元素派发合成 copy 探针(xterm 的 copyHandler 有

选中时填充 clipboardData 并 cancel,无选中放行 ^C);

  • 粘贴:主路径放行浏览器原生 paste 进 helper textarea,300ms 无原生

paste 再走 clipboard API + 合成 paste 事件兜底;

  • 中断:向 textarea 重放去掉 Shift 的 Ctrl+C keydown(补丁

keyCode=67),由 xterm 自己的键盘管线发出 ^C

架构

  • Client half (src/client/index.tsx):

- ensureNerdFontStack():注入 @font-face + 字体栈追加 + letter-spacing 覆盖 - ensureBottomPanelYield():布局让位兜底 CSS - suppressBottomAutoTerminal() + patchStorePrefs():关闭底部面板自动终端 - ensureTerminalKeyBindings():Ctrl+Shift+C / Ctrl+C / Ctrl+V 绑定 (合成 copy/paste/keydown 事件驱动 xterm 自身处理器,零实例依赖) - TerminalEnhancer:包装内置终端组件(frozenCwdRef cwd 冻结 + 挂载时补丁内存 prefs)

  • Host half (src/index.ts): 空实现(所有功能在 client 端完成)

开发

pnpm install
pnpm run typecheck
pnpm run build

License

MIT