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)} onClose={() => showControls.set(false)}
/> />
{:else if activeTab === 'files' && $selectedTerminalId} {:else if activeTab === 'files' && $selectedTerminalId}
<FileNav onAttach={handleTerminalAttach} /> <FileNav onAttach={handleTerminalAttach} overlay={dragged} />
{:else} {:else}
<Controls embed={true} {models} bind:chatFiles bind:params /> <Controls embed={true} {models} bind:chatFiles bind:params />
{/if} {/if}
+2
View File
@@ -40,6 +40,7 @@
const i18n = getContext('i18n'); const i18n = getContext('i18n');
export let onAttach: ((blob: Blob, name: string, contentType: string) => void) | null = null; export let onAttach: ((blob: Blob, name: string, contentType: string) => void) | null = null;
export let overlay = false;
// ── Directory state ────────────────────────────────────────────────── // ── Directory state ──────────────────────────────────────────────────
let currentPath = savedPath; let currentPath = savedPath;
@@ -658,6 +659,7 @@
{fileImageUrl} {fileImageUrl}
{filePdfData} {filePdfData}
{fileContent} {fileContent}
{overlay}
onSave={async (content) => { onSave={async (content) => {
const terminal = selectedTerminal; const terminal = selectedTerminal;
if (!terminal || !selectedFile) return; if (!terminal || !selectedFile) return;
@@ -17,6 +17,8 @@
export let filePdfData: ArrayBuffer | null = null; export let filePdfData: ArrayBuffer | null = null;
export let fileContent: string | null = null; export let fileContent: string | null = null;
export let overlay = false;
export let onSave: ((content: string) => Promise<void>) | null = null; export let onSave: ((content: string) => Promise<void>) | null = null;
export let editing = false; export let editing = false;
@@ -170,6 +172,9 @@
<PDFViewer bind:this={pdfViewerRef} data={filePdfData} className="w-full h-full" /> <PDFViewer bind:this={pdfViewerRef} data={filePdfData} className="w-full h-full" />
{:else if fileContent !== null} {:else if fileContent !== null}
{#if isHtml && !showRaw} {#if isHtml && !showRaw}
{#if overlay}
<div class="absolute top-0 left-0 right-0 bottom-0 z-10"></div>
{/if}
<iframe <iframe
srcdoc={fileContent} srcdoc={fileContent}
sandbox="allow-scripts allow-downloads{($settings?.iframeSandboxAllowForms ?? false) sandbox="allow-scripts allow-downloads{($settings?.iframeSandboxAllowForms ?? false)