yangzhe1991/dsh-web-enhance

Plugin ⭐ 2 MIT web-ui

DSH Web UI enhancement plugin: turn-by-turn conversation navigation & thinking-chain default-expand DSH Web UI 增强插件:逐轮对话导航、思维链默认展开

Install

⬆   ← back to the start of the current turn
      ⬇   ← to the end of the current turn
      💡  ← thinking chain default-expand toggle (highlighted when on)
  ```

  - When **on** (default), every "Think" reasoning row is expanded automatically — including rows that mount while the agent is still streaming — so you read the full reasoning text without clicking each one.
  - Toggle it off to restore the built-in collapsed one-line summaries.
  - The preference persists across reloads (localStorage). Manually collapsing an individual row is respected and will not be force-expanded.

- ⬆️⬇️ **Turn-by-turn navigation** — a floating button pair in the bottom-right corner of the conversation, right above the built-in "scroll to bottom" button:

  ```
      ⬆   ← back to the start of the current turn
      ⬇   ← to the end of the current turn
  ```

  - **Up arrow** — back to the start of the turn you are currently reading: the first sentence of that turn's **final result** (all reasoning, tool calls, and transition sentences skipped). Once your viewport is already pinned to the turn start, it jumps to the start of the **previous** turn.
  - **Down arrow** — to the **end** of the current turn (the bottom of its last rendered row). Once your viewport is already pinned to the turn end, it jumps to the end of the **next** turn.
  - The buttons only appear once the session has at least one turn with actual text.

- 💰 **Session cost meter** — on the **same line as the built-in stats line, at its far left**, e.g. `≈ ¥0.83 · 2 turns 12 steps | …`:

  - Only rendered while the session's requests go through the **official DeepSeek API** (provider route `deepseek-official`); it disappears once you switch to another API.
  - Cost = tokens × official unit prices (CNY, `deepseek-v4-flash` / `deepseek-v4-pro`), priced per request at its **actual time** with peak/off-peak rates (peak = Beijing time 09:00–12:00 and 14:00–18:00, twice the off-peak price), with cache-hit input at the discounted rate.
  - **Accumulate as it happens**: every observed request is priced at its real time and persisted immediately (localStorage, per session, last-wins so nothing double-counts) — history paging pushing old requests out of the browser window does not matter. A session that has used this plugin since its creation has an **exact total for its whole life**, regardless of how long it gets.
  - Only history that was **never loaded** (before the plugin was installed, or on another machine) has no per-request data: its remainder is estimated at the current model's off-peak rate and marked with a `≈` prefix (hover for details: model, tokens, peak/off-peak request counts); clicking "Load earlier" to page that history in turns it exact.
  - The price table is updated in `src/client/cost.ts` whenever the official pricing page changes.

## Install (30 seconds)

Add yangzhe1991/dsh-web-enhance to your DSH config (web profile) to enable.

README

Expand full README Collapse

README is empty.