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-20 00:51:29 -05:00
committed by Athena
co-authored by Cursor
parent fe5d18afa7
commit 00bd43d32e
13 changed files with 3084 additions and 28 deletions
+22
View File
@@ -8,6 +8,7 @@
"name": "web",
"version": "1.0.0",
"dependencies": {
"preact": "^10.29.8",
"react": "^19.2.4",
"react-dom": "^19.2.4"
},
@@ -21,6 +22,9 @@
"eslint-plugin-react-refresh": "^0.5.2",
"globals": "^17.4.0",
"vite": "^8.0.4"
},
"engines": {
"node": ">=20.19"
}
},
"node_modules/@babel/code-frame": {
@@ -2233,6 +2237,24 @@
"node": "^10 || ^12 || >=14"
}
},
"node_modules/preact": {
"version": "10.29.8",
"resolved": "https://registry.npmjs.org/preact/-/preact-10.29.8.tgz",
"integrity": "sha512-ej2aVZ+vZ8WO7tvlQWRM9N63A0KzF9q4mWJfDUHgYaIofWY9hu74QdnQrjoPMmZi2/nZ5gN0bJCQF49xQqx09Q==",
"license": "MIT",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/preact"
},
"peerDependencies": {
"preact-render-to-string": ">=5"
},
"peerDependenciesMeta": {
"preact-render-to-string": {
"optional": true
}
}
},
"node_modules/prelude-ls": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",