@volter/supercode-terminal 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +7 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -723,8 +723,14 @@ export class PtyTerminalHost {
|
|
|
723
723
|
this.#startWatchdog();
|
|
724
724
|
let child;
|
|
725
725
|
const spawnedAt = Date.now();
|
|
726
|
+
const options = { cols: PTY_DEFAULT_SIZE.cols, rows: PTY_DEFAULT_SIZE.rows, cwd: input.cwd ?? process.cwd(), env, name: 'xterm-256color' };
|
|
726
727
|
try {
|
|
727
|
-
|
|
728
|
+
// On Windows the pane's console is node-pty's bundled ConPTY (OpenConsole), not the system's conhost: on Windows
|
|
729
|
+
// 11 (build 26200) the system's conhost.exe outlives every pane, ended or closed, released or not, so a pane
|
|
730
|
+
// server held 381 of them for 10 live panes after 13 hours (volter-desktop, 2026-10-10); the bundled one ends with
|
|
731
|
+
// its pane. A node-pty without it is asked again for the system's.
|
|
732
|
+
try { child = pty.spawn(file, args, process.platform === 'win32' ? { ...options, useConptyDll: true } : options); }
|
|
733
|
+
catch (error) { if (process.platform !== 'win32') throw error; child = pty.spawn(file, args, options); }
|
|
728
734
|
} catch (error) {
|
|
729
735
|
throw new TerminalHostError('session_not_found', `The pane could not start ${input.command.program}: ${errorMessage(error)}`);
|
|
730
736
|
}
|