diff options
Diffstat (limited to 'helpfuncs.go')
| -rw-r--r-- | helpfuncs.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/helpfuncs.go b/helpfuncs.go index 810b577..9cfb662 100644 --- a/helpfuncs.go +++ b/helpfuncs.go @@ -25,13 +25,13 @@ func isASCII(s string) bool { // stripThinkingFromMsg removes thinking blocks from assistant messages. // Skips user, tool, and system messages as they may contain thinking examples. -func stripThinkingFromMsg(msg models.RoleMsg) *models.RoleMsg { +func stripThinkingFromMsg(msg *models.RoleMsg) *models.RoleMsg { if !cfg.StripThinkingFromAPI { - return &msg + return msg } // Skip user, tool, and system messages - they might contain thinking examples if msg.Role == cfg.UserRole || msg.Role == cfg.ToolRole || msg.Role == "system" { - return &msg + return msg } // Strip thinking from assistant messages if thinkRE.MatchString(msg.Content) { @@ -39,7 +39,7 @@ func stripThinkingFromMsg(msg models.RoleMsg) *models.RoleMsg { // Clean up any double newlines that might result msg.Content = strings.TrimSpace(msg.Content) } - return &msg + return msg } // refreshChatDisplay updates the chat display based on current character view |
