@leo000001/opencode-quota-sidebar 4.0.12 → 4.0.13
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/dist/cli.js +2 -1
- package/dist/tools.js +2 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -435,11 +435,11 @@ export async function runCli(argv) {
|
|
|
435
435
|
client,
|
|
436
436
|
directory,
|
|
437
437
|
});
|
|
438
|
-
const quotas = await quotaService.getQuotaSnapshots([...allowedProviderIDs]);
|
|
439
438
|
if (command.since || command.last !== undefined) {
|
|
440
439
|
const resolvedSince = command.since || sinceFromLast(command.period, command.last);
|
|
441
440
|
const historyRaw = await usageService.summarizeHistoryUsage(command.period, resolvedSince);
|
|
442
441
|
const history = strictFilterHistoryProviders(historyRaw, allowedProviderIDs);
|
|
442
|
+
const quotas = await quotaService.getQuotaSnapshots(Object.keys(history.total.providers));
|
|
443
443
|
return renderCliHistoryDashboard({
|
|
444
444
|
result: history,
|
|
445
445
|
quotas,
|
|
@@ -449,6 +449,7 @@ export async function runCli(argv) {
|
|
|
449
449
|
}
|
|
450
450
|
const usageRaw = await usageService.summarizeForTool(command.period, '', false);
|
|
451
451
|
const usage = strictFilterUsageProviders(usageRaw, allowedProviderIDs);
|
|
452
|
+
const quotas = await quotaService.getQuotaSnapshots(Object.keys(usage.providers));
|
|
452
453
|
return renderCliDashboard({
|
|
453
454
|
label: cliCurrentLabel(command.period),
|
|
454
455
|
usage,
|
package/dist/tools.js
CHANGED
|
@@ -79,7 +79,7 @@ export function createQuotaSidebarTools(deps) {
|
|
|
79
79
|
if (period !== 'session' && resolvedSince) {
|
|
80
80
|
const historyRaw = await deps.summarizeHistoryForTool(period, resolvedSince);
|
|
81
81
|
const history = strictFilterHistoryProviders(historyRaw, allowedProviderIDs);
|
|
82
|
-
const quotas = await deps.getQuotaSnapshots(
|
|
82
|
+
const quotas = await deps.getQuotaSnapshots(Object.keys(history.total.providers));
|
|
83
83
|
const markdown = deps.renderHistoryMarkdownReport(history, quotas, {
|
|
84
84
|
showCost: deps.config.sidebar.showCost,
|
|
85
85
|
});
|
|
@@ -96,7 +96,7 @@ export function createQuotaSidebarTools(deps) {
|
|
|
96
96
|
: false;
|
|
97
97
|
const usageRaw = await deps.summarizeForTool(period, context.sessionID, includeChildren);
|
|
98
98
|
const usage = strictFilterUsageProviders(usageRaw, allowedProviderIDs);
|
|
99
|
-
const quotas = await deps.getQuotaSnapshots(
|
|
99
|
+
const quotas = await deps.getQuotaSnapshots(Object.keys(usage.providers));
|
|
100
100
|
const markdown = deps.renderMarkdownReport(period, usage, quotas, {
|
|
101
101
|
showCost: deps.config.sidebar.showCost,
|
|
102
102
|
});
|
package/package.json
CHANGED