Skip to content

Commit 22c9384

Browse files
authored
improvement(code): removed dedicated code-optimized virtualized viewer, baked it into the code component (#2234)
* improvement(code): removed dedicated code-optimized virtualized viewer, baked it into the code component * ack PR comments
1 parent 6e02a73 commit 22c9384

File tree

4 files changed

+337
-316
lines changed

4 files changed

+337
-316
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/terminal.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ import {
2121
import { useShallow } from 'zustand/react/shallow'
2222
import {
2323
Button,
24+
Code,
2425
Input,
2526
Popover,
2627
PopoverContent,
2728
PopoverItem,
2829
PopoverScrollArea,
2930
PopoverTrigger,
3031
Tooltip,
31-
VirtualizedCodeViewer,
3232
} from '@/components/emcn'
3333
import { useRegisterGlobalCommands } from '@/app/workspace/[workspaceId]/providers/global-commands-provider'
3434
import { createCommands } from '@/app/workspace/[workspaceId]/utils/commands-utils'
@@ -258,7 +258,7 @@ const OutputCodeContent = React.memo(function OutputCodeContent({
258258
contentRef,
259259
}: OutputCodeContentProps) {
260260
return (
261-
<VirtualizedCodeViewer
261+
<Code.Viewer
262262
code={code}
263263
showGutter
264264
language={language}
@@ -270,6 +270,7 @@ const OutputCodeContent = React.memo(function OutputCodeContent({
270270
currentMatchIndex={currentMatchIndex}
271271
onMatchCountChange={onMatchCountChange}
272272
contentRef={contentRef}
273+
virtualized
273274
/>
274275
)
275276
})
@@ -578,7 +579,7 @@ export function Terminal() {
578579
}, [matchCount])
579580

580581
/**
581-
* Handles match count change from VirtualizedCodeViewer.
582+
* Handles match count change from Code.Viewer.
582583
*/
583584
const handleMatchCountChange = useCallback((count: number) => {
584585
setMatchCount(count)

apps/sim/components/emcn/components/code/code-optimized.tsx

Lines changed: 0 additions & 303 deletions
This file was deleted.

0 commit comments

Comments
 (0)