From 5778c5ef9f071c2e4612ec180bca4e68281b6ddc Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 5 Jun 2025 02:11:39 +0200 Subject: [PATCH] Fix code block clashes. --- profiler/src/profiler/TracyLlmChat.cpp | 4 ++++ profiler/src/profiler/TracyLlmChat.hpp | 1 + 2 files changed, 5 insertions(+) diff --git a/profiler/src/profiler/TracyLlmChat.cpp b/profiler/src/profiler/TracyLlmChat.cpp index a3a8d7a5..9b8aa24c 100644 --- a/profiler/src/profiler/TracyLlmChat.cpp +++ b/profiler/src/profiler/TracyLlmChat.cpp @@ -317,6 +317,7 @@ void TracyLlmChat::Begin() m_thinkOpen = false; m_thinkIdx = 0; m_subIdx = 0; + m_roleIdx = 0; } void TracyLlmChat::End() @@ -325,6 +326,7 @@ void TracyLlmChat::End() { NormalScope(); ImGui::EndGroup(); + ImGui::PopID(); } } @@ -337,6 +339,7 @@ void TracyLlmChat::Turn( TurnRole role, const std::string& content ) { NormalScope(); ImGui::EndGroup(); + ImGui::PopID(); } m_role = role; m_thinkActive = false; @@ -345,6 +348,7 @@ void TracyLlmChat::Turn( TurnRole role, const std::string& content ) const auto diff = m_maxWidth - m_width[(int)role]; const auto offset = diff / 2; ImGui::Spacing(); + ImGui::PushID( m_roleIdx++ ); ImGui::Dummy( ImVec2( offset, 0 ) ); ImGui::SameLine( 0, 0 ); ImGui::TextColored( roleData.iconColor, "%s", roleData.icon ); diff --git a/profiler/src/profiler/TracyLlmChat.hpp b/profiler/src/profiler/TracyLlmChat.hpp index 82dcd2af..cd1a44e6 100644 --- a/profiler/src/profiler/TracyLlmChat.hpp +++ b/profiler/src/profiler/TracyLlmChat.hpp @@ -47,6 +47,7 @@ private: bool m_thinkOpen; int m_thinkIdx; int m_subIdx; + int m_roleIdx; MD_PARSER* m_parser; };