picocode-core 0.9.212 → 0.9.213
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
CHANGED
|
@@ -64,7 +64,9 @@ export function createClaudeCodeEngine({ command = claudeCommand(), idleMs = IDL
|
|
|
64
64
|
entry.bridge = await bridge()
|
|
65
65
|
entry.model = model
|
|
66
66
|
entry.effort = effort
|
|
67
|
-
|
|
67
|
+
// a process that was replaced still exits, and may still speak, after
|
|
68
|
+
// the next one starts; only the current process reaches the turn
|
|
69
|
+
const proc = spawn({
|
|
68
70
|
command,
|
|
69
71
|
cwd,
|
|
70
72
|
env,
|
|
@@ -74,13 +76,15 @@ export function createClaudeCodeEngine({ command = claudeCommand(), idleMs = IDL
|
|
|
74
76
|
fork,
|
|
75
77
|
mcpConfig: entry.bridge.mcpConfig(),
|
|
76
78
|
appendSystemPrompt: systemPrompt(contextFiles),
|
|
77
|
-
onMessage: (message) => entry.onMessage?.(message),
|
|
79
|
+
onMessage: (message) => { if (entry.proc === proc) entry.onMessage?.(message) },
|
|
78
80
|
onExit: (exit) => {
|
|
81
|
+
if (entry.proc !== proc) return
|
|
79
82
|
entry.proc = null
|
|
80
83
|
entry.lastExit = exit
|
|
81
84
|
entry.onExit?.(exit)
|
|
82
85
|
},
|
|
83
86
|
})
|
|
87
|
+
entry.proc = proc
|
|
84
88
|
}
|
|
85
89
|
|
|
86
90
|
async function run({ history, tools, recorder, modelName, effort, signal, onStream = () => {}, beforeRequest, host = {} }) {
|