DeepSeek Harness Plugin: dsh-plugin-composer-expand

Introduction

The default input box height in DeepSeek Harness (DSH) is constrained: the writing area is only 36px tall, and the upper limit is hard-capped at 336px. When composing longer text, this limited height compresses the visible range and results in a poor input experience.

The dsh-plugin-composer-expand plugin adds an expand button to the top-right corner of the input box. When clicked, the input card is detached from the document flow and becomes a floating overlay, with its height set to 50% of the conversation area’s height. In this expanded state, the input box gains independent scrolling, and the keyboard behavior changes from “send” to “newline”—only the send button submits the message.

Core Features

  • Expand Entry Point: Adds a persistent expand button to the top-right corner of the input card.
  • Overlay Interaction: After expansion, the input card height becomes 50% of the conversation area height (minimum 200px, maximum is the conversation area height minus 48px), positioned absolutely at the bottom without squeezing or compressing the message area below.
  • Keyboard Behavior Change: In the expanded state, the Enter key becomes newline (following the official Shift+Enter path), Ctrl/Cmd+Enter retains send semantics, and the Esc key collapses the overlay.
  • Scroll Isolation: In the expanded state, the panel scrolls independently without affecting the conversation list, with support for scroll wheel event interception.
  • Animation Effects: Uses FLIP animation technique to achieve height transitions, with a 250ms duration; automatically skips when the system has “Reduce Motion” enabled.

Technical Implementation Details

  • Layout Strategy: The input seat is set to absolute positioning, while the message area’s scroll container [data-conversation-scroll] remains position: static. This avoids the official preset position: relative hook causing the scroll container height to become 0, ensuring the message area remains scrollable.
  • Animation Principle: Since the collapsed state height is auto, CSS transition cannot be used directly. The plugin uses FLIP technique (reading current height first, applying new layout, then reading new height, finally tweening between them) to achieve animation.
  • Key Interception: Intercepts Enter key events at the document capture phase, prevents the default send behavior, and dispatches newline commands through Lexical’s command system.
  • Button Positioning: The button is vertically centered with the first line of text (placeholder) in the input box, with equal top/right padding, using the CSS variable --dsh-content-font-delta to adapt to different font sizes.
  • Selector Dependency: Relies on the :has() selector in Chrome 105+ to locate target elements.

Installation and Activation

Install the plugin via command line. Restart the App after installation to take effect.

dsh plugin --profile desktop add github:d

Typical Usage

  1. Expand: Click the icon button in the top-right corner of the input box, the input card expands into an overlay.
  2. Input: In the expanded state, press Enter to create a new line, press Ctrl/Cmd+Enter to send the message.
  3. Collapse: Click the send button or press Esc directly, the overlay collapses back to the default height.

Use Cases and Notes

This plugin is suitable for conversation scenarios where longer text needs to be composed. The plugin only modifies the visual layer and keyboard semantics without taking over official components. After expansion, the card will cover some message content below; press Esc to collapse to read the obscured messages.

Known Trade-offs

  • Height Memory: The expanded height is only valid in the current session’s memory; it reverts to default after refreshing the page or restarting the App.
  • Real Device Displacement: When expanded on a real device, the message area will shift up by approximately 55px, and can be precisely restored after collapsing. This displacement comes from the application’s own scroll management mechanism, not caused by plugin compensation.
  • Collapse Methods: In the expanded state, clicking the button, pressing Esc, or sending a message can all collapse the overlay; clicking on the outside area to collapse is not supported.
羽毛球分组比赛记分
小程序二维码

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

Xiaoye