diff --git a/apps/remixdesktop/package.json b/apps/remixdesktop/package.json index deca2d378e..28d449e238 100644 --- a/apps/remixdesktop/package.json +++ b/apps/remixdesktop/package.json @@ -26,8 +26,7 @@ "start:production": "tsc && cross-env NODE_ENV=production electron .", "pack": "tsc && electron-builder", "dist": "tsc && electron-builder", - "postinstall": "electron-builder install-app-deps", - "rebuild-node-pty": "electron-rebuild -f -o node-pty" + "postinstall": "electron-builder install-app-deps" }, "devDependencies": { "@electron/rebuild": "^3.2.13", diff --git a/apps/remixdesktop/src/plugins/xtermPlugin.ts b/apps/remixdesktop/src/plugins/xtermPlugin.ts index 510395862f..a138451148 100644 --- a/apps/remixdesktop/src/plugins/xtermPlugin.ts +++ b/apps/remixdesktop/src/plugins/xtermPlugin.ts @@ -12,7 +12,7 @@ export const detectDefaultShell = () => { const {env} = process; if (process.platform === 'win32') { - return env.COMSPEC || 'cmd.exe'; + return env.SHELL || 'powershell.exe'; } try { @@ -32,6 +32,8 @@ export const detectDefaultShell = () => { // Stores default shell when imported. const defaultShell = detectDefaultShell(); +console.log('defaultShell', defaultShell) + export default defaultShell; @@ -73,6 +75,8 @@ class XtermPluginClient extends ElectronBasePluginClient { async createTerminal(path?: string): Promise { const shell = defaultShell; + console.log('defaultShell', defaultShell) + const ptyProcess = pty.spawn(shell, [], { name: 'xterm-color', cols: 80, diff --git a/apps/remixdesktop/yarn.lock b/apps/remixdesktop/yarn.lock index 45b84fc9f1..155261924c 100644 --- a/apps/remixdesktop/yarn.lock +++ b/apps/remixdesktop/yarn.lock @@ -634,9 +634,9 @@ integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== "@types/node@*": - version "20.3.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.1.tgz#e8a83f1aa8b649377bb1fb5d7bac5cb90e784dfe" - integrity sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg== + version "20.3.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.2.tgz#fa6a90f2600e052a03c18b8cb3fd83dd4e599898" + integrity sha512-vOBLVQeCQfIcF/2Y7eKFTqrMnizK5lRNQ7ykML/5RuwVXVWxYkgwS7xbt4B6fKCUPgbSL5FSsjHQpaGQP/dQmw== "@types/node@^12.12.6": version "12.20.55" @@ -702,9 +702,9 @@ "@types/node" "*" "@vscode/ripgrep@^1.15.4": - version "1.15.4" - resolved "https://registry.yarnpkg.com/@vscode/ripgrep/-/ripgrep-1.15.4.tgz#ca8946b5580bbea1e706ed8d3b1eed5f0d551ab6" - integrity sha512-+EPIS2aoD95MFLrgGHd/D2fck42aMRV2cBrT7BiNvKBeSyCTybSaTJ+PGQf6zV/95AhaXHHYqYPVRk3DZoGU9w== + version "1.15.5" + resolved "https://registry.yarnpkg.com/@vscode/ripgrep/-/ripgrep-1.15.5.tgz#26025884bbc3a8b40dfc29f5bda4b87b47bd7356" + integrity sha512-PVvKNEmtnlek3i4MJMaB910dz46CKQqcIY2gKR3PSlfz/ZPlSYuSuyQMS7iK20KL4hGUdSbWt964B5S5EIojqw== dependencies: https-proxy-agent "^5.0.0" proxy-from-env "^1.1.0" @@ -3271,9 +3271,9 @@ minimatch@^8.0.2: brace-expansion "^2.0.1" minimatch@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.1.tgz#8a555f541cf976c622daf078bb28f29fb927c253" - integrity sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w== + version "9.0.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.2.tgz#397e387fff22f6795844d00badc903a3d5de7057" + integrity sha512-PZOT9g5v2ojiTL7r1xF6plNHLtOeTpSlDI007As2NlA2aYBMfVom17yqa6QzhmDP8QOhn7LjHTg7DFCVSSa6yg== dependencies: brace-expansion "^2.0.1" diff --git a/libs/remix-ui/xterm/src/index.ts b/libs/remix-ui/xterm/src/index.ts index 47bf2ee555..d0850bef79 100644 --- a/libs/remix-ui/xterm/src/index.ts +++ b/libs/remix-ui/xterm/src/index.ts @@ -1,3 +1,2 @@ export * from './lib/components/remix-ui-xterm' -export * from './lib/components/remix-ui-filedialog' export * from './lib/components/remix-ui-xterminals' \ No newline at end of file diff --git a/libs/remix-ui/xterm/src/lib/components/remix-ui-filedialog.tsx b/libs/remix-ui/xterm/src/lib/components/remix-ui-filedialog.tsx deleted file mode 100644 index ac3ea189a1..0000000000 --- a/libs/remix-ui/xterm/src/lib/components/remix-ui-filedialog.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { Plugin } from "@remixproject/engine" -import React, { useEffect, useState } from "react" - -interface RemixUIFileDialogInterface { - plugin: Plugin -} - -export const RemixUIFileDialog = (props: RemixUIFileDialogInterface) => { - const { plugin } = props - const [files, setFiles] = useState([]) - const [workingDir, setWorkingDir] = useState('') - - useEffect(() => { - plugin.on('fs', 'workingDirChanged', async (path: string) => { - console.log('workingDirChanged') - setWorkingDir(path) - await readdir() - }) - }, []) - - const readdir = async () => { - const files = await plugin.call('fs', 'readdir', '/') - console.log('files', files) - setFiles(files) - } - - return ( - <> -

RemixUIFileDialog

- - -
- {workingDir} -
- - {files.map(file =>
{file}
)} - - ) -} \ No newline at end of file diff --git a/libs/remix-ui/xterm/src/lib/components/remix-ui-xterminals.tsx b/libs/remix-ui/xterm/src/lib/components/remix-ui-xterminals.tsx index 735d478496..176fbee2eb 100644 --- a/libs/remix-ui/xterm/src/lib/components/remix-ui-xterminals.tsx +++ b/libs/remix-ui/xterm/src/lib/components/remix-ui-xterminals.tsx @@ -2,6 +2,13 @@ import React, { useState, useEffect } from 'react' // eslint-disable-line import { ElectronPlugin } from '@remixproject/engine-electron' import RemixUiXterm from './remix-ui-xterm' +import { + ImperativePanelGroupHandle, + Panel, + PanelGroup, + PanelResizeHandle, + } from "react-resizable-panels"; + export interface RemixUiXterminalsProps { plugin: ElectronPlugin } @@ -91,9 +98,10 @@ export const RemixUiXterminals = (props: RemixUiXterminalsProps) => { createTerminal() }}>create terminal + {terminals.map((xtermState) => { return ( -
{xtermState.pid} +
) diff --git a/package.json b/package.json index c0df3cbe74..dedbfd1133 100644 --- a/package.json +++ b/package.json @@ -201,6 +201,7 @@ "react-json-view": "^1.21.3", "react-markdown": "^8.0.5", "react-multi-carousel": "^2.8.2", + "react-resizable-panels": "^0.0.53", "react-router-dom": "^6.3.0", "react-tabs": "^3.2.2", "react-zoom-pan-pinch": "^3.0.2", diff --git a/yarn.lock b/yarn.lock index 65ade41641..2835353df5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24017,6 +24017,11 @@ react-refresh@^0.14.0: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e" integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ== +react-resizable-panels@^0.0.53: + version "0.0.53" + resolved "https://registry.yarnpkg.com/react-resizable-panels/-/react-resizable-panels-0.0.53.tgz#d169e45f33ccb38cdc077e0f99049385e89883ca" + integrity sha512-lGOJF0Hh5+Y+Usi7x8btmBTi+6CQV1/RKxnj6jVrzvJ9vLbftbSoJPzymOuX8ZCFimlEwP2AKsGtQVKG/KieHA== + react-router-dom@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.3.0.tgz#a0216da813454e521905b5fa55e0e5176123f43d"