Skip to content

Commit c673be7

Browse files
committed
🤖 fix: remove error when opening terminal in server mode
Changed TERMINAL_WINDOW_OPEN handler to silently return when terminalWindowManager is not available (server mode) instead of throwing an error. In server mode, window.open() handles opening the terminal. Generated with `mux`
1 parent 5897608 commit c673be7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/services/ipcMain.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,11 +1559,12 @@ export class IpcMain {
15591559
});
15601560

15611561
ipcMain.handle(IPC_CHANNELS.TERMINAL_WINDOW_OPEN, async (_event, workspaceId: string) => {
1562-
console.log(`[BACKEND] TERMINAL_WINDOW_OPEN handler called with: ${workspaceId}`);
1562+
// In server mode, terminalWindowManager is not available (window opening is handled by browser)
1563+
if (!this.terminalWindowManager) {
1564+
return; // No-op in server mode
1565+
}
1566+
15631567
try {
1564-
if (!this.terminalWindowManager) {
1565-
throw new Error("Terminal window manager not available (desktop mode only)");
1566-
}
15671568
log.info(`Opening terminal window for workspace: ${workspaceId}`);
15681569
await this.terminalWindowManager.openTerminalWindow(workspaceId);
15691570
log.info(`Terminal window opened successfully for workspace: ${workspaceId}`);

0 commit comments

Comments
 (0)