@ogulcancelik/pi-minimal-footer 0.1.1 → 0.1.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 +6 -0
- package/index.ts +8 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,6 +41,12 @@ Usage is fetched:
|
|
|
41
41
|
|
|
42
42
|
The footer adapts to narrow terminals by stacking lines vertically instead of the single-line wide layout.
|
|
43
43
|
|
|
44
|
+
## Known issues
|
|
45
|
+
|
|
46
|
+
### Claude Max usage bar not showing
|
|
47
|
+
|
|
48
|
+
Anthropic's OAuth usage endpoint (`/api/oauth/usage`) has been returning persistent 429 (rate limit) errors since late March 2026, affecting all third-party tools that display Claude usage data (CodexBar, oh-my-claudecode, claude-pulse, etc.). This is an Anthropic-side issue — tracked in [claude-code#30930](https://github.com/anthropics/claude-code/issues/30930) and [claude-code#31021](https://github.com/anthropics/claude-code/issues/31021). The usage bar will start working again once Anthropic fixes the endpoint.
|
|
49
|
+
|
|
44
50
|
## Notes
|
|
45
51
|
|
|
46
52
|
- Replaces the default pi footer entirely via `ctx.ui.setFooter()`
|
package/index.ts
CHANGED
|
@@ -794,10 +794,11 @@ export default function (pi: ExtensionAPI) {
|
|
|
794
794
|
tuiRef?.requestRender();
|
|
795
795
|
}
|
|
796
796
|
|
|
797
|
-
// Fetch fresh in background
|
|
797
|
+
// Fetch fresh in background — keep cached data on transient errors
|
|
798
798
|
fetchUsageForProvider(provider)
|
|
799
799
|
.then((u) => {
|
|
800
800
|
if (!u || activeProvider !== provider) return;
|
|
801
|
+
if (u.windows.length === 0 && u.error && cached?.windows.length) return;
|
|
801
802
|
usageCache.set(provider, u);
|
|
802
803
|
latestUsage = u;
|
|
803
804
|
tuiRef?.requestRender();
|
|
@@ -810,10 +811,13 @@ export default function (pi: ExtensionAPI) {
|
|
|
810
811
|
if (refreshTimer) clearInterval(refreshTimer);
|
|
811
812
|
refreshTimer = setInterval(() => {
|
|
812
813
|
if (activeProvider) {
|
|
813
|
-
|
|
814
|
+
const provider = activeProvider;
|
|
815
|
+
const cached = usageCache.get(provider);
|
|
816
|
+
fetchUsageForProvider(provider)
|
|
814
817
|
.then((u) => {
|
|
815
|
-
if (!u) return;
|
|
816
|
-
|
|
818
|
+
if (!u || activeProvider !== provider) return;
|
|
819
|
+
if (u.windows.length === 0 && u.error && cached?.windows.length) return;
|
|
820
|
+
usageCache.set(provider, u);
|
|
817
821
|
latestUsage = u;
|
|
818
822
|
tuiRef?.requestRender();
|
|
819
823
|
})
|