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

Function readMaxTranscriptIndex

src/ink/replPerfHarness.tsx:292–297  ·  view source on GitHub ↗
(screenText: string)

Source from the content-addressed store, hash-verified

290}
291
292export function readMaxTranscriptIndex(screenText: string): number | null {
293 const matches = [...screenText.matchAll(/\b(?:user|assistant)-(\d+)\b/g)]
294 if (matches.length === 0) return null
295
296 return Math.max(...matches.map(match => Number.parseInt(match[1]!, 10)))
297}
298
299export function readInkScreenMaxTranscriptIndex(
300 ink: MountedInkProbe | undefined,

Callers 1

Calls 1

maxMethod · 0.80

Tested by

no test coverage detected