refactor(preview): simplify compile and validation paths

Load Sucrase only when a JSX/TSX preview is opened, remove the hand-written transform, and leave subjective render evaluation to the reader while retaining structural fence validation.
This commit is contained in:
2026-08-26 03:26:59 -05:00
parent 26b471d259
commit 55edaa2ebd
10 changed files with 412 additions and 1993 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ _MEMORY_PREAMBLE = (
# Static capability hint, appended to every system prompt. The live Preview UI
# is frontend-only (Markdown.jsx); the model reaches it by calling the standing
# `render_preview` tool (structured markup in, validated fence out) rather than
# `render_preview` tool (structured markup in, packaged fence out) rather than
# freestyling an empty ```html stub. The tool schema carries the detailed
# requirements; this preamble just points at it.
# See synapse/tools.py: keep this short and imperative for the same reason the