Preface¶
The plugin-based approach of DSH allows independent plugins to fix local display issues in the client. For DSH Web, the built-in statistics in the composer dock sometimes encounter two details: the cache hit percentage is only displayed as an integer, such as Cache Hit 12%; when the statistics line width is insufficient, dock items may be truncated to .... dsh-cache-precision is an in-place enhancement specifically addressing these two display issues.
What Is This¶
dsh-cache-precision is a plugin for DSH Web, maintained by Cheng-cheng9669, with version 0.1.1 and an MIT license. It performs in-place enhancements to the built-in display: rewriting the cache hit display to three decimal places and widening the composer statistics line for a more complete view.
Core Features¶
The verified capabilities of this plugin include:
- Rewriting the built-in cache hit rate to three decimal places, e.g.,
Cache Hit 12%becomesCache Hit 12.345%. - Widening the built-in composer statistics line to reduce instances where dock items are truncated to
.... - Reading the same
tokenUsageprojection and automatically re-applying after React re-renders.
Installation and Enablement¶
The installation example uses a local Windows path. Before executing, ensure the plugin directory D:\Dsh\tools\dsh-cache-precision is ready on your machine.
- Execute the following command to add the plugin to the
webprofile:
dsh plugin --profile web add D:\Dsh\tools\dsh-cache-precision
- Restart
dsh webto activate the plugin in the new Web session:
dsh web
Typical Usage¶
After installation and restart, view the cache hit statistics in the composer dock of DSH Web. The verified example display format is:
Cache Hit 12% -> Cache Hit 12.345%
This example demonstrates the display precision changing from an integer percentage to three decimal places; the specific values depend on the actual tokenUsage projection.
Applicable Scenarios and Notes¶
It is suitable for developers who use composer dock statistics in DSH Web and require higher cache hit display precision or a wider statistics line.
Please note the following:
- The plugin runs with the current
dshprocess permissions. Before installation, inspect the source code, source path, and license. - The license for this plugin is MIT.
- The verified installation command uses the local path
D:\Dsh\tools\dsh-cache-precision; if the plugin directory differs, keep the actual path consistent. - Enabling the plugin requires restarting
dsh web.
Conclusion¶
The value of dsh-cache-precision focuses on two areas: elevating the cache hit display to three decimal places and widening the composer statistics line to reduce ... truncation.
Directory page: Search for dsh-cache-precision in the DSH plugin directory
GitHub: https://github.com/Cheng-cheng9669/dsh-cache-precision