@ravshansbox/pi-quota 0.4.0 → 0.4.1

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.
Files changed (2) hide show
  1. package/index.ts +5 -5
  2. package/package.json +3 -2
package/index.ts CHANGED
@@ -6,6 +6,7 @@ import {
6
6
  type ExtensionAPI,
7
7
  type ExtensionContext,
8
8
  } from '@earendil-works/pi-coding-agent';
9
+ import { Text } from '@earendil-works/pi-tui';
9
10
 
10
11
  interface QuotaConfig {
11
12
  codexResets?: { autoRedeem?: boolean };
@@ -206,12 +207,11 @@ export default function (pi: ExtensionAPI) {
206
207
  if (!ctxRef) return;
207
208
 
208
209
  const text = buildStatusText();
210
+ const line = text === undefined ? undefined : ctxRef.ui.theme.fg('muted', text);
209
211
 
210
- ctxRef.ui.setWidget(
211
- 'pi-quota',
212
- text === undefined ? undefined : [ctxRef.ui.theme.fg('muted', text)],
213
- { placement: 'aboveEditor' },
214
- );
212
+ ctxRef.ui.setWidget('pi-quota', line === undefined ? undefined : () => new Text(line, 0, 0), {
213
+ placement: 'aboveEditor',
214
+ });
215
215
  }
216
216
 
217
217
  function windowResetDetected(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ravshansbox/pi-quota",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Anthropic and OpenAI Codex quota status extension for pi",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -31,7 +31,8 @@
31
31
  "check": "npm run typecheck && npm run lint && npm run format:check"
32
32
  },
33
33
  "peerDependencies": {
34
- "@earendil-works/pi-coding-agent": "*"
34
+ "@earendil-works/pi-coding-agent": "*",
35
+ "@earendil-works/pi-tui": "*"
35
36
  },
36
37
  "devDependencies": {
37
38
  "@types/node": "^26.6.5",