dsh-composer-expand: Adding Composer Expand/Collapse to DeepSeek Harness

Preface

When writing long prompts in DeepSeek Harness (DSH), the composer text box is usually limited by its default height, causing drafts to scroll within a small window as they grow longer. dsh-composer-expand is a pure frontend plugin for DSH web that adds a button to the composer toolbar, switching the input area from the default capped height to a taller writing view. Below are its features, installation instructions, and notes on usage.

What This Is

dsh-composer-expand is a composer expand/collapse plugin for DeepSeek Harness, maintained by 13071301808 and licensed under MIT. It does not add host commands, call LLMs, or enter conversation logs—it only provides height toggling on the existing composer.

Core Features

  1. Adds an expand/collapse button to the composer toolbar.

  2. Toggles between the default capped height and a 70vh taller writing view.

  3. Sets a minimum height of 300px when expanded, ensuring sufficient writing space even with minimal input.

  4. In expanded mode, a regular Enter key inserts a line break without sending; shortcuts with modifier keys like Ctrl/Cmd + Enter still trigger sending.

  5. Persists the expanded state in the browser using localStorage[dsh-composer-expand:expanded].

  6. Button text and tooltips follow the DSH locale service, supporting both Chinese and English.

  7. Pure frontend: no custom protocols, no host commands, no LLM calls, and no conversation log entries.

  8. Hooks into stable attributes such as data-conversation-scroll, data-composer-seat, and data-input-mirror without relying on build hashes.

DSH’s default --dsh-composer-text-max-height: 336px is a design choice by DSH. This plugin only relaxes the composer text box container and does not affect other disclosure rows.

Installation and Activation

Install via npm:

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

After restarting the web profile, an expand button will appear in the composer toolbar (next to the send button). Restart according to your current DSH usage, for example:

dsh --profile web

You can verify that dsh-composer-expand is listed under Settings → Plugins.

Local Development

If developing from source, first ensure the dsh CLI is on your PATH. If not installed globally, run:

npm install -g @deepseek-ai/dsh

Then build and add to the web profile:

pnpm install
pnpm build
dsh plugin --profile web add ./
dsh --profile web

Local development requires engines: node ^22.19.0 || >=24.0.0; peerDependencies are @deepseek-ai/cordis ^4.0.1 and react ^18.2.0.

Typical Usage

After installation and restart:

  1. Click the expand button in the composer toolbar.

  2. The input area switches to a 70vh taller writing view; the minimum height is 300px when content is minimal.

  3. Use regular Enter for line breaks and Ctrl/Cmd + Enter to send.

  4. Click the button again to restore the default capped height.

  5. After refreshing the page or switching workspaces, the expanded state is remembered per browser.

Use Cases and Notes

Suitable for users who need to write longer prompts in DSH web and want to reduce scrolling within small windows.

Things to note before use:

  • The plugin runs with the current dsh process permissions; review the source code and license before installation.
  • The expanded state is remembered per browser, not per session; if multiple composers are rendered simultaneously in the future, the DOM selector will need to be narrowed.
  • The expanded height is fixed at 70vh.
  • This plugin only relaxes the composer text box container and does not affect other disclosure rows.
  • It hard-depends on the official harness client service: inject registers slots and locale.
  • It hooks into stable attributes like data-conversation-scroll, data-composer-seat, and data-input-mirror, without relying on build hashes.

Conclusion

The value of dsh-composer-expand is quite specific: it allows the DSH composer to switch between the default height and a 70vh taller writing view while preserving existing send shortcuts. Project repository: https://github.com/13071301808/dsh-composer-expand

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye