13071301808/dsh-composer-expand 预览 preview

13071301808/dsh-composer-expand

针对DeepSeek Harness(dsh)的Composer展开/折叠切换:在composer工具行中添加一个⬆/⬇按钮,可将输入区域扩展至70vh高的写作视图,便于长草稿的编辑。

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH), designed to add expand and collapse functionality to DSH's composer input field. It injects a toggle button into the official conversation.input.right slot next to the send button, letting users switch between the default capped input height and a 70vh expanded writing view with one click. The default DSH setup caps the composer at 336px, which forces users to scroll constantly when editing long prompts or multi-line drafts, and this plugin solves that exact usability problem by adding a straightforward toggle.

When you are working with short drafts or small prompts, the plugin keeps DSH's original default behavior so your existing workflow does not change at all. When you start writing a longer prompt or drafting a longer document, you can just click the toggle button to switch to the expanded view that gives you more than enough space to edit and review your full text. In the expanded state, pressing Enter only inserts a line break instead of sending the message, while Ctrl+Enter or Cmd+Enter still works to send your input, just as you are used to from DSH's default behavior.

The plugin is pure frontend, with no external API calls, LLM interactions, or custom host commands, so it does not add any extra latency to your DSH experience. It saves the expand/collapse state to the browser's localStorage, so your preference is retained even after you refresh the page or switch between different workspaces. It is compatible with both the newer Lexical composer and older textarea-based composer in DSH, and it is released under the open source MIT license. The recommended installation method is running dsh plugin --profile web add dsh-composer-expand via the DSH CLI.

这是专为 DeepSeek Harness(DSH)打造的原生插件,用于给 DSH 的 composer 输入框添加展开/收起功能。它在发送按钮旁的官方预留控件位添加了一个切换按钮,点击即可在默认封顶高度和 70vh 高的书写视图之间自由切换,解决了长提示词挤在小窗口里反复滚动查看和编辑的问题。

对短草稿,本插件保持默认行为不变;当你需要编写较长的 prompt 或长文档草稿时,可以一键切换到大视图获得足够的编辑空间。展开状态下普通回车仅插入换行,不会触发发送,搭配 Ctrl/Cmd+Enter 发送的使用习惯不变,完全不影响原有交互逻辑。

本插件采用纯前端实现,无后端调用、不依赖 LLM,状态会保存在浏览器 localStorage 中,刷新页面或切换工作区后依然保留,适配 DSH 新版 Lexical 编辑器和旧版 textarea,使用 MIT 许可证开源,推荐通过 DSH CLI 命令安装。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 6 stars - very few users, little community feedback星标只有 6,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-composer-expand

把 13071301808/dsh-composer-expand 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-composer-expand

Listed on DSH Directory

为 DeepSeek Harness(dsh)打造的 composer 展开/收起插件。在 composer 工具行放一个 ⬆/⬇ 按钮,点击在「默认封顶高度」与「70vh 高书写视图」之间切换,长草稿不再挤在一个小窗口里滚动。

为什么需要

DSH 默认把 composer 文本框封顶在一个较小高度(seat 上定义了 --dsh-composer-text-max-height: 336px,限制文本框滚动容器)。草稿变长后,只能在小窗口里滚动几行。本插件对短草稿保持默认行为,写长 prompt 时一键切换到大视图。

功能

  • ⬆ 按钮在 composer 工具行 — 位于 conversation.input.right(发送按钮旁官方预留的可点击控件位)。
  • 展开到 70vh — 在会话滚动容器上切换 CSS class;composer 输入区同步放宽 max-height。再点一次恢复默认封顶高度。
  • 展开最小高度 300px — 输入内容较少时也保持足够的书写空间;内容变多后最高仍受 70vh 限制。
  • 展开状态回车换行 — 展开时普通回车只插入换行,不触发发送;Ctrl/Cmd + Enter 等带修饰键快捷键仍可用于发送;斜杠 / @ 触发菜单打开时不拦截,回车正常选候选。
  • 浏览器内持久化 — 状态写入 localStorage[dsh-composer-expand:expanded],刷新页面、切换工作区都保留。
  • 展开状态自愈 — 展开期间监听 DOM 重建:即使 harness 重建了会话滚动容器或 composer 卡片(切视图、切会话),展开样式与"回车换行"行为也会自动重新应用到新的输入框上。
  • 中英文双语 — 按钮文案与提示跟随 DSH 的 locale 服务。
  • 纯前端 — 无自定义协议、无 host 命令、无 LLM 调用、不进会话日志。
  • 不依赖构建哈希 — CSS 锚定 DSH 稳定的 data 属性(data-conversation-scroll / data-composer-seat / data-input-scroll / data-composer-input,并保留 textarea 时代的 data-input-mirror),同时兼容 Lexical 编辑器与旧 textarea 两代 composer,不碰每次构建都会变的哈希类名。
  • Lexical composer 适配 — 桌面版 0.1.2-alpha.1+ 的 composer 已换成 Lexical contenteditable:本插件改用 composer seat 上的 capture 阶段 keydown 拦截普通回车(先于 Lexical 的 bubble 监听),展开时回车仍是换行而不是发送。

安装

通过 npm 安装(推荐)

dsh plugin --profile web add dsh-composer-expand

已发布到 npm,包含预构建产物,无需本地构建。

源码本地开发

dsh CLI 必须在 PATH 上。若你只用 npx 跑过 harness,dsh 尚未全局安装,会报 zsh: command not found: dsh——先全局安装:

npm install -g @deepseek-ai/dsh

从本仓库安装:

# 1. 构建产物(tsdown 生成 lib/index.js + lib/client.js)
pnpm install
pnpm build

# 2. 加入 web profile
dsh plugin --profile web add ./

# 3. 以该 profile 重启 harness
dsh --profile web

重启后 ⬆ 按钮出现在 composer 工具行(发送按钮旁)。可在 设置 → 插件 中确认 dsh-composer-expand 已列出。

工作原理

环节 机制
按钮位 conversation.input.right 列表槽位(会话作用域);ctx.slots.inject 注册单个 React 组件
切换状态 React useState,初始值读 localStorage[dsh-composer-expand:expanded];变更时写回 localStorage
DOM 挂钩 document.querySelector('[data-conversation-scroll]').classList.toggle('dsh-composer-expand-on', on) — 会话滚动容器上的官方稳定属性
CSS 契约 .dsh-composer-expand-on 在 [data-composer-seat] 上覆盖 --dsh-composer-text-max-height(真正的 336px 上限)为 var(--dsh-composer-expand-height)(默认 70vh),并给 [data-input-mirror] 设 min-height: 300px,即使内容很少输入框也会明显变高
硬依赖 export const inject = ['slots', 'locale'] — 均为官方 harness 客户端服务
无 host 命令 lib/index.js 是空 apply(),整个插件纯客户端

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-opencode-go-quota 下一个 Next dsh-subagent-profile →