indieclaw-agent 1.1.2 → 1.1.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.js +7 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -543,11 +543,15 @@ function handleTerminalStart(ws, { id }) {
|
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
|
|
546
|
-
// Fallback:
|
|
546
|
+
// Fallback: use script(1) to allocate a real PTY
|
|
547
547
|
const { spawn } = require('child_process');
|
|
548
|
-
const
|
|
548
|
+
const scriptArgs = os.platform() === 'darwin'
|
|
549
|
+
? ['-q', '/dev/null', shell]
|
|
550
|
+
: ['-q', '-c', shell, '/dev/null'];
|
|
551
|
+
|
|
552
|
+
const proc = spawn('script', scriptArgs, {
|
|
549
553
|
cwd: os.homedir(),
|
|
550
|
-
env: { ...process.env, TERM: '
|
|
554
|
+
env: { ...process.env, TERM: 'xterm-256color' },
|
|
551
555
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
552
556
|
});
|
|
553
557
|
|