Skip to content
dsh.fish
Bundle

dsh-stats-expand

DeepSeek Harness Web 客户端插件:会话底部统计条(轮/步、LLM/工具时长、首 token/吐字速度、缓存命中、输入/输出 tokens)解除 748px 限宽,单行完整铺满显示;点击可切回官方截断,偏好持久化。

Source
Triple3h
License
MIT
Updated
Updated 4 days ago

Readme

# dsh-stats-expand

[English](README.md) | [中文](README.zh-CN.md)

[![GitHub stars](https://img.shields.io/github/stars/Triple3h/dsh-stats-expand?style=flat)](https://github.com/Triple3h/dsh-stats-expand)
[![GitHub license](https://img.shields.io/github/license/Triple3h/dsh-stats-expand?style=flat)](https://github.com/Triple3h/dsh-stats-expand/blob/master/LICENSE)

> A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`) Web client plugin that unwraps the session stats bar to full width — one line, fully visible; click to toggle back to the official truncation (preference persisted).

The official session stats bar (turns/steps · LLM/tool durations · first-token latency & output speed · cache hits · input/output tokens) is capped at `--dsh-chat-content-width:748px` and truncated to one line with an ellipsis — full content only visible on hover. This plugin lifts the width cap by default so the whole line fills the conversation area.

## What you get

- Removes the official width cap: the stats line **fills the full conversation width**.
- Click the stats bar to toggle between **full width / official truncation**; the choice is persisted in `localStorage["dsh-stats-expand:expanded"]`.
- The `StatsLine` root class is a css-module hash (changes across upgrades); it is resolved at runtime from the DSH-injected `<style data-plugin-css="@deepseek-ai/dsh-client-ui-conversation/StatsLine.module.css">` tag, with a known-hash fallback when parsing fails.
- Debug hook: `__dshStatsExpand` in DevTools (`expanded` / `toggle()` / `sync()` / `rootClass()`).

## Install (link, development)

```sh
npm install        # installs esbuild (devDependency, build only)
npm run build      # src/client.js → lib/client.js
npm run link-profile
```

`link-profile` adds a `link:` dependency, appends to `dsh.profile.bundles`, and runs `pnpm install` in the profile. Then **restart `dsh web`** (by convention, no auto-restart).

## Directory layout

```
src/client.js        # browser source (hand-written ModuleLoader format; the client logic lives here)
lib/index.js         # host-side empty apply (host plugin logic goes here; see dsh-image-read)
lib/client.js        # browser build output (npm run build)
package.json         # three essentials: dsh.bundle.patch + dsh.client declaration + exports["./client"]
cordis.patch.yml     # bundle patch: inserts into the profile plugin tree
build.mjs            # build script (esbuild)
link-profile.mjs     # link install script
```

## Development notes

- Project-level skill `dsh-plugin-dev`: SKILL.md + references/ (manifest three essentials, client half, paste/reference chain, pnpm pitfalls).
- Reference implementations: `dsh-text-collapse` (complete client plugin template), `dsh-image-read` (host tool plugin), `~/.dsh/profiles/web/node_modules/dsh-chat-timeline` (hand-written client bundle).
- Authoritative source for DSH internal APIs: `/opt/homebrew/lib/node_modules/@deepseek-ai/dsh/` (installed version).

## License

MIT

Install

dsh plugin --profile web add github:Triple3h/dsh-stats-expand#37b85e6616be11824f30229dee7a56627b2135c9

Profile: web

  • This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
Source