Skip to content

Commit 52e8fbe

Browse files
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

File tree

Source/Library.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,6 @@ pub mod handlers {
3838
pub mod secrets;
3939

4040
pub mod storage;
41+
42+
pub mod terminal;
4143
}

0 commit comments

Comments
 (0)