@oh-my-pi/pi-coding-agent 16.3.3 → 16.3.4

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-coding-agent",
4
- "version": "16.3.3",
4
+ "version": "16.3.4",
5
5
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
@@ -56,17 +56,17 @@
56
56
  "@agentclientprotocol/sdk": "0.25.0",
57
57
  "@babel/parser": "^7.29.7",
58
58
  "@mozilla/readability": "^0.6.0",
59
- "@oh-my-pi/hashline": "16.3.3",
60
- "@oh-my-pi/omp-stats": "16.3.3",
61
- "@oh-my-pi/pi-agent-core": "16.3.3",
62
- "@oh-my-pi/pi-ai": "16.3.3",
63
- "@oh-my-pi/pi-catalog": "16.3.3",
64
- "@oh-my-pi/pi-mnemopi": "16.3.3",
65
- "@oh-my-pi/pi-natives": "16.3.3",
66
- "@oh-my-pi/pi-tui": "16.3.3",
67
- "@oh-my-pi/pi-utils": "16.3.3",
68
- "@oh-my-pi/pi-wire": "16.3.3",
69
- "@oh-my-pi/snapcompact": "16.3.3",
59
+ "@oh-my-pi/hashline": "16.3.4",
60
+ "@oh-my-pi/omp-stats": "16.3.4",
61
+ "@oh-my-pi/pi-agent-core": "16.3.4",
62
+ "@oh-my-pi/pi-ai": "16.3.4",
63
+ "@oh-my-pi/pi-catalog": "16.3.4",
64
+ "@oh-my-pi/pi-mnemopi": "16.3.4",
65
+ "@oh-my-pi/pi-natives": "16.3.4",
66
+ "@oh-my-pi/pi-tui": "16.3.4",
67
+ "@oh-my-pi/pi-utils": "16.3.4",
68
+ "@oh-my-pi/pi-wire": "16.3.4",
69
+ "@oh-my-pi/snapcompact": "16.3.4",
70
70
  "@opentelemetry/api": "^1.9.1",
71
71
  "@opentelemetry/context-async-hooks": "^2.7.1",
72
72
  "@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
@@ -370,6 +370,29 @@ function formatLimitLine(limit: UsageLimit, labelWidth: number, nowMs: number):
370
370
  return lines;
371
371
  }
372
372
 
373
+ interface ProviderLimitTemplate {
374
+ id: string;
375
+ title: string;
376
+ }
377
+
378
+ function collectProviderLimitTemplates(reports: UsageReport[]): ProviderLimitTemplate[] {
379
+ const seen = new Set<string>();
380
+ const templates: ProviderLimitTemplate[] = [];
381
+ for (const report of reports) {
382
+ for (const limit of report.limits) {
383
+ if (seen.has(limit.id)) continue;
384
+ seen.add(limit.id);
385
+ templates.push({ id: limit.id, title: limitTitle(limit) });
386
+ }
387
+ }
388
+ return templates;
389
+ }
390
+
391
+ function formatMissingLimitLine(template: ProviderLimitTemplate, labelWidth: number): string {
392
+ const padded = template.title.padEnd(labelWidth);
393
+ return ` ${chalk.dim("○")} ${padded} ${chalk.dim("·".repeat(BAR_WIDTH))} ${chalk.dim("not reported")}`;
394
+ }
395
+
373
396
  /** Per-window capacity stat: how much account quota is burned and left. */
374
397
  export interface ProviderWindowStat {
375
398
  /** Compact window label, e.g. "5h", "7d". */
@@ -474,9 +497,8 @@ export function formatUsageBreakdown(
474
497
  for (const note of providerNotes)
475
498
  lines.push(` ${chalk.dim(sanitizeText(note.replace(/[\r\n]+/g, " ").replace(/\t/g, " ")))}`);
476
499
 
477
- const labelWidth = providerReports
478
- .flatMap(report => report.limits)
479
- .reduce((max, limit) => Math.max(max, limitTitle(limit).length), 0);
500
+ const providerLimitTemplates = collectProviderLimitTemplates(providerReports);
501
+ const labelWidth = providerLimitTemplates.reduce((max, template) => Math.max(max, template.title.length), 0);
480
502
 
481
503
  providerReports.forEach((report, index) => {
482
504
  lines.push(` ${formatAccountHeader(report, index, nowMs, redaction)}`);
@@ -484,8 +506,15 @@ export function formatUsageBreakdown(
484
506
  lines.push(` ${chalk.dim("no limits reported")}`);
485
507
  return;
486
508
  }
487
- for (const limit of report.limits) {
488
- lines.push(...formatLimitLine(limit, labelWidth, nowMs));
509
+ const limitsById = new Map<string, UsageLimit>();
510
+ for (const limit of report.limits) limitsById.set(limit.id, limit);
511
+ for (const template of providerLimitTemplates) {
512
+ const limit = limitsById.get(template.id);
513
+ if (limit) {
514
+ lines.push(...formatLimitLine(limit, labelWidth, nowMs));
515
+ } else {
516
+ lines.push(formatMissingLimitLine(template, labelWidth));
517
+ }
489
518
  }
490
519
  });
491
520