agentgui 1.0.213 → 1.0.214
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/lib/claude-runner.js +11 -2
- package/package.json +1 -1
package/lib/claude-runner.js
CHANGED
|
@@ -208,7 +208,7 @@ class AgentRunner {
|
|
|
208
208
|
} = config;
|
|
209
209
|
|
|
210
210
|
const cmd = this.requiresAdapter && this.adapterCommand ? this.adapterCommand : this.command;
|
|
211
|
-
const baseArgs = this.requiresAdapter && this.adapterCommand ? this.adapterArgs :
|
|
211
|
+
const baseArgs = this.requiresAdapter && this.adapterCommand ? this.adapterArgs : this.buildArgs(prompt, config);
|
|
212
212
|
const args = [...baseArgs];
|
|
213
213
|
|
|
214
214
|
const proc = spawn(cmd, args, { cwd });
|
|
@@ -351,6 +351,15 @@ class AgentRunner {
|
|
|
351
351
|
return;
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
+
if (message.id === promptId && message.error) {
|
|
355
|
+
originalHandler(message);
|
|
356
|
+
completed = true;
|
|
357
|
+
clearTimeout(timeoutHandle);
|
|
358
|
+
proc.kill();
|
|
359
|
+
reject(new Error(message.error.message || 'ACP prompt error'));
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
|
|
354
363
|
originalHandler(message);
|
|
355
364
|
};
|
|
356
365
|
|
|
@@ -726,7 +735,7 @@ registry.register({
|
|
|
726
735
|
protocol: 'acp',
|
|
727
736
|
supportsStdin: false,
|
|
728
737
|
supportedFeatures: ['streaming', 'resume', 'acp-protocol'],
|
|
729
|
-
buildArgs: () => ['acp'],
|
|
738
|
+
buildArgs: () => ['--experimental-acp', '--yolo'],
|
|
730
739
|
protocolHandler: acpProtocolHandler
|
|
731
740
|
});
|
|
732
741
|
|