Commit 52e8fbe
committed
feat(handlers/terminal): Implement terminal process management with PTY support
- Added comprehensive terminal handler module implementing RPC methods ($createTerminal, $show, $sendText, $dispose)
- Integrated with portable-pty crate to spawn and manage PTY processes on Mountain backend
- Implemented async tasks for PTY I/O handling:
- Writer task for processing input via MPSC channel
- Reader task for forwarding output to Cocoon via Vine IPC
- Process monitoring task for exit notifications
- Added TerminalState management in AppState with process metadata and task handles
- Implemented environment variable collection stubs for extension compatibility
- Integrated with Vine IPC to send terminal lifecycle notifications ($acceptTerminalOpened, $acceptTerminalProcessData)
- Added Tauri event emission for UI coordination (terminal/reveal)
- Implemented proper error handling and cleanup during terminal disposal
Enables basic terminal emulation required for VS Code extension compatibility through Cocoon shim layer. Provides foundation for advanced terminal features while maintaining process isolation between Mountain and Cocoon components.1 parent a6f2c37 commit 52e8fbe
2 files changed
Lines changed: 607 additions & 212 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
0 commit comments