This commit is contained in:
Timothy Jaeryang Baek
2026-03-02 12:49:51 -06:00
parent 3909b62ffc
commit 933a3bbbd3
3 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -492,7 +492,7 @@
onClose={() => showControls.set(false)}
/>
{:else if activeTab === 'files' && $selectedTerminalId}
<FileNav onAttach={handleTerminalAttach} />
<FileNav onAttach={handleTerminalAttach} overlay={dragged} />
{:else}
<Controls embed={true} {models} bind:chatFiles bind:params />
{/if}
+2
View File
@@ -40,6 +40,7 @@
const i18n = getContext('i18n');
export let onAttach: ((blob: Blob, name: string, contentType: string) => void) | null = null;
export let overlay = false;
// ── Directory state ──────────────────────────────────────────────────
let currentPath = savedPath;
@@ -658,6 +659,7 @@
{fileImageUrl}
{filePdfData}
{fileContent}
{overlay}
onSave={async (content) => {
const terminal = selectedTerminal;
if (!terminal || !selectedFile) return;
@@ -17,6 +17,8 @@
export let filePdfData: ArrayBuffer | null = null;
export let fileContent: string | null = null;
export let overlay = false;
export let onSave: ((content: string) => Promise<void>) | null = null;
export let editing = false;
@@ -170,6 +172,9 @@
<PDFViewer bind:this={pdfViewerRef} data={filePdfData} className="w-full h-full" />
{:else if fileContent !== null}
{#if isHtml && !showRaw}
{#if overlay}
<div class="absolute top-0 left-0 right-0 bottom-0 z-10"></div>
{/if}
<iframe
srcdoc={fileContent}
sandbox="allow-scripts allow-downloads{($settings?.iframeSandboxAllowForms ?? false)