@leo000001/opencode-quota-sidebar 4.0.9 → 4.0.12
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 +504 -446
- package/README.zh-CN.md +516 -458
- package/dist/cli.d.ts +31 -0
- package/dist/cli.js +123 -46
- package/dist/cli_render.d.ts +4 -4
- package/dist/cli_render.js +74 -74
- package/dist/cost.d.ts +21 -4
- package/dist/cost.js +493 -264
- package/dist/format.d.ts +5 -5
- package/dist/format.js +288 -287
- package/dist/history_usage.d.ts +15 -9
- package/dist/history_usage.js +28 -22
- package/dist/index.js +15 -1
- package/dist/models_dev_pricing.d.ts +6 -0
- package/dist/models_dev_pricing.js +226 -0
- package/dist/opencode_pricing.d.ts +14 -0
- package/dist/opencode_pricing.js +273 -0
- package/dist/storage.d.ts +3 -3
- package/dist/storage.js +27 -28
- package/dist/storage_parse.d.ts +1 -1
- package/dist/storage_parse.js +51 -45
- package/dist/storage_paths.d.ts +1 -0
- package/dist/storage_paths.js +26 -11
- package/dist/title_apply.d.ts +1 -17
- package/dist/title_apply.js +17 -48
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +29 -15
- package/dist/tui.d.ts +1 -1
- package/dist/tui.tsx +481 -471
- package/dist/tui_helpers.d.ts +5 -3
- package/dist/tui_helpers.js +62 -34
- package/dist/types.d.ts +8 -10
- package/dist/usage.d.ts +9 -6
- package/dist/usage.js +27 -21
- package/dist/usage_service.d.ts +8 -7
- package/dist/usage_service.js +261 -150
- package/package.json +1 -1
package/dist/format.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { QuotaSidebarConfig, QuotaSnapshot } from
|
|
2
|
-
import type { HistoryUsageResult } from
|
|
3
|
-
import { type UsageSummary } from
|
|
4
|
-
export type TitleView =
|
|
1
|
+
import type { QuotaSidebarConfig, QuotaSnapshot } from "./types.js";
|
|
2
|
+
import type { HistoryUsageResult } from "./usage_service.js";
|
|
3
|
+
import { type UsageSummary } from "./usage.js";
|
|
4
|
+
export type TitleView = "multiline" | "compact";
|
|
5
5
|
/**
|
|
6
6
|
* Truncate `value` to at most `width` terminal cells.
|
|
7
7
|
* Keep plain text only (no ANSI) to avoid renderer corruption.
|
|
@@ -19,7 +19,7 @@ export declare function selectDesktopCompactProviderIDs(usage: UsageSummary, con
|
|
|
19
19
|
* Input 18.9k Output 53
|
|
20
20
|
* Cache Read 1.5k (only if read > 0)
|
|
21
21
|
* Cache Write 200 (only if write > 0)
|
|
22
|
-
* $3.81
|
|
22
|
+
* API $3.81 (only if showCost=true)
|
|
23
23
|
* OpenAI Remaining 78% (only if quota available)
|
|
24
24
|
*/
|
|
25
25
|
export declare function renderSidebarTitle(baseTitle: string, usage: UsageSummary, quotas: QuotaSnapshot[], config: QuotaSidebarConfig, view?: TitleView): string;
|