pi-agent-flow 0.1.0-alpha.6 → 0.1.0-alpha.7

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/render-utils.ts +6 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-agent-flow",
3
- "version": "0.1.0-alpha.6",
3
+ "version": "0.1.0-alpha.7",
4
4
  "description": "Flow-state delegation extension for Pi coding agent.",
5
5
  "type": "module",
6
6
  "main": "index.ts",
package/render-utils.ts CHANGED
@@ -26,17 +26,13 @@ export function formatFlowUsage(usage: Partial<UsageStats>, model?: string): str
26
26
  }
27
27
 
28
28
  export function formatCompactStats(usage: Partial<UsageStats>, model?: string): string {
29
- const io: string[] = [];
30
- if (usage.input) io.push(`↑${formatTokens(usage.input)}`);
31
- if (usage.output) io.push(`↓${formatTokens(usage.output)}`);
32
- const meta: string[] = [];
33
- if (usage.cacheRead) meta.push(`CR:${formatTokens(usage.cacheRead)}`);
34
- if (usage.contextTokens && usage.contextTokens > 0) meta.push(`ctx:${formatTokens(usage.contextTokens)}`);
35
- if (model) meta.push(model);
36
29
  const parts: string[] = [];
37
- if (io.length) parts.push(io.join(" "));
38
- if (meta.length) parts.push(meta.join(" "));
39
- return parts.join(" │ ");
30
+ parts.push(`↑${formatTokens(usage.input || 0)}`);
31
+ parts.push(`↓${formatTokens(usage.output || 0)}`);
32
+ if (usage.cacheRead) parts.push(`cr:${formatTokens(usage.cacheRead)}`);
33
+ if (usage.contextTokens && usage.contextTokens > 0) parts.push(`ctx:${formatTokens(usage.contextTokens)}`);
34
+ if (model) parts.push(model);
35
+ return parts.join(" ");
40
36
  }
41
37
 
42
38
  export function truncateChars(text: string, max: number): string {