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

Function printSummary

scripts/fetch-recent-chat-completion-traces.ts:303–321  ·  view source on GitHub ↗
(args: Args, sessions: TraceSession[])

Source from the content-addressed store, hash-verified

301}
302
303function printSummary(args: Args, sessions: TraceSession[]) {
304 console.log(
305 `Fetched ${sessions.length} trace session(s) from ${args.dataset}.chat_completion_traces`,
306 )
307 console.log(`Lookback: ${args.lookbackHours} hour(s)`)
308
309 for (const session of sessions) {
310 console.log('')
311 console.log(`Trace session: ${session.trace_session_id}`)
312 console.log(` messages=${session.messages.length}`)
313 console.log(
314 ` first=${session.first_created_at} last=${session.last_created_at}`,
315 )
316 console.log(
317 ` agents=${session.agent_ids.join(', ')}${session.incomplete ? ' incomplete=true' : ''}`,
318 )
319 console.log(` last_message=${getMessagePreview(session.messages.at(-1))}`)
320 }
321}
322
323function buildIndexEntry(session: TraceSession): TraceSessionIndexEntry {
324 return {

Callers 1

mainFunction · 0.85

Calls 2

getMessagePreviewFunction · 0.85
atMethod · 0.80

Tested by

no test coverage detected