dsh-plugin-cost-meter 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to this project are documented here.
4
4
 
5
+ ## 0.5.2
6
+
7
+ - The remote catalog's `peakSchedule` now overrides the bundled snapshot, so a
8
+ schedule change pushed to `catalog/prices.json` reaches installed copies
9
+ (previously the bundled schedule always won).
10
+ - Header badge sizing fixed: `box-sizing: border-box`, `height: 24px`,
11
+ `border-radius: var(--dsw-radius-sm)` — the badge previously rendered
12
+ ~46px tall and no longer matched the header controls (e.g. the 24px
13
+ `.OMoRSG_split` control).
14
+
5
15
  ## 0.5.1
6
16
 
7
17
  - Manual `config.models` entries now outrank every automatic source even at
package/lib/client.js CHANGED
@@ -16,18 +16,20 @@ const TAG_ID = "dsh-plugin-cost-meter/client.css";
16
16
 
17
17
  const css = [
18
18
  ".dsh-cost-meter-badge{",
19
- "border:1px solid var(--dsw-alias-border-l2);",
19
+ "box-sizing:border-box;",
20
+ "border:0.5px solid var(--dsw-alias-border-l2);",
20
21
  "color:var(--dsw-alias-label-primary);",
21
22
  "font-family:var(--dsw-font-family);",
22
23
  "background:transparent;",
23
- "border-radius:18px;",
24
- "height:32px;",
25
- "padding:6px 12px;",
26
- "font-size:13px;",
24
+ "border-radius:var(--dsw-radius-sm);",
25
+ "height:24px;",
26
+ "padding:0 8px;",
27
+ "font-size:12px;",
27
28
  "font-weight:400;",
28
- "line-height:20px;",
29
+ "line-height:16px;",
29
30
  "display:inline-flex;",
30
31
  "align-items:center;",
32
+ "justify-content:center;",
31
33
  "white-space:nowrap;",
32
34
  "font-variant-numeric:tabular-nums;",
33
35
  "cursor:default;",
package/lib/index.js CHANGED
@@ -381,7 +381,9 @@ async function loadSources(config, warn, previous) {
381
381
  }
382
382
  }
383
383
 
384
- const schedule = resolveSchedule(config.peak, firstSchedule(BUNDLED_CATALOG) ?? firstSchedule(remote));
384
+ // The remote catalog is the live update channel, so its peak schedule must
385
+ // win over the bundled snapshot; the bundled one is only the offline fallback.
386
+ const schedule = resolveSchedule(config.peak, firstSchedule(remote) ?? firstSchedule(BUNDLED_CATALOG));
385
387
  const table = buildPriceTable({ bundled: BUNDLED_CATALOG, remote, legacyDocs: legacy === undefined ? [] : [legacy], config, schedule });
386
388
  return { table, schedule, remote, legacy };
387
389
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-cost-meter",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Live per-session cost badge in the DeepSeek Harness conversation header (top-right), with peak/off-peak (峰谷分时) pricing.",
5
5
  "keywords": [
6
6
  "dsh-plugin",