File tree Expand file tree Collapse file tree
app/workspace/[workspaceId]
files/components/file-viewer
w/components/preview/components/preview-editor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -589,6 +589,7 @@ export const TextEditor = memo(function TextEditor({
589589 )
590590
591591 const isStreaming = isStreamInteractionLocked
592+ const isPreviewFollowingStream = isStreaming && ! disableStreamingAutoScroll
592593 const isEditorReadOnly = isStreamInteractionLocked || ! canEdit
593594
594595 const previewType = resolvePreviewType ( file . type , file . name )
@@ -677,7 +678,7 @@ export const TextEditor = memo(function TextEditor({
677678 content = { content }
678679 mimeType = { file . type }
679680 filename = { file . name }
680- isStreaming = { isStreaming }
681+ isStreaming = { isPreviewFollowingStream }
681682 onCheckboxToggle = { canEdit && ! isStreaming ? handleCheckboxToggle : undefined }
682683 />
683684 </ div >
Original file line number Diff line number Diff line change @@ -1250,7 +1250,7 @@ function PreviewEditorContent({
12501250 < Code . Viewer
12511251 code = { formatValueAsJson ( executionData . input ) }
12521252 language = 'json'
1253- className = '!bg-[var(--surface-3)] max-h-[300px] min-h-0 max-w-full rounded-md border-0 [word-break:break-all]'
1253+ className = '!bg-[var(--surface-4)] dark:!bg-[var(--surface- 3)] max-h-[300px] min-h-0 max-w-full rounded-md border-0 [word-break:break-all]'
12541254 wrapText = { wrapText }
12551255 searchQuery = { isSearchActive ? searchQuery : undefined }
12561256 currentMatchIndex = { currentMatchIndex }
@@ -1320,7 +1320,7 @@ function PreviewEditorContent({
13201320 code = { formatValueAsJson ( executionData . output ) }
13211321 language = 'json'
13221322 className = { cn (
1323- '!bg-[var(--surface-3)] max-h-[300px] min-h-0 max-w-full rounded-md border-0 [word-break:break-all]' ,
1323+ '!bg-[var(--surface-4)] dark:!bg-[var(--surface- 3)] max-h-[300px] min-h-0 max-w-full rounded-md border-0 [word-break:break-all]' ,
13241324 executionData . status === 'error' && 'text-[var(--text-error)]'
13251325 ) }
13261326 wrapText = { wrapText }
You can’t perform that action at this time.
0 commit comments