From cfd3260ea0d4785a3f2f28fbe13cbc5b260456f5 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 12 May 2025 22:38:35 +0200 Subject: [PATCH] Count chat lines. --- profiler/src/profiler/TracyLlm.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index a063839e..19aa8bbb 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -174,7 +174,7 @@ void TracyLlm::Draw() } else { - int id = 0; + int idx = 0; for( auto& line : *m_chat ) { const auto uw = ImGui::CalcTextSize( ICON_FA_USER ).x; @@ -252,7 +252,7 @@ void TracyLlm::Draw() str = str.substr( strip ); auto pos = str.find( "\n" ); ImGui::PushStyleColor( ImGuiCol_Text, ImVec4( 0.5f, 0.5f, 0.3f, 1.f ) ); - ImGui::PushID( id++ ); + ImGui::PushID( idx ); if( ImGui::TreeNode( ICON_FA_LIGHTBULB " Internal thoughts..." ) ) { ImGui::Indent( indent ); @@ -281,6 +281,7 @@ void TracyLlm::Draw() ImGui::TextWrapped( "%s", line["content"].get().c_str() ); } ImGui::PopStyleColor(); + idx++; } if( m_wasUpdated )