+2
-0
@@ -45,2 +45,3 @@ export declare const ok: (msg: string) => string; | ||
| tag?: string; | ||
| suffix?: string; | ||
| } | ||
@@ -50,2 +51,3 @@ export interface HistogramOptions { | ||
| scale?: number; | ||
| unit?: string; | ||
| } | ||
@@ -52,0 +54,0 @@ export declare function histogram(items: HistogramItem[], options?: HistogramOptions): string; |
+3
-2
@@ -106,3 +106,3 @@ import pc from 'picocolors'; | ||
| export function histogram(items, options = {}) { | ||
| const { maxBarLength = 30, scale = 10 } = options; | ||
| const { maxBarLength = 30, scale = 10, unit = '×' } = options; | ||
| return items | ||
@@ -112,3 +112,4 @@ .map((item) => { | ||
| const tagPart = item.tag ? ` (${item.tag})` : ''; | ||
| return `${item.label} ${bar} ${item.value}×${tagPart}`; | ||
| const suffixPart = item.suffix ? ` ${item.suffix}` : ''; | ||
| return `${item.label} ${bar} ${item.value}${unit}${tagPart}${suffixPart}`; | ||
| }) | ||
@@ -115,0 +116,0 @@ .join('\n'); |
+1
-1
| { | ||
| "name": "agentfmt", | ||
| "version": "0.1.2", | ||
| "version": "0.1.3", | ||
| "description": "Token-efficient CLI output formatting for LLM agents", | ||
@@ -5,0 +5,0 @@ "type": "module", |
17162
0.8%269
1.13%