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++;
}
}
}