From ca02df8ad58c2a065deea98273df44c5b1960471 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 19 Jun 2025 13:35:05 +0200 Subject: [PATCH] Ignore spaces after and tags. --- profiler/src/profiler/TracyLlmChat.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/profiler/src/profiler/TracyLlmChat.cpp b/profiler/src/profiler/TracyLlmChat.cpp index 0085277e..11323958 100644 --- a/profiler/src/profiler/TracyLlmChat.cpp +++ b/profiler/src/profiler/TracyLlmChat.cpp @@ -215,25 +215,25 @@ bool TracyLlmChat::Turn( TurnRole role, const std::string& content ) if( minPos == posThink ) { pos += sizeof( "" ) - 1; - while( content[pos] == '\n' ) pos++; + while( content[pos] == '\n' || content[pos] == ' ' ) pos++; auto endThink = content.find( "", pos ); ThinkScope(); if( m_thinkOpen ) PrintThink( content.c_str() + pos, std::min( end, endThink ) - pos ); if( endThink == std::string::npos ) break; pos = endThink + sizeof( "" ) - 1; - while( content[pos] == '\n' ) pos++; + while( content[pos] == '\n' || content[pos] == ' ' ) pos++; } else { assert( minPos == posTool ); pos += sizeof( "" ) - 1; - while( content[pos] == '\n' ) pos++; + while( content[pos] == '\n' || content[pos] == ' ' ) pos++; auto endTool = content.find( "", pos ); ThinkScope(); if( m_thinkOpen ) PrintToolCall( content.c_str() + pos, std::min( end, endTool ) - pos ); if( endTool == std::string::npos ) break; pos = endTool + sizeof( "" ) - 1; - while( content[pos] == '\n' ) pos++; + while( content[pos] == '\n' || content[pos] == ' ' ) pos++; } } }