| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .dockerignore | ||
| .env.example | ||
| Dockerfile | ||
| components.json | ||
| eslint.config.mjs | ||
| next-env.d.ts | ||
| next.config.mjs | ||
| package.json | ||
| postcss.config.mjs | ||
| tsconfig.json |
上版每次流式增量都换 srcDoc → iframe 整段重载 → 反复重新下载 Tailwind/Chart.js CDN, 还没加载完下一帧又来 → 整个流式期间一直"重载中"=空白(用户实测空白)。 改为持久壳方案: - iframe 只加载一次(srcDoc=固定壳:CSP+Tailwind+Chart.js+#root+消息监听),CDN 只下一次; - 内容通过 postMessage 注入 #root.innerHTML(Tailwind 的 MutationObserver 自动给新内容上样式)→ 流式内容实时"长出",不重载、不白闪; - Artifact 加 streaming 标志:流式中只 set innerHTML(图表脚本不执行,避免半截脚本报错); 最终 tool_call(streaming=false)时重建 <script> 节点 → Chart.js 执行、图表渲染。 - 高度由 iframe 内 ResizeObserver 实时回传(initial 120,随内容增长),不再是空大白框。 - openFull 用自包含整页(buildStandaloneDoc)。 web tsc 0。纯前端改动。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| public | Loading commit data... | |
| src | Loading commit data... | |
| .dockerignore | Loading commit data... | |
| .env.example | Loading commit data... | |
| Dockerfile | Loading commit data... | |
| components.json | Loading commit data... | |
| eslint.config.mjs | Loading commit data... | |
| next-env.d.ts | Loading commit data... | |
| next.config.mjs | Loading commit data... | |
| package.json | Loading commit data... | |
| postcss.config.mjs | Loading commit data... | |
| tsconfig.json | Loading commit data... |