diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index 0a12dc68..7601c11d 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -527,7 +527,7 @@ void TracyLlm::Draw() { think = TracyLlmChat::Think::ToolCall; } - if( !m_chatUi->Turn( role, line, think, turnIdx == m_chat.size() - 1 ) ) + if( !m_chatUi->Turn( role, it, m_chat.end(), think, turnIdx == m_chat.size() - 1 ) ) { if( role == TracyLlmChat::TurnRole::Assistant ) { diff --git a/profiler/src/profiler/TracyLlmChat.cpp b/profiler/src/profiler/TracyLlmChat.cpp index 9c09de29..2ee7f313 100644 --- a/profiler/src/profiler/TracyLlmChat.cpp +++ b/profiler/src/profiler/TracyLlmChat.cpp @@ -105,8 +105,10 @@ void TracyLlmChat::End() } } -bool TracyLlmChat::Turn( TurnRole role, const nlohmann::json& json, Think think, bool last ) +bool TracyLlmChat::Turn( TurnRole role, std::vector::iterator it, const std::vector::iterator& end, Think think, bool last ) { + auto& json = *it; + bool keep = true; const auto& roleData = roles[(int)role]; const bool roleChange = role != m_role; diff --git a/profiler/src/profiler/TracyLlmChat.hpp b/profiler/src/profiler/TracyLlmChat.hpp index e95defca..983cd84c 100644 --- a/profiler/src/profiler/TracyLlmChat.hpp +++ b/profiler/src/profiler/TracyLlmChat.hpp @@ -41,7 +41,7 @@ public: void Begin(); void End(); - bool Turn( TurnRole role, const nlohmann::json& json, Think think, bool last ); + bool Turn( TurnRole role, std::vector::iterator it, const std::vector::iterator& end, Think think, bool last ); private: void NormalScope();