opencode-usage-insights 0.1.2 → 0.2.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.
- package/CONTRIBUTING.md +97 -0
- package/README.md +286 -202
- package/dist/gui-experimental.cjs +8 -0
- package/dist/index.d.ts +22 -4
- package/dist/index.js +3158 -195
- package/dist/index.js.map +17 -9
- package/dist/limits.d.ts +15 -0
- package/dist/line.d.ts +0 -4
- package/dist/panel-build.d.ts +0 -4
- package/dist/panel-data.d.ts +11 -3
- package/dist/panel.d.ts +2 -21
- package/dist/recorder.d.ts +4 -0
- package/dist/rpc-client.d.ts +24 -0
- package/dist/rpc.d.ts +1022 -0
- package/dist/rpc.js +294 -0
- package/dist/rpc.js.map +11 -0
- package/dist/service.d.ts +36 -0
- package/dist/sidebar.d.ts +2 -7
- package/dist/stats/aggregates.d.ts +13 -3
- package/dist/stats/db.d.ts +27 -4
- package/dist/stats/maintenance.d.ts +12 -0
- package/dist/stats/queries.d.ts +41 -5
- package/dist/stats-client.d.ts +65 -0
- package/dist/stats-worker.d.ts +1 -0
- package/dist/stats-worker.js +3466 -0
- package/dist/stats-worker.js.map +22 -0
- package/dist/tui.d.ts +9 -6
- package/dist/tui.js +946 -1561
- package/dist/tui.js.map +14 -16
- package/docs/demo.md +207 -0
- package/docs/images/line.png +0 -0
- 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/images/sidebar.png +0 -0
- package/docs/internals.md +387 -0
- package/package.json +42 -19
package/dist/tui.d.ts
CHANGED
|
@@ -11,16 +11,19 @@ import { type PanelView, type RangeKey } from "./panel-data";
|
|
|
11
11
|
* - `session.panel` + the `/stats` slash command: the statistics panel over
|
|
12
12
|
* the database written by the server entry.
|
|
13
13
|
*
|
|
14
|
-
* The line is computed from the host's transcript alone; the
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* the
|
|
14
|
+
* The line is computed from the host's transcript alone; the panel, the
|
|
15
|
+
* sidebar history and the stored list estimate come from the server's usage
|
|
16
|
+
* RPC. The TUI never opens SQLite, so it works the same against a local or a
|
|
17
|
+
* remote server. When the RPC is unavailable, the line still works and the
|
|
18
|
+
* panel explains itself.
|
|
18
19
|
*/
|
|
19
20
|
export type Options = {
|
|
20
21
|
/** Turn the TUI side off: no line and no panel. */
|
|
21
22
|
enabled?: boolean | undefined;
|
|
22
|
-
/**
|
|
23
|
+
/** Server-side database path override; the TUI reads it through the RPC. */
|
|
23
24
|
db?: string | undefined;
|
|
25
|
+
/** Allow the panel's prune, wipe, vacuum and backfill actions. Defaults to true. */
|
|
26
|
+
maintenance?: boolean | undefined;
|
|
24
27
|
/**
|
|
25
28
|
* List-price estimates for steps the host reports as costing nothing.
|
|
26
29
|
* `off` hides them on the line, in the panel and in the sidebar, and
|
|
@@ -38,7 +41,7 @@ export type Options = {
|
|
|
38
41
|
labels?: Partial<LineLabels> | undefined;
|
|
39
42
|
/** Show the per-prompt history in the session sidebar (default true). */
|
|
40
43
|
sidebar?: boolean | undefined;
|
|
41
|
-
/** How many turns the sidebar history shows (default
|
|
44
|
+
/** How many turns the sidebar history shows (default 8, clamped to 1–50). */
|
|
42
45
|
sidebarTurns?: number | undefined;
|
|
43
46
|
/**
|
|
44
47
|
* Show the `/usage` statistics panel and its command (default true).
|