feat(preview): add sandboxed live code previews

Render validated HTML, SVG, JSX, and TSX fences locally while preserving tool context and preventing explanatory JSON from triggering actions.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-26 03:34:19 -05:00
committed by Athena
co-authored by Cursor
parent 42eaed647a
commit 656c14caf3
13 changed files with 3079 additions and 31 deletions
+10
View File
@@ -25,6 +25,16 @@ else
echo "-- skipped: interface/web/node_modules missing (npm install)"
fi
echo "== frontend unit tests =="
# The JSX/TSX transform behind the preview window is a pure module with a
# node --test suite. Nothing else in the frontend has tests, so this is cheap;
# without it the transform's silent-wrong cases go unguarded.
if [ -d interface/web/node_modules ]; then
(cd interface/web && npm test) || fail=1
else
echo "-- skipped: interface/web/node_modules missing (npm install)"
fi
echo "== powershell parse =="
# The Windows installer has died at parse twice. Cheap to catch here if pwsh
# happens to be installed on the Linux box; the ASCII guard in tests/ is the