DeepSeek Harness plugin

dsh-question-panel-collapse

提问面板折叠:agent 提问时把问答面板折叠成一条紧凑条(保留标题与取消),展开后回答草稿不丢。Collapse the DSH question panel into a compact strip; the unsent answer draft survives expand.

Jump to install

Source facts

Repository
Townrain/dsh-question-panel-collapse
Latest update
Aug 16, 2026
Category
Memory
GitHub stars
1
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-20

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/Townrain/dsh-question-panel-collapse
Plugin: dsh-question-panel-collapse
Author: Townrain

Check the source files

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

File explorer3 files
README.mdSource · read only

dsh-question-panel-collapse

DeepSeek Harness (DSH) Web 的提问面板折叠插件:agent 向你提问时(ask_user / plan 审批等),提问面板会直接占住对话框底部一大块。本插件在提问面板自己的 header 里(✕ 取消按钮左边)加一个纯图标 chevron 小按钮——点它把面板折叠成一条紧凑小条(不是消失),再点展开,未提交的回答草稿原样保留

功能

  • 折叠(⌄):面板 header 内 ✕ 左边的纯图标 chevron 按钮(无文字)。点击后面板收缩成一条紧凑小条:左上角保留问题标题(13px 单行省略)、右侧保留 ✕ 取消与 chevron。
  • 展开(⌃):点折叠条里的 chevron,面板恢复完整内容(问题、选项、提交区),回答草稿原样保留(折叠只是 CSS 隐藏内容区,面板组件与草稿 state 始终存活在 composer chain 中)。
  • 折叠状态持久化到 localStorage(刷新/切换工作区保留)。
  • 覆盖 QuestionFlow(选择题/填空)与 PlanReviewPanel(plan 审批)两种面板形态。
  • 中英文双语 tooltip(跟随 DSH locale 服务)。
  • 纯前端:无 host 命令、无 LLM 调用、不进会话日志。

安装

dsh plugin --profile web add ./dsh-question-panel-collapse

或从 GitHub 安装:

dsh plugin --profile web add "github:Townrain/dsh-question-panel-collapse#main"

重启 DSH Web 后生效;下次 agent 提问时,面板右上角 ✕ 左边出现 chevron 按钮。

工作原理

环节机制
按钮位置React Portal 渲染进 [data-question-key] header,wrapper insertBefore 插到 ✕ 之前,margin-left:auto 贴右(header 是 flex + space-between)
面板检测MutationObserver 监听面板 DOM 出现/消失(rAF 节流),注册在 shell.overlay(frame 悬浮层,不被 composer chain 的 fallback 隐藏机制影响)
折叠切换[data-conversation-scroll] 上切换 dsh-question-panel-collapse-on class,CSS 隐藏 [data-question-scroll] 内容区与 footer 提交区,header 压缩为紧凑条(标题小字、chevron 略下移)
草稿保留内容区 display: none 不动面板 state,展开后原样恢复
状态共享模块级 observable + useState 桥(session 作用域 entry store 按 entry×session 各自实例化,无法跨组件共享),写时持久化 localStorage
硬依赖inject = ['slots', 'locale'] — 均为官方 harness 客户端服务;react-dom portal

开发与打包

pnpm install
pnpm build   # tsdown: lib/index.js(ESM host)+ lib/client.js(ModuleLoader 客户端 bundle)

License

MIT