Skip to content

Commit 384510d

Browse files
committed
feat: terminal integration first draft
1 parent a7320bd commit 384510d

18 files changed

Lines changed: 1804 additions & 11 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ test/thirdparty/jasmine-reporters
6868
/src/thirdparty/bugsnag-performance.min.js
6969
/src/thirdparty/bugsnag-performance.min.js.map
7070
/src/thirdparty/no-minify/
71+
/src/thirdparty/xterm
7172

7273
# ignore files copied from node_modules to src/thirdparty
7374
# https://github.com/phcode-dev/phoenix/issues/10

docs/API-Reference/project/ProjectManager.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,12 @@ If the provided path is to an old welcome project, returns the current one inste
206206
Initial project path is stored in prefs, which defaults to the welcome project on
207207
first launch.
208208

209+
**Kind**: global function
210+
<a name="_continueLoadProject"></a>
211+
212+
## \_continueLoadProject()
213+
Internal: continue loading a project after beforeProjectClose handlers have resolved.
214+
209215
**Kind**: global function
210216
<a name="refreshFileTree"></a>
211217

gulpfile.js/thirdparty-lib-copy.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,32 @@ let copyThirdPartyLibs = series(
244244
'test/thirdparty/jasmine-reporters/'),
245245
copyLicence.bind(copyLicence, 'node_modules/jasmine-reporters/LICENSE', 'jasmine-reporters'),
246246
// lmdb
247-
copyLicence.bind(copyLicence, 'node_modules/lmdb/LICENSE', 'lmdb')
247+
copyLicence.bind(copyLicence, 'node_modules/lmdb/LICENSE', 'lmdb'),
248+
// xterm.js terminal emulator
249+
copyFiles.bind(copyFiles, ['node_modules/xterm/lib/xterm.js',
250+
'node_modules/xterm/lib/xterm.js.map'], 'src/thirdparty/xterm'),
251+
copyFiles.bind(copyFiles, ['node_modules/xterm/css/xterm.css'], 'src/thirdparty/xterm'),
252+
renameFile.bind(renameFile, 'node_modules/xterm-addon-fit/lib/xterm-addon-fit.js',
253+
'addon-fit.js', 'src/thirdparty/xterm'),
254+
renameFile.bind(renameFile, 'node_modules/xterm-addon-fit/lib/xterm-addon-fit.js.map',
255+
'addon-fit.js.map', 'src/thirdparty/xterm'),
256+
renameFile.bind(renameFile, 'node_modules/xterm-addon-canvas/lib/xterm-addon-canvas.js',
257+
'addon-canvas.js', 'src/thirdparty/xterm'),
258+
renameFile.bind(renameFile, 'node_modules/xterm-addon-canvas/lib/xterm-addon-canvas.js.map',
259+
'addon-canvas.js.map', 'src/thirdparty/xterm'),
260+
renameFile.bind(renameFile, 'node_modules/xterm-addon-search/lib/xterm-addon-search.js',
261+
'addon-search.js', 'src/thirdparty/xterm'),
262+
renameFile.bind(renameFile, 'node_modules/xterm-addon-search/lib/xterm-addon-search.js.map',
263+
'addon-search.js.map', 'src/thirdparty/xterm'),
264+
renameFile.bind(renameFile, 'node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js',
265+
'addon-web-links.js', 'src/thirdparty/xterm'),
266+
renameFile.bind(renameFile, 'node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js.map',
267+
'addon-web-links.js.map', 'src/thirdparty/xterm'),
268+
renameFile.bind(renameFile, 'node_modules/xterm-addon-webgl/lib/xterm-addon-webgl.js',
269+
'addon-webgl.js', 'src/thirdparty/xterm'),
270+
renameFile.bind(renameFile, 'node_modules/xterm-addon-webgl/lib/xterm-addon-webgl.js.map',
271+
'addon-webgl.js.map', 'src/thirdparty/xterm'),
272+
copyLicence.bind(copyLicence, 'node_modules/xterm/LICENSE', 'xterm')
248273

249274
);
250275

package-lock.json

Lines changed: 103 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
"jasmine-core": "^4.2.0",
3838
"jasmine-reporters": "^2.5.0",
3939
"jsdoc-to-markdown": "^9.1.1",
40+
"lmdb": "^3.5.1",
4041
"readable-stream": "^3.6.0",
41-
"through2": "^4.0.2",
42-
"lmdb": "^3.5.1"
42+
"through2": "^4.0.2"
4343
},
4444
"scripts": {
4545
"postinstall": "npm install --prefix phoenix-builder-mcp",
@@ -121,6 +121,12 @@
121121
"requirejs": "^2.3.7",
122122
"tern": "^0.24.3",
123123
"tinycolor2": "^1.4.2",
124-
"underscore": "^1.13.4"
124+
"underscore": "^1.13.4",
125+
"xterm": "^5.3.0",
126+
"xterm-addon-canvas": "^0.5.0",
127+
"xterm-addon-fit": "^0.8.0",
128+
"xterm-addon-search": "^0.13.0",
129+
"xterm-addon-web-links": "^0.9.0",
130+
"xterm-addon-webgl": "^0.16.0"
125131
}
126-
}
132+
}

src-node/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ const NodeConnector = require("./node-connector");
6868
const LivePreview = require("./live-preview");
6969
require("./test-connection");
7070
require("./utils");
71+
require("./terminal");
7172
require("./git/cli");
7273
require("./claude-code-agent");
7374
function randomNonce(byteLength) {

src-node/package-lock.json

Lines changed: 19 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-node/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@
2525
"cross-spawn": "^7.0.6",
2626
"lmdb": "^3.5.1",
2727
"mime-types": "^2.1.35",
28+
"node-pty": "^1.1.0",
2829
"npm": "11.8.0",
2930
"open": "^10.1.0",
3031
"which": "^2.0.1",
3132
"ws": "^8.17.1",
3233
"zod": "^3.25.76"
3334
}
34-
}
35+
}

0 commit comments

Comments
 (0)