Update qwen-delegate.ts

This commit is contained in:
2026-09-06 19:56:36 +02:00
parent 5cd0453162
commit 80807df095
+3 -1
View File
@@ -38,7 +38,9 @@ export function delegateToQwen(
// parser ("Cannot use both a positional prompt and the --prompt (-p) flag together").
// Build the command as a single, explicitly-quoted string instead.
const quoteArg = (s: string) => `"${s.replace(/"/g, '\\"')}"`;
const command = ["qwen", "-p", quoteArg(prompt)].join(" ");
// Non-interactive mode has no TTY to approve tool calls, so web_fetch would otherwise
// be denied outright; allow just that tool rather than going full --yolo.
const command = ["qwen", "-p", quoteArg(prompt), "--allowed-tools", "web_fetch"].join(" ");
const child: ChildProcess = spawnFn(command, {
shell: true,
stdio: ["ignore", "pipe", "pipe"],