diff options
author | Grail Finder <wohilas@gmail.com> | 2025-03-10 07:02:12 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2025-03-10 07:02:12 +0300 |
commit | 10f0efbb2a5b8da1371eee8dd74c07d62d92bfb9 (patch) | |
tree | 59ce291b5f9c072243e029cc242cf0d415f06672 | |
parent | b653b52751382aab203a767c52f1b79c93f43c2a (diff) |
Fix: thinking block
-rw-r--r-- | tui.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -116,10 +116,10 @@ func colorText() { text = thinkRE.ReplaceAllStringFunc(text, func(match string) string { // Style the code block and store it styled := fmt.Sprintf("[red::i]%s[-:-:-]", match) - thinkBlocks = append(codeBlocks, styled) + thinkBlocks = append(thinkBlocks, styled) // Generate a unique placeholder (e.g., "__CODE_BLOCK_0__") id := fmt.Sprintf(placeholderThink, counterThink) - counter++ + counterThink++ return id }) // Step 2: Apply other regex styles to the non-code parts @@ -130,6 +130,7 @@ func colorText() { for i, cb := range codeBlocks { text = strings.Replace(text, fmt.Sprintf(placeholder, i), cb, 1) } + logger.Debug("thinking debug", "blocks", thinkBlocks) for i, tb := range thinkBlocks { text = strings.Replace(text, fmt.Sprintf(placeholderThink, i), tb, 1) } |