opencode-codex-usage-tui 1.3.2 → 1.3.3
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 +3 -3
- package/dist/tui.js +5 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# opencode-codex-usage
|
|
1
|
+
# opencode-codex-usage-tui
|
|
2
2
|
|
|
3
3
|
OpenCode TUI plugin that shows remaining ChatGPT Codex usage limits in the sidebar.
|
|
4
4
|
|
|
@@ -23,7 +23,7 @@ Add the published package to OpenCode's TUI configuration:
|
|
|
23
23
|
```json
|
|
24
24
|
{
|
|
25
25
|
"$schema": "https://opencode.ai/tui.json",
|
|
26
|
-
"plugin": ["opencode-codex-usage-tui@1.3.
|
|
26
|
+
"plugin": ["opencode-codex-usage-tui@1.3.3"]
|
|
27
27
|
}
|
|
28
28
|
```
|
|
29
29
|
|
|
@@ -44,7 +44,7 @@ For example, a local file URL can be used when supported:
|
|
|
44
44
|
```json
|
|
45
45
|
{
|
|
46
46
|
"$schema": "https://opencode.ai/tui.json",
|
|
47
|
-
"plugin": ["file:///absolute/path/to/opencode-codex-usage-tui-1.3.
|
|
47
|
+
"plugin": ["file:///absolute/path/to/opencode-codex-usage-tui-1.3.3.tgz"]
|
|
48
48
|
}
|
|
49
49
|
```
|
|
50
50
|
|
package/dist/tui.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TextAttributes } from "@opentui/core";
|
|
1
2
|
import { createElement, insert, setProp } from "@opentui/solid";
|
|
2
3
|
import { fetchUsage, normalizePayload } from "./core.js";
|
|
3
4
|
const DASHBOARD_URL = "https://chatgpt.com/codex/settings/usage";
|
|
@@ -12,7 +13,9 @@ let collapsedInitialized = false;
|
|
|
12
13
|
async function fetchOnce() {
|
|
13
14
|
if (!fetchRequested || inflight) return;
|
|
14
15
|
inflight = true;
|
|
15
|
-
|
|
16
|
+
if (state.status !== "ok" || state.windows.length === 0)
|
|
17
|
+
state = { ...state, status: "loading", message: void 0 };
|
|
18
|
+
else state = { ...state, message: void 0 };
|
|
16
19
|
try {
|
|
17
20
|
const result = await fetchUsage();
|
|
18
21
|
if (!result.ok) {
|
|
@@ -116,7 +119,7 @@ const tui = async (api) => {
|
|
|
116
119
|
const muted = theme.textMuted;
|
|
117
120
|
const normal = theme.text;
|
|
118
121
|
const valStyle = { fg: muted };
|
|
119
|
-
const headerTitle = valNode({
|
|
122
|
+
const headerTitle = valNode({ attributes: TextAttributes.BOLD, fg: normal });
|
|
120
123
|
const headerSummary = valNode(valStyle);
|
|
121
124
|
const planVal = valNode(valStyle);
|
|
122
125
|
const creditsVal = valNode(valStyle);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-codex-usage-tui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "OpenCode TUI plugin that shows remaining ChatGPT Codex usage limits in the sidebar",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"limits",
|
|
44
44
|
"sidebar"
|
|
45
45
|
],
|
|
46
|
-
"homepage": "https://github.com/ahmadmcer/opencode-codex-usage",
|
|
46
|
+
"homepage": "https://github.com/ahmadmcer/opencode-codex-usage-tui",
|
|
47
47
|
"repository": {
|
|
48
48
|
"type": "git",
|
|
49
|
-
"url": "git+https://github.com/ahmadmcer/opencode-codex-usage.git"
|
|
49
|
+
"url": "git+https://github.com/ahmadmcer/opencode-codex-usage-tui.git"
|
|
50
50
|
}
|
|
51
51
|
}
|