@reedchan/statusline 1.10.1 → 1.10.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/README.md CHANGED
@@ -8,7 +8,7 @@ Replaces pi's footer with a labelled two-row one. Every value carries a word, so
8
8
  decoded from a symbol or remembered from a legend.
9
9
 
10
10
  ```text
11
- Context █████████▍░░░░░░░░░░ 47% 471k / 1.0M Input 194k · Output 89k | Cache hit 99.9% | Cost $0.229 · Today $1.63
11
+ Context █████████▍░░░░░░░░░░ 47% 471k / 1.0M Input 194k · Output 89k | Cache hit 99.9% | Cost $0.23 · Today $1.63
12
12
  ~/.pi (master) deepseek-flash · Effort high | TTFT 482ms · Avg TTFT 612ms | Last 729 tok/s · Avg 512 tok/s
13
13
  LSP Active: typescript
14
14
  ```
package/README_CN.md CHANGED
@@ -7,7 +7,7 @@
7
7
  替换 pi 的 footer,改成带文字标签的两行。每个值都带一个词,不需要靠符号猜、也不需要记图例。
8
8
 
9
9
  ```text
10
- Context █████████▍░░░░░░░░░░ 47% 471k / 1.0M Input 194k · Output 89k | Cache hit 99.9% | Cost $0.229 · Today $1.63
10
+ Context █████████▍░░░░░░░░░░ 47% 471k / 1.0M Input 194k · Output 89k | Cache hit 99.9% | Cost $0.23 · Today $1.63
11
11
  ~/.pi (master) deepseek-flash · Effort high | TTFT 482ms · Avg TTFT 612ms | Last 729 tok/s · Avg 512 tok/s
12
12
  LSP Active: typescript
13
13
  ```
@@ -326,15 +326,15 @@ export function withCachedRates(
326
326
  return `${JSON.stringify({ ...config, rates, fetchedAt }, null, 2)}\n`
327
327
  }
328
328
 
329
- /** Three decimals, with one trailing zero trimmed so `$0.380` renders as `$0.38`. */
329
+ /** Two decimals, with padding zeros trimmed so `$0.30` renders as `$0.3`. */
330
330
  /**
331
- * Three decimals, with the padding zeros trimmed so `$0.380` renders as `$0.38`.
331
+ * Two decimals, with the padding zeros trimmed so `$0.30` renders as `$0.3`.
332
332
  *
333
- * All of them, not just one: a converted amount lands on `¥17.800` often enough that a single
334
- * trailing zero would show up as `¥17.80` beside `¥2.706` and read as a different precision.
333
+ * All of them, not just one: a converted amount lands on `¥17.80` often enough that a single
334
+ * trailing zero would show up as `¥17.8` beside `¥2.71` and read as a different precision.
335
335
  */
336
336
  export function formatCost(cost: number, currency: Currency = USD): string {
337
- return `${currency.symbol}${(cost * currency.perUsd).toFixed(3).replace(/\.?0+$/, '')}`
337
+ return `${currency.symbol}${(cost * currency.perUsd).toFixed(2).replace(/\.?0+$/, '')}`
338
338
  }
339
339
 
340
340
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reedchan/statusline",
3
- "version": "1.10.1",
3
+ "version": "1.10.2",
4
4
  "description": "Replaces pi's footer with a labelled two-row status line: context pressure as a fixed-size meter, cache and cost, the model and effort level, and the latest turn's TTFT and decode throughput in tokens/second.",
5
5
  "keywords": [
6
6
  "bun",