feat(core): implement session isolation for agent and claude executions

- Add run_id/session_id based event isolation for concurrent executions
- Enhance process registry with graceful shutdown and fallback kill methods
- Implement session-specific event listeners in React components
- Add proper process cleanup with timeout handling
- Support both isolated and backward-compatible event emissions
- Improve error handling and logging for process management

This change prevents event crosstalk between multiple concurrent agent/claude sessions
running simultaneously, ensuring proper isolation and user experience.
This commit is contained in:
Mufeed VH
2025-06-25 02:14:18 +05:30
parent f73d21e09f
commit 97290e5665
8 changed files with 352 additions and 148 deletions

View File

@@ -1027,9 +1027,10 @@ export const api = {
/**
* Cancels the currently running Claude Code execution
* @param sessionId - Optional session ID to cancel a specific session
*/
async cancelClaudeExecution(): Promise<void> {
return invoke("cancel_claude_execution");
async cancelClaudeExecution(sessionId?: string): Promise<void> {
return invoke("cancel_claude_execution", { sessionId });
},
/**