(s: { elapsedMs: number; text: string | undefined })
| 159 | } |
| 160 | |
| 161 | const onSample = (s: { elapsedMs: number; text: string | undefined }) => { |
| 162 | const text = s.text ?? ""; |
| 163 | const balanced = isBalanced(text); |
| 164 | samples.push({ |
| 165 | elapsedMs: s.elapsedMs, |
| 166 | balanced, |
| 167 | len: text.length, |
| 168 | preview: text.slice(0, 100), |
| 169 | ...(text.length > 0 && !balanced ? { full: text } : {}), |
| 170 | }); |
| 171 | }; |
| 172 | |
| 173 | const result = await watchForReply({ |
| 174 | chatId: TEST_CHAT_ID, |
nothing calls this directly
no test coverage detected