@yalieny/pi-better-cost-display-footer 2.0.0 → 2.1.0

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.
@@ -155,6 +155,10 @@ const DEFAULT_CONFIG: DynamicConfig = {
155
155
  offPeak: { input: 1.5, output: 4.5, cacheRead: 0.05, cacheWrite: 0 },
156
156
  peak: { input: 3.0, output: 9.0, cacheRead: 0.1, cacheWrite: 0 },
157
157
  },
158
+ "deepseek-v4-flash-vision-exp": {
159
+ offPeak: { input: 1.5, output: 4.5, cacheRead: 0.05, cacheWrite: 0 },
160
+ peak: { input: 3.0, output: 9.0, cacheRead: 0.1, cacheWrite: 0 },
161
+ },
158
162
  "deepseek-v4-pro": {
159
163
  offPeak: { input: 4.5, output: 13.5, cacheRead: 0.15, cacheWrite: 0 },
160
164
  peak: { input: 9.0, output: 27.0, cacheRead: 0.3, cacheWrite: 0 },
@@ -661,6 +665,10 @@ export default function (pi: ExtensionAPI): void {
661
665
  installCustomFooter(ctx);
662
666
  apply(pi, ctx);
663
667
  });
668
+ pi.on("session_shutdown", () => {
669
+ // Pi invalidates session-bound ctx before the next footer render.
670
+ activeCtx = null;
671
+ });
664
672
  pi.on("input", (_e, ctx) => apply(pi, ctx));
665
673
  // 切换模型时刷新档位标签(深色/深绿 ⇄ 其他模型)
666
674
  pi.on("model_select", (_e, ctx) => apply(pi, ctx));
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@yalieny/pi-better-cost-display-footer",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "pi extension: scriptable peak/off-peak tier rules per provider with an enhanced footer (tier label, cache-hit-rate precision, custom currency symbol)",
5
- "keywords": ["pi-package", "pi-extension"],
5
+ "keywords": [
6
+ "pi-package",
7
+ "pi-extension"
8
+ ],
6
9
  "license": "MIT",
7
10
  "type": "module",
8
11
  "scripts": {
@@ -15,8 +18,13 @@
15
18
  "devDependencies": {
16
19
  "@earendil-works/pi-tui": "^0.80.10"
17
20
  },
18
- "files": ["extensions", "README.md"],
21
+ "files": [
22
+ "extensions",
23
+ "README.md"
24
+ ],
19
25
  "pi": {
20
- "extensions": ["./extensions"]
26
+ "extensions": [
27
+ "./extensions"
28
+ ]
21
29
  }
22
30
  }