Preface¶
DSH Web Composer provides basic interaction capabilities. For developers who need fine-grained control over Markdown rendering and context visualization, the basic version often lacks real-time preview for complex syntax and convenient management of long text. The dsh-better-composer plugin leverages DSH’s public interfaces (seams) to enhance the editor’s Markdown rendering without taking ownership of the source code, and introduces a long-paste clipboard and an interactive context map.
Feature Overview¶
The plugin injects enhancements through the dsh.bundle.patch configuration layer. Core capabilities include:
- Markdown visual enhancements: Supports headings, emphasis, links, task lists, blockquotes, tables, fenced code blocks, and attachment displays that preserve the source label.
- Local deterministic completion: Provides local completion for fence languages, task markers, heading spacing, and other candidate terms.
- Interactive context map: Opens a right sidebar via the Composer ring and displays host projection occupancy/model window, structural statistics, and per-turn growth.
- Long-paste clipboard: Converts long text into editable quote chips and supports saving to a file.
Installation and Activation¶
Ensure the environment meets the dependency requirements before installation: DSH version 0.1.7-alpha.2 or higher, Node.js >=20, pnpm >=10.
- Check the DSH version and Web interface:
dsh --version
dsh web --no-open
- Install the plugin:
pnpm dsh plugin --profile web add @cheesefox/dsh-better-composer@1.0.0
- Verify the installation:
Open the Web UI, go to Settings → Built-in plugins → Better Composer, and confirm the plugin card is present. After creating a new session, confirm the Composer overlay and+menu are available.
Usage¶
Long-Paste Clipboard¶
- Open a new session in the Web UI.
- Paste text exceeding the configured threshold and confirm that it becomes a
Pasted textchip. - Open the chip and select File Delivery.
- In the File Type selector, choose a text or code extension.
- Save the edits and confirm that the file is written to the
.dsh/pastes/directory.
Editing and Undo/Redo¶
In the chip editor, test Undo and Redo:
- After manual editing.
- After applying an LLM rewrite preview.
Adjust Configuration¶
Go to Settings → Built-in plugins → Better Composer and adjust the long-paste threshold. File extensions are set per chip, rather than globally.
Technical Implementation and Notes¶
- Plugin architecture: The client entry point is loaded only on the Web platform and relies on DSH’s officially declared public interfaces such as heartbeat, rendering, and settings. DSH Core retains control over source, selection, history, Context objects, and send/queue/bootstrap.
- Context Doctor: Experimental feature; requires DSH
0.1.7-alpha.2. It integrates diagnostics into the context map workspace and provides overview, diagnosis, analysis, and feedback pages. - Statistics: The statistics provided by the plugin do not call models and do not activate cold agents.
- Uninstall: Removing the plugin removes the overlay, settings card, clipboard sources, and sidebar tabs, but does not modify existing DSH session history or Core source code.
Conclusion¶
dsh-better-composer is suitable for DSH users who want more refined Markdown display and context management on the Web. For more details, refer to the plugin directory or GitHub repository.