MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / renderSuspect

Function renderSuspect

web/src/server/free-session/abuse-detection.ts:561–573  ·  view source on GitHub ↗
(s: BotSuspect)

Source from the content-addressed store, hash-verified

559 // column alignment. Separator-delimited survives both plain text and
560 // wrapped HTML.
561 const renderSuspect = (s: BotSuspect) => {
562 const gh =
563 s.githubAgeDays !== null
564 ? ` gh_age=${s.githubAgeDays.toFixed(1)}d`
565 : s.githubId === null
566 ? ' gh_age=n/a'
567 : ' gh_age=?'
568 const counter =
569 s.counterSignals.length > 0
570 ? ` | counter: ${s.counterSignals.join(' ')}`
571 : ''
572 return ` ${s.email} — score=${s.score} age=${s.ageDays.toFixed(1)}d${gh} msgs24=${s.msgs24h} agents24=${s.distinctAgents24h} lifetime=${s.msgsLifetime} | ${s.flags.join(' ')}${counter}`
573 }
574
575 if (high.length > 0) {
576 lines.push(`=== HIGH CONFIDENCE (${high.length}) ===`)

Callers 1

formatSweepReportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected