diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index 2a385f70..f40df0ac 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -764,14 +764,10 @@ void TracyLlm::ManageContext( std::unique_lock& lock ) std::vector> toolOutputs; for( auto& msg : m_chat ) { - if( msg["role"].get_ref() == "user" ) + if( msg["role"].get_ref() == "tool" ) { - auto& content = msg["content"]; - const auto& str = content.get_ref(); - if( str.starts_with( "\n" ) ) - { - toolOutputs.emplace_back( str.size(), idx ); - } + auto& str = msg["content"].get_ref(); + toolOutputs.emplace_back( str.size(), idx ); } idx++; } diff --git a/profiler/src/profiler/TracyLlmChat.hpp b/profiler/src/profiler/TracyLlmChat.hpp index 8d91e717..dbc7a29c 100644 --- a/profiler/src/profiler/TracyLlmChat.hpp +++ b/profiler/src/profiler/TracyLlmChat.hpp @@ -11,7 +11,7 @@ namespace tracy class TracyLlmChat { public: - static constexpr const char* ForgetMsg = "\n..."; + static constexpr const char* ForgetMsg = "..."; enum class TurnRole {