Fix potential issue with last chat turn detection.

This commit is contained in:
Bartosz Taudul
2026-05-21 20:51:58 +02:00
parent 61875e1bd0
commit efc33a09d9

View File

@@ -614,7 +614,8 @@ void TracyLlm::Draw()
{
think = TracyLlmChat::Think::ToolCall;
}
if( !m_chatUi->Turn( role, it, m_chat.end(), think, turnIdx == m_chat.size() - 1 ) )
const auto isLast = it + 1 == m_chat.end();
if( !m_chatUi->Turn( role, it, m_chat.end(), think, isLast ) )
{
if( role == TracyLlmChat::TurnRole::Assistant )
{