cliclaw 1.0.11 → 1.0.13
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/package.json +1 -1
- package/src/agents/claude.ts +6 -1
- package/src/agents/codex.ts +3 -0
package/package.json
CHANGED
package/src/agents/claude.ts
CHANGED
|
@@ -38,7 +38,12 @@ function spawnClaude(args: string[]): Promise<ClaudeResult> {
|
|
|
38
38
|
return new Promise((resolve, reject) => {
|
|
39
39
|
let stdout = ''
|
|
40
40
|
let stderr = ''
|
|
41
|
-
const
|
|
41
|
+
const isWin = process.platform === 'win32'
|
|
42
|
+
const proc = spawn('claude', args, {
|
|
43
|
+
env: buildEnv(),
|
|
44
|
+
shell: isWin,
|
|
45
|
+
windowsHide: true, // prevent CMD window from flashing on Windows
|
|
46
|
+
})
|
|
42
47
|
proc.stdout.on('data', (d: Buffer) => { stdout += d.toString() })
|
|
43
48
|
proc.stderr.on('data', (d: Buffer) => { stderr += d.toString() })
|
|
44
49
|
proc.on('close', (code) => {
|
package/src/agents/codex.ts
CHANGED
|
@@ -18,9 +18,12 @@ const BASE_ENV = {
|
|
|
18
18
|
function spawnCodex(args: string[]): Promise<{ text: string; threadId: string | null; usage?: TokenUsage }> {
|
|
19
19
|
return new Promise((resolve, reject) => {
|
|
20
20
|
let stdout = ''
|
|
21
|
+
const isWin = process.platform === 'win32'
|
|
21
22
|
const proc = spawn('codex', args, {
|
|
22
23
|
env: { ...process.env, ...BASE_ENV },
|
|
23
24
|
cwd: process.cwd(),
|
|
25
|
+
shell: isWin,
|
|
26
|
+
windowsHide: true, // prevent CMD window from flashing on Windows
|
|
24
27
|
})
|
|
25
28
|
proc.stdout.on('data', (d: Buffer) => { stdout += d.toString() })
|
|
26
29
|
proc.stderr.on('data', (d: Buffer) => {
|