(null);
const toast = useToast();
useEffect(() => {
if (!ref.current) return;
if (prefersReducedMotion()) animate(ref.current, { opacity: [0, 1] }, { duration: 0.18 });
else animate(ref.current, { opacity: [0, 1], y: [12, 0] }, springs.snap);
}, [result.trace_id]);
const copyDebug = async () => {
try {
await navigator.clipboard.writeText(await getDebugPaste());
toast.show("Debug copied");
} catch (err) {
toast.show(err instanceof Error ? err.message : "Copy failed", "error");
}
};
const looksLikeTemplate =
/LOOP:\s*
{looksLikeTemplate ? "Rules" : sourceLabel(result.source)}
{result.flags.length ? {result.flags.join(" · ")} : null}
{displayText}
);
}