From 545ab0802f01d5985a7f8fec54b553e184f9a513 Mon Sep 17 00:00:00 2001 From: CJACK Date: Sun, 3 May 2026 05:39:49 +0800 Subject: [PATCH] feat: extend DSML tag prefix to also recognize underscore-connected variants Support ``, ``, `` in addition to the existing pipe, space, hyphen, and collapsed forms. Co-Authored-By: Claude Opus 4.7 --- internal/toolcall/toolcalls_scan.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/toolcall/toolcalls_scan.go b/internal/toolcall/toolcalls_scan.go index 3b8ce88..d41006c 100644 --- a/internal/toolcall/toolcalls_scan.go +++ b/internal/toolcall/toolcalls_scan.go @@ -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