Pass current and end chat iterators to TracyLlmChat::Turn().

This commit is contained in:
Bartosz Taudul
2026-02-06 17:33:59 +01:00
parent 9d78cca5ff
commit 0b02b097a9
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -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 )
{
+3 -1
View File
@@ -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<nlohmann::json>::iterator it, const std::vector<nlohmann::json>::iterator& end, Think think, bool last )
{
auto& json = *it;
bool keep = true;
const auto& roleData = roles[(int)role];
const bool roleChange = role != m_role;
+1 -1
View File
@@ -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<nlohmann::json>::iterator it, const std::vector<nlohmann::json>::iterator& end, Think think, bool last );
private:
void NormalScope();