From 7806cd5aef9fb0505b2c642ef70599a403cf14ba Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Fri, 6 Mar 2026 20:00:12 -0600 Subject: [PATCH] feat: use CodeMirror editor for HTML source view, hide save in preview mode - HTML preview (iframe) no longer shows Edit/Save toolbar buttons - Clicking Source toggle opens CodeMirror editor with syntax highlighting - Save button appears only in source mode, using saveCodeFile() - Ctrl+S saving supported via CodeMirror keybinding --- src/lib/components/chat/FileNav.svelte | 55 +++++++++++++------ .../chat/FileNav/FilePreview.svelte | 9 +++ 2 files changed, 46 insertions(+), 18 deletions(-) diff --git a/src/lib/components/chat/FileNav.svelte b/src/lib/components/chat/FileNav.svelte index fbc7568f80..80285c976b 100644 --- a/src/lib/components/chat/FileNav.svelte +++ b/src/lib/components/chat/FileNav.svelte @@ -709,24 +709,43 @@ {/if} {#if isTextFile} - {#if isCode} - - - - {:else if editing} + {#if isHtml && showRaw} + + + + {:else if isHtml} + + {:else if isCode} + + + + {:else if editing}