pi-advisor-flow 0.6.0 → 0.7.0

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/src/usage.ts CHANGED
@@ -125,7 +125,7 @@ export const addAdvisorUsage = (totals: AdvisorUsageTotals, usage: unknown) => {
125
125
  }
126
126
  };
127
127
 
128
- const formatTokens = (value: number) => {
128
+ export const formatTokenCount = (value: number) => {
129
129
  if (value < 1000) {
130
130
  return String(value);
131
131
  }
@@ -141,6 +141,8 @@ const formatTokens = (value: number) => {
141
141
  return `${Math.round(value / 1_000_000)}M`;
142
142
  };
143
143
 
144
+ const formatTokens = formatTokenCount;
145
+
144
146
  const formatCost = (value: number) => `$${value.toFixed(4)}`;
145
147
 
146
148
  const formatUsageFields = (usage: AdvisorUsageSnapshot): string | undefined => {