diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index ed9baa90..f1aec8ce 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -456,10 +456,14 @@ void TracyLlm::Draw() } else if( role == TracyLlmChat::TurnRole::User || role == TracyLlmChat::TurnRole::UserDebug ) { - const auto sz = std::min( InputBufferSize - 1, content.size() ); - memcpy( m_input, content.data(), sz ); - m_input[sz] = 0; - inputChanged = true; + if( line.contains( "content" ) ) + { + auto& content = line["content"].get_ref(); + const auto sz = std::min( InputBufferSize - 1, content.size() ); + memcpy( m_input, content.data(), sz ); + m_input[sz] = 0; + inputChanged = true; + } } auto cit = it;