This commit is contained in:
Timothy Jaeryang Baek
2026-08-30 23:56:01 -04:00
parent 97c5f52bbc
commit 64e6c9f010
4 changed files with 6 additions and 9 deletions
+1
View File
@@ -1144,6 +1144,7 @@
const terminalEventHandler = (type: string, data: any) => {
if (type === 'terminal:display_file') {
if (!data?.path) return;
if ($settings?.terminalFileDisplay === 'inline') return;
displayFileHandler(data.path, { showControls, showFileNavPath }, { page: data?.page });
} else if (type === 'terminal:write_file' || type === 'terminal:replace_file_content') {
if (!data?.path) return;
@@ -163,7 +163,9 @@
</div>
</ConsecutiveDetailsGroup>
{:else if displayItem.type === 'file'}
<TerminalOutputFile item={displayItem.item} {chatId} />
{#if displayItem.item?.displayed || $settings?.terminalFileDisplay === 'inline'}
<TerminalOutputFile item={displayItem.item} {chatId} />
{/if}
{:else}
{@const detailToken = displayItem.token}
{#if detailToken.attributes?.type === 'tool_calls'}
@@ -179,7 +179,6 @@ function getInlineFileFromToolOutput(callItem?: OutputItem, resultItem?: OutputI
typeof result !== 'object' ||
result.type !== 'file' ||
result.source !== 'open_terminal' ||
result.displayed !== true ||
result.exists === false ||
!result.path ||
!result.terminal_selector