@yalieny/pi-better-cost-display-footer 2.0.1 → 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.
|
@@ -665,6 +665,10 @@ export default function (pi: ExtensionAPI): void {
|
|
|
665
665
|
installCustomFooter(ctx);
|
|
666
666
|
apply(pi, ctx);
|
|
667
667
|
});
|
|
668
|
+
pi.on("session_shutdown", () => {
|
|
669
|
+
// Pi invalidates session-bound ctx before the next footer render.
|
|
670
|
+
activeCtx = null;
|
|
671
|
+
});
|
|
668
672
|
pi.on("input", (_e, ctx) => apply(pi, ctx));
|
|
669
673
|
// 切换模型时刷新档位标签(深色/深绿 ⇄ 其他模型)
|
|
670
674
|
pi.on("model_select", (_e, ctx) => apply(pi, ctx));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yalieny/pi-better-cost-display-footer",
|
|
3
|
-
"version": "2.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
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|