dsh-webui-perf
awa-123-cw
DeepSeek Harness WebUI 性能优化开关插件:长代码流式渲染/历史加载/高亮缓存优化,设置面板一键开关(with official-package patches)
PROJECT TOPICS
PROJECT README
Energy & carbon metering for DeepSeek Harness — see what your agentic sessions cost.
A dsh-plugin that turns every model call into energy (J/kWh), carbon footprint (g CO2e) and electricity cost (CNY) — estimated from token accounting, so it works with any API-backed provider (DeepSeek API, OpenAI-compatible endpoints, local vLLM) without touching hardware.
Install it, chat as usual, and watch your session's energy bill in real time.
| Surface | What you see |
|---|---|
| Composer dock (always visible under the input box) | live 能耗 1.5 kJ · 碳 0.2 g readout + per-turn energy sparkline |
| Detail panel (click the readout) | per-turn energy chart, per-request energy list, session totals (tokens / energy / carbon / electricity cost), carbon saved by caching ≈ N trees per year |
/green |
one-command session energy report |
green_meter tool |
the agent can query its own energy, carbon, cost and budget at any time |
| Energy budget | optional per-session budget — over-budget steps are rejected with a warning |
| JSONL ledger | every model call recorded, ready for your own analysis |
# 1. Install into your dsh profile
cd ~/.dsh/profiles/web # (Windows: %USERPROFILE%\.dsh\profiles\web)
pnpm add dsh-green-meter dsh-client-ui-green-meter
# 2. Mount the plugins in your profile's cordis.patch.yml (see examples/)
- insert:
- id: green-meter
name: 'dsh-green-meter'
- id: ui-green-meter
name: 'dsh-client-ui-green-meter'
config:
panelPlacement: popover # popover = zero-config; sidebar = optional patch
Restart dsh web, refresh, and the readout appears under the composer. Type /green anytime.
panelPlacement: sidebar renders the detail panel inside the sidebar's blank space. Apply the provided patch and rebuild one DSH package:
cd /path/to/deepseek-harness
git apply /path/to/dsh-green-meter/patches/ui-sidebar-sidebar-energy.patch
pnpm --filter @deepseek-ai/dsh-client-ui-sidebar bundle
| Key | Default | Meaning |
|---|---|---|
profile |
proxy |
calibration profile (proxy, qwen-h20-*, gemma-h20-*, qwen3-4b-*) |
carbonFactorKgPerKwh |
0.5777 |
grid carbon intensity |
electricityPriceCnyPerKwh |
0.56 |
electricity price (CNY/kWh) |
dir |
<DSH_HOME>/green-meter |
ledger directory |
budgetJ |
0 (off) |
session energy budget in joules |
Environment fallbacks: DSH_GREEN_PROFILE, DSH_GREEN_CARBON_FACTOR, DSH_GREEN_PRICE_CNY, DSH_GREEN_DIR, DSH_GREEN_BUDGET_J.
thebestai is our AI platform. 欢迎大家通过反馈意见可以使用我们的 AI Greentoken 系列服务。
pnpm install
pnpm test
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。