dsh-pixel-report: Generating Pixel-Art Battle Report Cards

Introduction

DeepSeek Harness (dsh) has been running in the right sidebar all day long, accumulating a large volume of tool calls, conversation turns, modified files, and token spending. This data is scattered all over the place and hard to review at a glance. dsh-pixel-report aggregates all of it into a 1080×1632 pixel-art battle-report card that you can download as a PNG with one click or copy to the clipboard — perfect for sharing on WeChat Moments, Xiaohongshu, or your team chat.

Plugin Positioning

dsh-pixel-report is a right-sidebar plugin for dsh, maintained by user qinghuidaqzp. It does not alter Agent behavior — it only observes read-only, rendering the day’s session statistics, file changes, command executions, cost and cache savings, etc., into a retro pixel-art battle-report card.

Core Features

Statistics Tracked

Every number on the card comes from real records — no fabrication, no random values:

  • Pixel Whale character & rating: Based on real workload for the day/week, an RPG rating is calculated (S+ / S / A / B / C, or ZZZ when inactive) along with a unique pixel badge and title (deterministic rules — the same data always yields the same title).
  • Modified files & added/deleted lines: Tracks the number of files modified, lines added/deleted (+added -deleted), and the most frequently edited filename (by default only the filename is shown, without directory path).
  • Executed commands & tool calls: Counts terminal commands (bash / pwsh / terminal, etc.), total tool calls, and the primary tool used.
  • Sessions & turns: Tracks session count, completed turns, model request count, active duration, consecutive active days, and the longest session turn count.
  • Cost & cache savings: Estimates cost using DeepSeek’s official peak/off-peak pricing, and displays cache hit rate, savings from caching, and a token composition progress bar.
  • Activity bar chart: The Today view shows a 24-hour pixel bar chart with the busiest time slot highlighted; the This Week view shows a 7-day activity trend bar chart.
  • 3 retro pixel color schemes: DeepSea, GameBoy, Arcade — switch with one click.
  • One-click export: Supports “Download PNG” (1080×1632 portrait image, crystal clear on mobile) and “Copy Image” (automatically suggests downloading if the clipboard is unavailable).

Title Rules (Deterministic)

The first rule whose condition is met (in the order below) determines the title. The same statistics data always produces the same title:

Title Trigger Condition
Pixel Whale Napping No requests, no tool calls, no turns in the current time window
Night Owl Engineer 22:00–04:59 accounts for ≥ 40% of activity, or the busiest slot falls in 23:00–04:59
Dawn Grinder 05:00–08:59 accounts for ≥ 45% of activity, or the busiest slot falls in 05:00–08:59
Refactoring Maniac Total lines changed ≥ 400 with deletions ≥ 120, or deletions ≥ 60 and deletions ≥ additions
Cost-Saving Master Cache hit rate ≥ 85% with savings ≥ ¥0.50, or hit rate ≥ 90% with prompt tokens ≥ 10K
Command-Line War God Commands ≥ 10 and ≥ 45% of all tool calls
High-Output Code Machine New code ≥ 250 lines, or modified files ≥ 8
Endurance Specialist Longest single session ≥ 10 turns, or total turns ≥ 20
Rhythm Controller Cache hit rate ≥ 70% and model requests ≥ 4
Steady Progressor Any other situation with real activity

Data Sources

The plugin backend is strictly read-only — it does not modify any model requests or tool results:

  • llm/stream: Reads the usage stats (input, cache hit, cache write, output tokens) at the end of each model call, and converts them into costs and savings using the pricing table.
  • tools/result: Counts actual tool executions (automatically skipping calls rejected by approval or cancelled before dispatch), terminal command counts, and file/line statistics from write / edit / apply_patch / str_replace_editor.
  • session/event: Tracks turn/start, turn/end for turn counts and durations. If @deepseek-ai/dsh-workspace-changes is enabled in the current environment, it also listens to workspace/changes events to merge files modified via terminal commands and net Git line changes, deduplicating against file tool records to avoid double counting.

Statistics are persisted by local calendar day (retaining the last 90 days) in pixel-report/stats.json under the dsh home directory, and served to the right sidebar via the pixelReport RPC service.

Privacy & Security

  • All data is stored locally only. The plugin does not access the network and does not upload any statistics or images.
  • No full paths are stored: the persisted stats.json retains only a short path hash and the filename (basename) — directory structure is never recorded. No conversation content, code content, or command arguments are saved.
  • The card by default shows only the most-edited filename and workspace directory name. You can toggle “Hide filenames” in the sidebar at any time, or set hideNames to true in the plugin config, and the card will completely hide filenames and workspace names.

Pricing Reference

Built-in DeepSeek official pricing (verified on api-docs.deepseek.com on 2026-11-19), in CNY / million tokens (off-peak hours):

Model Cache Hit Input Cache Miss Input Output
deepseek-flash 0.02 1 4
deepseek-v4-pro 0.15 4.5 13.5

Peak hours are weekdays 9:00–12:00 and 14:00–18:00 (Beijing Time), with prices doubled (public holidays not differentiated). If official prices change or you use other models, you can customize prices in the config.

Installation & Enablement

Requires dsh ≥ 0.2.0; tested on 0.2.2-rc.1.

dsh plugin --profile web add github:qinghuidaqzp/dsh-pixel-report

After installation, restart dsh, open the right sidebar, and click Pixel Battle Report on the onboarding page to get started.

Configuration

- id: pixel-report
  config:
    hideNames: false
    peakPricing: true
    prices: []
Key Default Description
stateFile pixel-report/stats.json under dsh home directory Path for statistics persistence; leave empty to keep data in memory only
hideNames false When true, the card hides filenames and workspace names by default
peakPricing true Whether to estimate costs using DeepSeek peak/off-peak pricing (weekdays 9–12, 14–18 Beijing Time, prices doubled)
prices [] Custom pricing table (each entry contains match regex, label, hit, miss, output)

Typical Usage

After installation, the right sidebar displays a “Pixel Battle Report” entry. Clicking it opens the Today view by default, showing the 24-hour activity bar chart and all statistics. Switch to “This Week” to see the 7-day trend. At the bottom of the sidebar, you can switch between the 3 retro pixel color schemes (DeepSea, GameBoy, Arcade). Click “Download PNG” to save the 1080×1632 battle-report card; click “Copy Image” to copy the card to the clipboard (if browser restrictions prevent this, a prompt suggests downloading instead).

Use Cases & Notes

Ideal for developers and teams who want a visual recap of their Agent’s daily/weekly activity and a shareable work summary. The plugin runs with the current dsh process permissions — review the source code and license before installing. Cost figures are estimates based on the public pricing table; actual billing may differ.

Closing

dsh-pixel-report turns scattered Agent runtime data into a single pixel-art battle-report card, perfect for sharing and retrospectives. See the project homepage link below.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye