MCPcopy Index your code
hub / github.com/CopilotKit/OpenTag / onSample

Function onSample

e2e/run.ts:123–135  ·  view source on GitHub ↗
(s: { elapsedMs: number; text: string | undefined })

Source from the content-addressed store, hash-verified

121 }
122
123 const onSample = (s: { elapsedMs: number; text: string | undefined }) => {
124 const text = s.text ?? "";
125 const balanced = isBalanced(text);
126 samples.push({
127 elapsedMs: s.elapsedMs,
128 balanced,
129 len: text.length,
130 preview: text.slice(0, 100),
131 // Capture full text for unbalanced samples so we can diagnose without
132 // having to re-run. Skipped for balanced samples to keep reports small.
133 ...(text.length > 0 && !balanced ? { full: text } : {}),
134 });
135 };
136
137 if (interruptTimer === undefined) {
138 /* no-op */

Callers

nothing calls this directly

Calls 1

isBalancedFunction · 0.70

Tested by

no test coverage detected