@trim21/personal-pi-extensions 0.0.290 → 0.0.291
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 +1 -1
- package/src/spawn-agent.ts +0 -10
package/package.json
CHANGED
package/src/spawn-agent.ts
CHANGED
|
@@ -98,8 +98,6 @@ const spawnAgentSchema = Type.Object({
|
|
|
98
98
|
// ── result types ─────────────────────────────────────────────────────────────
|
|
99
99
|
|
|
100
100
|
interface UsageStats {
|
|
101
|
-
input: number;
|
|
102
|
-
output: number;
|
|
103
101
|
cost: number;
|
|
104
102
|
contextTokens: number;
|
|
105
103
|
turns: number;
|
|
@@ -155,8 +153,6 @@ function formatTokens(count: number): string {
|
|
|
155
153
|
function formatUsageStats(usage: UsageStats, model?: string): string {
|
|
156
154
|
const parts: string[] = [];
|
|
157
155
|
if (usage.turns) parts.push(`${usage.turns} turn${usage.turns > 1 ? "s" : ""}`);
|
|
158
|
-
if (usage.input) parts.push(`↑${formatTokens(usage.input)}`);
|
|
159
|
-
if (usage.output) parts.push(`↓${formatTokens(usage.output)}`);
|
|
160
156
|
if (usage.cost) parts.push(`$${usage.cost.toFixed(4)}`);
|
|
161
157
|
if (usage.contextTokens > 0) parts.push(`ctx:${formatTokens(usage.contextTokens)}`);
|
|
162
158
|
if (model) parts.push(model);
|
|
@@ -341,8 +337,6 @@ export async function runAgent(
|
|
|
341
337
|
messages: [],
|
|
342
338
|
stderr: "",
|
|
343
339
|
usage: {
|
|
344
|
-
input: 0,
|
|
345
|
-
output: 0,
|
|
346
340
|
cost: 0,
|
|
347
341
|
contextTokens: 0,
|
|
348
342
|
turns: 0,
|
|
@@ -492,8 +486,6 @@ export async function runAgent(
|
|
|
492
486
|
result.messages.push(msg);
|
|
493
487
|
if (msg.role === "assistant") {
|
|
494
488
|
result.usage.turns++;
|
|
495
|
-
result.usage.input += msg.usage.input;
|
|
496
|
-
result.usage.output += msg.usage.output;
|
|
497
489
|
result.usage.cost += msg.usage.cost.total;
|
|
498
490
|
result.usage.contextTokens = msg.usage.totalTokens;
|
|
499
491
|
if (!result.model) result.model = msg.model;
|
|
@@ -646,8 +638,6 @@ export default function spawnAgent(pi: ExtensionAPI) {
|
|
|
646
638
|
messages: [],
|
|
647
639
|
stderr: "",
|
|
648
640
|
usage: {
|
|
649
|
-
input: 0,
|
|
650
|
-
output: 0,
|
|
651
641
|
cost: 0,
|
|
652
642
|
contextTokens: 0,
|
|
653
643
|
turns: 0,
|