(usage: {
input: number;
output: number;
cacheRead: number;
cacheWrite: number;
cost: { total: number };
})
| 1355 | } |
| 1356 | |
| 1357 | function formatUsage(usage: { |
| 1358 | input: number; |
| 1359 | output: number; |
| 1360 | cacheRead: number; |
| 1361 | cacheWrite: number; |
| 1362 | cost: { total: number }; |
| 1363 | }): string { |
| 1364 | const parts = []; |
| 1365 | if (usage.input) parts.push(`${usage.input.toLocaleString()} in`); |
| 1366 | if (usage.output) parts.push(`${usage.output.toLocaleString()} out`); |
| 1367 | if (usage.cacheRead) parts.push(`${usage.cacheRead.toLocaleString()} cache`); |
| 1368 | if (usage.cost?.total) parts.push(`$${usage.cost.total.toFixed(4)}`); |
| 1369 | return parts.join(" · "); |
| 1370 | } |
| 1371 | |
| 1372 | function BashExecutionView({ message, sessionId }: { message: BashExecutionMessage; sessionId?: string }) { |
| 1373 | const [fullOutput, setFullOutput] = useState<string | null>(null); |
no outgoing calls
no test coverage detected