Align tool-call parsing across Go/JS and pass quality gates

This commit is contained in:
CJACK.
2026-04-01 01:24:55 +08:00
parent 1cdfa9c05d
commit bfca84c2c7
15 changed files with 423 additions and 174 deletions

View File

@@ -237,7 +237,10 @@ function isLikelyJSONToolPayloadCandidate(text) {
return false;
}
const lower = trimmed.toLowerCase();
return lower.includes('tool_calls') || lower.includes('"function"');
return lower.includes('tool_calls')
|| lower.includes('"function"')
|| lower.includes('functioncall')
|| lower.includes('"tool_use"');
}
module.exports = {