MCPcopy Create free account
hub / github.com/Noumena-Network/code / generateFunFactoid

Function generateFunFactoid

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

Source from the content-addressed store, hash-verified

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

Callers 2

OverviewTabFunction · 0.85
renderOverviewToAnsiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected