Repository navigation
Releases: LanFeng97/dsh-bottom-cost
Release list
v0.5.2 - install by package name, and explicit updates
Documentation only: the published npm page still carried the 0.5.1 README, whose install step told desktop users to paste a repository URL. Published versions are immutable, so refreshing that page needs a new version.
Install by package name, first
The DSH UI route now leads with the package name dsh-bottom-cost, with the repository URL kept in the same step as the dsh web alternative. The name works everywhere, including the official desktop client, which can only install npm sources; the URL has to go through codeload and a flaky network can fail it.
Updates are explicit
An installation pins the exact version (the profile ends up with "dsh-bottom-cost": "0.5.2"), so a new release reaches you when you press 更新 in the plugin manager — nothing changes under you in between.
以下为中文说明。
本次只有文档改动。 已经发布的 npm 页面仍带着 0.5.1 的 README,里面教桌面客户端用户粘贴仓库地址;而 npm 版本不可覆盖,所以刷新那一页必须发一个新版本。
安装方式改为「输入包名」优先
DSH 界面这条路现在以包名 dsh-bottom-cost 为首,仓库地址作为 dsh web 上的备选写在同一条里。包名到处都能用,包括官方桌面客户端(它只支持 npm 源);仓库地址要经 codeload 下载,网络抖动会失败。
更新是显式的
安装会钉住精确版本(profile 里写成 "dsh-bottom-cost": "0.5.2"),所以新版本要你在插件管理里点更新才生效——它不会在你不知情的时候自己变。
v0.5.1 - per-turn model names, and pro on its own price row
Per-turn model names, and deepseek-v4-pro priced on its own official row.
Every turn now names its model
To the right of the turn number you get the model that turn used — v4-pro, v4-flash, … — with only the deepseek- prefix trimmed; a turn that mixed models lists them side by side, and hovering reveals the full ids. The model id was already carried by every pricing bucket, so this only surfaces it: no projection state, schema or stateVersion change.
deepseek-v4-pro goes back to its own official row
2026-09-14 was meant to retire Pro and serve its requests as V4.1-Flash, and the time fence copied from @linxin666/dsh-usage encoded exactly that. The provider then decided to keep Pro available with billing unchanged — Pro is charged strictly on its own official row — so the fence is gone: a deepseek-v4-pro request is always priced on the pro row (miss 4.5/9.0, output 13.5/27.0 per 1M), and the 按Flash档估 mark plus its summary line went with it, since their premise no longer holds.
stateVersion moves 2 → 3 on purpose: the price row is decided while folding and stored in the bucket, so without the bump existing checkpoints would keep showing pro turns at Flash rates. One DSH restart replays the history under the new rule.
Install and docs
tools/install.mjsnow refuses to create a two-layer declaration: if the profile already declares this package (because the plugin manager installed it), the script says so and tells you to keep one route — two layers make the built-in manager refuse to disable or uninstall (reasonBundleInUse), and its toggle cannot suppress the other layer.- Both READMEs gained a troubleshooting section: the desktop client installs npm sources only, the GitHub source resolves through codeload with a 6-second timeout, and the exact edit to make when the manager reports that another configuration still uses the bundle's components.
- Publishing now runs the self-test first (
prepublishOnly), so a red suite blocks the publish.
以下为中文说明。
每轮显示所用模型
轮次号右侧现在写着该轮用的模型——v4-pro、v4-flash……,只削掉 deepseek- 前缀;一轮里混用了多个就并列显示,悬停可看完整 id。模型 id 本来就存在每个计价桶里,这次只是把它显示出来:投影状态、schema 与 stateVersion 都没动。
deepseek-v4-pro 改回按它自己的官方价目计价
2026-09-14 曾计划下线 Pro、把它的请求按 V4.1-Flash 承接并计费,照抄 @linxin666/dsh-usage 的那条时间栅栏就是为此而设。官方随后决定继续提供 Pro、计费方式不变(严格按自身价目,与 Flash 分开),所以栅栏已删除:deepseek-v4-pro 的请求恒按 pro 行计价(未命中 4.5/9.0、输出 13.5/27.0 每百万),按Flash档估 标记与那行汇总提醒也一并移除——它们的前提已不成立。
stateVersion 从 2 升到 3 是刻意的:价目行是折叠时算好存进桶里的,不升版本号则旧检查点会一直按 Flash 档显示 pro 轮次。重启一次 DSH 即会按新规则重放历史。
安装与文档
tools/install.mjs现在会阻止造成两层声明:如果 profile 里已经声明了本包(说明是用插件管理装的),脚本会明确告知并让你二选一——两层声明会让内置插件管理拒绝停用与卸载(reasonBundleInUse),而它那个开关也压不住另一层。- 两份 README 新增「装不上 / 卸不掉」排查一节:桌面客户端只能装 npm 源、GitHub 源要经 codeload 解析且有 6 秒超时,以及插件管理报「其他配置仍在使用这个组合包的组件」时的逐行处置。
- 发布前会先跑自测(
prepublishOnly):测试红了就发不出去。
v0.4.0 - jump to a turn, and a per-plugin light/dark switch
An update to the cost chip: jump to any turn, and a light/dark switch that applies to this plugin only.
Jump to a turn
Clicking a Turn N heading in the panel now scrolls the conversation to that turn. It read-only drives the built-in turn rail on the right — a tick's own click is the app's navigation path, so a turn that is not loaded yet gets paged in by the app before landing. When the rail is unavailable it falls back to the data-chat-turn anchors on transcript rows, aligned to the read line the app itself uses; if neither can be located the panel says so instead of failing silently. No build-hashed class names, no injected nodes.
Light/dark switch — for this plugin only
A sun/moon button to the left of the refresh button flips the panel and the cost chip to the other palette while the app's global theme stays as it is. The colours are resolved from the two official theme definitions (including var() chains), so each mode matches the rest of DSH. The chip gets its own themed background while it is on the opposite theme, since near-white text on the light stats row would otherwise be unreadable. The current mode is read from the attribute the theme package itself toggles (body[data-ds-dark-theme]). The choice lives in memory only — a page reload returns to following the app.
Fixed
- A stylesheet rule had never applied: it referenced
--dsw-alias-separator-primary, which does not exist anywhere in the app.
Docs
- The install section now leads with the in-app route (插件 → 添加插件 → paste the repository URL → restart DSH); the clone-and-script route is kept as the developer option.
以下为中文说明。
跳转到某一轮
在面板里点第 N 轮即可把对话跳到那一轮:它只读地驱动官方右侧的轮次导航轨道(刻度自身的点击就是官方的跳转路径),所以未加载的轮次会由官方先取回更早的分页再落位。轨道不可用时回落到 transcript 行上的 data-chat-turn 锚点,并按官方自用的阅读线对齐;两处都定位不到时面板会给出说明,不静默失败。不写死构建哈希类名,也不注入节点。
只对本插件生效的明暗开关
刷新按钮左边新增太阳/月亮按钮,把面板与费用胶囊切到另一套配色,应用的全局主题保持不变。配色取自官方两套主题定义(含 var() 链条),两种模式下都与 DSH 其他界面同一套。胶囊处于相反主题时会带上自己的底色,否则近白的字落在浅色统计栏上会看不清。当前模式读的是主题包自己切换的那个属性(body[data-ds-dark-theme])。选择只存在内存里:刷新页面即回到跟随应用。
修复
- 有一处样式一直没生效:它引用的
--dsw-alias-separator-primary在整个应用里都不存在。
文档
- 安装一节改为界面方式置顶(插件 → 添加插件 → 粘贴仓库地址 → 重启 DSH),clone + 脚本降级为开发者方式。
v0.3.0 - renamed to dsh-bottom-cost
Renamed to dsh-bottom-cost (was dsh-session-cost).
The plugin market already lists a same-named plugin from another author, so the shared name read as a duplicate. The new name states where the chip lives, and the entry description leads with what this one does differently: per-turn spend, cache-hit / cache-miss totals, and an official price table refreshed on demand.
The install path moves to node_modules/dsh-bottom-cost and the profile's loader row changes with it. Registration name, HTTP route prefix, data directory and bundle id follow; projection key sessionCost and entry id ui-session-cost are unchanged. The old repository URL keeps redirecting here.
改名到 dsh-bottom-cost(原 dsh-session-cost):市场上已有一个同名插件,同名会被读成重复。安装路径、注册名、路由前缀与数据目录都随新名;投影 key 与 entry id 不变;旧仓库地址仍会自动跳转。
v0.2.1 - zero runtime dependencies
Full Changelog: v0.2.0...v0.2.1
v0.2.0 - session cost chip
Full Changelog: https://github.com/LanFeng97/dsh-session-cost/commits/v0.2.0