feat: extend DSML tag prefix to also recognize underscore-connected variants

Support `<dsml_tool_calls>`, `<dsml_invoke>`, `<dsml_parameter>` in
addition to the existing pipe, space, hyphen, and collapsed forms.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
CJACK
2026-05-03 05:39:49 +08:00
parent a7522b4188
commit 545ab0802f

View File

@@ -242,7 +242,7 @@ func consumeToolMarkupNamePrefixOnce(lower, text string, idx int) (int, bool) {
}
if strings.HasPrefix(lower[idx:], "dsml") {
next := idx + len("dsml")
if next < len(text) && text[next] == '-' {
if next < len(text) && (text[next] == '-' || text[next] == '_') {
next++
}
return next, true