feat: add token cost estimation and improve token formatting

- Format tokens: 1000k → 1m, 1450k → 1.45m, etc.
- Estimate cost using Claude Sonnet pricing ($3/M input, $15/M output)
- Show estimated cost in respawn banner and header
- More accurate than stored cost which doesn't update in interactive mode

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-25 20:12:16 +01:00
co-authored by Claude Opus 4.5
parent 4eb361f204
commit 9d32fd594b
3 changed files with 48 additions and 16 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ When user says "COM": 1) Increment version in BOTH `package.json` AND `CLAUDE.md
Claudeman is a Claude Code session manager with a web interface and autonomous Ralph Loop. It spawns Claude CLI processes via PTY, streams output in real-time via SSE, and supports scheduled/timed runs.
**Version**: 0.1361 (must match `package.json`)
**Version**: 0.1362 (must match `package.json`)
**Tech Stack**: TypeScript (ES2022/NodeNext, strict mode), Node.js, Fastify, Server-Sent Events, node-pty