Commit 9c53404
Replace exec terminal with a real PTY (node-pty + xterm.js over WebSocket)
The old terminal spawned a fresh `bash -lc` per command, which re-sourced the
login shell every time and felt slow and "custom". Now the daemon spawns a
genuine persistent PTY (node-pty) and relays it over a `/api/pty` WebSocket,
rendered with xterm.js — a real, responsive shell window with full line
editing, colors, and interactive programs.
- daemon: lazy-loaded node-pty + ws PTY relay (self-heals spawn-helper perms),
marked external in tsup so the native addon resolves at runtime
- app: xterm.js terminal themed from the app's CSS variables, with the
Codex-style tab bar "+" menu (New terminal / Clear)
- electron: spawn the daemon under standalone Node (not Electron's Node) so
the node-pty prebuilt binary loads
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent d3ed57c commit 9c53404
9 files changed
Lines changed: 468 additions & 145 deletions
File tree
- packages
- app
- electron
- src
- components
- lib
- cli
- src/daemon
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
54 | 82 | | |
55 | 83 | | |
56 | 84 | | |
| |||
67 | 95 | | |
68 | 96 | | |
69 | 97 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
74 | 101 | | |
75 | 102 | | |
76 | 103 | | |
77 | | - | |
| 104 | + | |
78 | 105 | | |
79 | 106 | | |
80 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
0 commit comments