(screenText: string)
| 290 | } |
| 291 | |
| 292 | export 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 | |
| 299 | export function readInkScreenMaxTranscriptIndex( |
| 300 | ink: MountedInkProbe | undefined, |
no test coverage detected