(stats: ClaudeCodeStats, totalTokens: number)
| 686 | minutes: 480 |
| 687 | }]; |
| 688 | function generateFunFactoid(stats: ClaudeCodeStats, totalTokens: number): string { |
| 689 | const factoids: string[] = []; |
| 690 | if (totalTokens > 0) { |
| 691 | const matchingBooks = BOOK_COMPARISONS.filter(book => totalTokens >= book.tokens); |
| 692 | for (const book of matchingBooks) { |
| 693 | const times = totalTokens / book.tokens; |
| 694 | if (times >= 2) { |
| 695 | factoids.push(`You've used ~${Math.floor(times)}x more tokens than ${book.name}`); |
| 696 | } else { |
| 697 | factoids.push(`You've used the same number of tokens as ${book.name}`); |
| 698 | } |
| 699 | } |
| 700 | } |
| 701 | if (stats.longestSession) { |
| 702 | const sessionMinutes = stats.longestSession.duration / (1000 * 60); |
| 703 | for (const comparison of TIME_COMPARISONS) { |
| 704 | const ratio = sessionMinutes / comparison.minutes; |
| 705 | if (ratio >= 2) { |
| 706 | factoids.push(`Your longest session is ~${Math.floor(ratio)}x longer than ${comparison.name}`); |
| 707 | } |
| 708 | } |
| 709 | } |
| 710 | if (factoids.length === 0) { |
| 711 | return ''; |
| 712 | } |
| 713 | const randomIndex = Math.floor(Math.random() * factoids.length); |
| 714 | return factoids[randomIndex]!; |
| 715 | } |
| 716 | function ModelsTab(t0) { |
| 717 | const $ = _c(15); |
| 718 | const { |
no test coverage detected