feat: add Python support with Pyodide integration

GitOrigin-RevId: 382ce102c43050aace691dd89d825a94abf347a8
This commit is contained in:
Domagoj Kriskovic
2026-03-09 09:05:34 +00:00
committed by Copybot
parent bb5d90a332
commit 138f7f8023
12 changed files with 920 additions and 1 deletions
@@ -9,12 +9,16 @@ import { Suspense } from 'react'
import { FullSizeLoadingSpinner } from '@/shared/components/loading-spinner'
import SymbolPalettePane from '@/features/ide-react/components/editor/symbol-palette-pane'
import { useEditorPropertiesContext } from '@/features/ide-react/context/editor-properties-context'
import { PythonEditorSplit } from '@/features/ide-react/components/layout/python-editor-split'
export const Editor = () => {
const { opening, errorState, showSymbolPalette } =
useEditorPropertiesContext()
const { selectedEntityCount, openEntity } = useFileTreeOpenContext()
const { currentDocumentId, currentDocument } = useEditorOpenDocContext()
const isPythonDocument =
openEntity?.type === 'doc' &&
openEntity.entity.name.toLowerCase().endsWith('.py')
if (!currentDocumentId) {
return null
@@ -39,7 +43,7 @@ export const Editor = () => {
order={1}
className="ide-redesign-editor-panel"
>
<SourceEditor />
{isPythonDocument ? <PythonEditorSplit /> : <SourceEditor />}
{isLoading && <EditorLoadingPane />}
</Panel>
{showSymbolPalette && (
@@ -0,0 +1,27 @@
import { Panel, PanelGroup } from 'react-resizable-panels'
import { VerticalResizeHandle } from '@/features/ide-react/components/resize/vertical-resize-handle'
import PythonOutputPane from '@/features/ide-react/components/editor/python/python-output-pane'
import SourceEditor from '@/features/source-editor/components/source-editor'
export const PythonEditorSplit = () => {
return (
<PanelGroup
autoSaveId="ide-redesign-editor-python-output"
direction="vertical"
className="ide-redesign-python-editor-split"
>
<Panel id="ide-redesign-panel-source-editor-content" order={1}>
<SourceEditor />
</Panel>
<VerticalResizeHandle id="ide-redesign-editor-python-output" />
<Panel
id="ide-redesign-panel-python-output"
order={2}
defaultSize={35}
minSize={10}
>
<PythonOutputPane />
</Panel>
</PanelGroup>
)
}