MCPcopy Index your code
hub / github.com/codeaashu/claude-code / generateFunFactoid

Function generateFunFactoid

src/components/Stats.tsx:688–715  ·  view source on GitHub ↗
(stats: ClaudeCodeStats, totalTokens: number)

Source from the content-addressed store, hash-verified

686 minutes: 480
687}];
688function 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}
716function ModelsTab(t0) {
717 const $ = _c(15);
718 const {

Callers 2

OverviewTabFunction · 0.85
renderOverviewToAnsiFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected