From f5ea5ffce102459f58ec4c8be9cf35eb9bfc39e7 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 14 May 2025 01:00:19 +0200 Subject: [PATCH] Display tool call arguments. --- profiler/src/profiler/TracyLlm.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index cea8fe3c..115faa40 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -302,7 +302,18 @@ void TracyLlm::Draw() ImGui::PushFont( m_font ); for( auto& tool : line["tool_calls"] ) { - ImGui::TextWrapped( "%s", tool["function"]["name"].get_ref().c_str() ); + auto& func = tool["function"]; + ImGui::TextWrapped( "%s", func["name"].get_ref().c_str() ); + if( func.contains( "arguments" ) ) + { + ImGui::PushFont( m_smallFont ); + auto& args = func["arguments"]; + for( auto& arg : args.items() ) + { + ImGui::TextWrapped( "%s: %s", arg.key().c_str(), arg.value().dump( 2 ).c_str() ); + } + ImGui::PopFont(); + } } ImGui::PopFont(); }