fix: HTML code blocks no longer break chat flow

- HTML code blocks now show as syntax-highlighted code with a Preview button
- Added sandboxed iframe HTML preview panel
- Added 'Open in Browser' button for full-screen preview
- Raw HTML from AI responses no longer injected into chat DOM
This commit is contained in:
admin
2026-05-21 18:23:15 +04:00
Unverified
parent 5125725ea7
commit e2a97a958a
3 changed files with 98 additions and 2 deletions

View File

@@ -132,6 +132,19 @@
</div>
</div>
<div id="html-preview" class="file-viewer" style="display:none;z-index:2500;">
<div class="file-viewer-header">
<div class="file-viewer-title">
<span id="html-preview-title">HTML Preview</span>
</div>
<div class="file-viewer-actions">
<button id="html-preview-newtab" class="fv-btn">Open in Browser</button>
<button id="html-preview-close" class="icon-btn" aria-label="Close preview">&times;</button>
</div>
</div>
<iframe id="html-preview-frame" sandbox="allow-scripts allow-same-origin" style="flex:1;width:100%;border:none;background:white;border-radius:0 0 12px 12px;"></iframe>
</div>
<div id="messages" class="messages"></div>
<div id="terminal-panel" class="terminal-panel">