opencode-usage-insights 0.2.0 → 0.3.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.
- package/README.md +100 -36
- package/dist/core.d.ts +10 -0
- package/dist/gui-experimental.cjs +3 -3
- package/dist/index.d.ts +7 -0
- package/dist/index.js +690 -276
- package/dist/index.js.map +12 -11
- package/dist/limits.d.ts +9 -0
- package/dist/panel-data.d.ts +75 -10
- package/dist/panel.d.ts +9 -2
- package/dist/quota-client.d.ts +13 -0
- package/dist/quota.d.ts +114 -0
- package/dist/rpc.d.ts +1 -1
- package/dist/rpc.js +4 -3
- package/dist/rpc.js.map +4 -4
- package/dist/sidebar.d.ts +5 -0
- package/dist/stats/aggregates.d.ts +4 -1
- package/dist/stats-worker.js +688 -274
- package/dist/stats-worker.js.map +10 -9
- package/dist/tui.d.ts +13 -4
- package/dist/tui.js +823 -283
- package/dist/tui.js.map +12 -10
- package/docs/demo.md +18 -13
- package/docs/images/panel-cache.png +0 -0
- package/docs/images/panel-overview.png +0 -0
- package/docs/images/panel-providers.png +0 -0
- package/docs/internals.md +72 -4
- package/package.json +7 -3
package/dist/tui.d.ts
CHANGED
|
@@ -8,8 +8,10 @@ import { type PanelView, type RangeKey } from "./panel-data";
|
|
|
8
8
|
* - `session.composer.top`: one telemetry line after every turn with the end
|
|
9
9
|
* time, the delta since the previous prompt, the provider and model that ran
|
|
10
10
|
* it, turn and session token totals, and cache warnings.
|
|
11
|
-
* - `session.panel` + the `/
|
|
12
|
-
* the database written by the server entry.
|
|
11
|
+
* - `session.panel` + the `/usage-insights` slash command: the statistics
|
|
12
|
+
* panel over the database written by the server entry. Its `go` view reads
|
|
13
|
+
* the host's live OpenCode Go allowance; the sidebar carries the compact
|
|
14
|
+
* forecast.
|
|
13
15
|
*
|
|
14
16
|
* The line is computed from the host's transcript alone; the panel, the
|
|
15
17
|
* sidebar history and the stored list estimate come from the server's usage
|
|
@@ -44,8 +46,15 @@ export type Options = {
|
|
|
44
46
|
/** How many turns the sidebar history shows (default 8, clamped to 1–50). */
|
|
45
47
|
sidebarTurns?: number | undefined;
|
|
46
48
|
/**
|
|
47
|
-
*
|
|
48
|
-
* `
|
|
49
|
+
* Read the host's OpenCode Go allowance and show the `go` view and the
|
|
50
|
+
* sidebar forecast. `off` makes no usage-limits request at all.
|
|
51
|
+
*/
|
|
52
|
+
quota?: "auto" | "off" | undefined;
|
|
53
|
+
/** Full subscription label; defaults to the host provider name or OpenCode Go. */
|
|
54
|
+
quotaName?: string | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Show the `/usage-insights` statistics panel and its command (default
|
|
57
|
+
* true). `false` keeps the live line and the sidebar history.
|
|
49
58
|
*/
|
|
50
59
|
panel?: boolean | undefined;
|
|
51
60
|
};
|