Get role string only once.

This commit is contained in:
Bartosz Taudul
2025-05-12 22:36:10 +02:00
parent 1ebe85d24f
commit 2ad2fa0b4a

View File

@@ -183,8 +183,9 @@ void TracyLlm::Draw()
const auto mw = std::max( { uw, rw, ew } );
const auto posStart = ImGui::GetCursorPos().x;
const auto isUser = line["role"].get<std::string>() == "user";
const auto isError = line["role"].get<std::string>() == "error";
const auto role = line["role"].get<std::string>();
const auto isUser = role == "user";
const auto isError = role == "error";
float diff, offset;
if( isUser )