fix(qwen): preserve explicit empty agent tool allowlists

This commit is contained in:
haelyra committed 2026-10-10 18:23:42 -04:00
1 parent 38c7d89b3e
commit 5cf5262760
2 files changed
+48 -1

No files matched your search

+3 -1
View File
@@ -113,7 +113,9 @@ function formatToolLine(tools) {
// Comma-separated scalar rather than the JSON flow sequence
// gemini-adapt-agents.js emits: Qwen Code parses both, and the scalar form is
// what its own agent examples use.
return `tools: ${tools.join(', ')}`;
// YAML null can discard an optional allowlist and inherit parent tools.
// Keep an explicitly empty source list as an empty native list.
return tools.length ? `tools: ${tools.join(', ')}` : 'tools: []';
}
function adaptColor(line) {