Introduction¶
In the DSH browser interface, tool invocation results are collapsed by default. If you want newly arrived tool invocation cards to open automatically, while keeping the line folding within internal blocks closed, you can use dsh-tool-autoexpand. It is a DSH client plugin designed to reduce the manual effort of expanding cards.
What Is It¶
better-er/dsh-tool-autoexpand is a pure browser-side client plugin, licensed under MIT. It does not replace any native tool card renderer or introduce host behaviors. The plugin automatically mounts within the DSH web interface and provides a default-enabled toggle switch at the bottom of the sidebar.
Core Features¶
- Automatically expands newly rendered tool invocation cards.
- Only expands the top-level folded row of the card, avoiding mistakenly opening the line folding within internal
ReadBlock,TerminalBlock,DiffBlock, andSearchBlock. - The toggle switch at the bottom of the sidebar includes an icon, title,
ON/OFFstatus capsule, and a brief description of the effect, adapting to the DSH light/dark theme. - The entire card is clickable, with
aria-pressedsynchronizing the state; toggling enables or disables the plugin instantly without requiring a restart.
Installation and Enabling¶
Install from GitHub:
dsh plugin --profile web add github:better-er/dsh-tool-autoexpand
Or install the version published to npm:
dsh plugin --profile web add dsh-tool-autoexpand
After executing the installation command, the plugin mounts automatically. It becomes active after restarting the DSH web interface, with no need to manually edit any configuration files.
Typical Usage¶
- Run the installation command above.
- Restart the DSH web interface.
- Newly arrived tool invocation cards will automatically expand their top-level folded row.
- To disable, click the toggle switch at the bottom of the sidebar. The
ON/OFFstatus changes instantly without needing a restart.
Applicable Scenarios and Notes¶
This plugin is suitable for viewing tool invocation results in the DSH web interface when you want new cards to expand by default. Note that it is a client plugin under the current DSH profile, loaded by the DSH web interface after installation via the current DSH command. Before installation, review the source code and MIT license.
If you need to troubleshoot plugin loading issues, the factory in lib/client.js must end with return module.exports; otherwise, the module export will be undefined, and DSH will fail to start with an error.
To remove the plugin, run:
dsh plugin --profile web remove dsh-tool-autoexpand
After complete removal and restarting the DSH web interface, the plugin will no longer be loaded.
Conclusion¶
The core value of dsh-tool-autoexpand is to automatically expand the top level of newly arrived tool invocation cards while keeping the internal block line folding closed. GitHub repository: https://github.com/better-er/dsh-tool-autoexpand