dsh-pref-kit: Merging Adjacent Text Increments at the Source of DSH Streaming Output

`dsh-pref-kit` is a DSH performance optimization plugin designed to address high resource consumption and stuttering caused by the massive number of small events generated by streaming output under long conversations and multi-agent concurrency. The plugin merges adjacent `text`/`reasoning` increments within the same text block at the data stream source before writing them to logs and pushing, thereby significantly reducing the volume of session events while remaining fully compatible with existing interfaces and protocols without altering the underlying structure. Core features include streaming merging enabled by default (controlled by the `windowMs` parameter, default 30ms), as well as a configurable "full passthrough" mode (when `windowMs = 0`, it passes through token-by-token to ensure minimal latency). Additionally, the plugin provides a settings card for users to adjust configurations in real time, and includes several experimental features disabled by default, such as replacing the trace view.

Read More