fix: Prevent double input processing in server sessions

The issue was that sendInput() was processing input twice:
1. Writing directly to PTY + asciinema for in-memory sessions
2. Then continuing to socket path which would write again

Added early return after in-memory session processing to avoid
the socket path when we already have a direct PTY reference.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Mario Zechner 2025-06-22 20:29:49 +02:00
parent 8a3807d4ce
commit 76512c19c4

View file

@ -515,6 +515,7 @@ export class PtyManager {
if (memorySession?.ptyProcess) {
memorySession.ptyProcess.write(dataToSend);
memorySession.asciinemaWriter?.writeInput(dataToSend);
return; // Important: return here to avoid socket path
} else {
const sessionPaths = this.sessionManager.getSessionPaths(sessionId);
if (!sessionPaths) {