2
0
mirror of https://github.com/wolfpld/tracy synced 2026-01-19 04:52:09 +00:00

Display tool call arguments.

This commit is contained in:
Bartosz Taudul
2025-05-14 01:00:19 +02:00
parent dc8c106454
commit f5ea5ffce1

View File

@@ -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<const std::string&>().c_str() );
auto& func = tool["function"];
ImGui::TextWrapped( "%s", func["name"].get_ref<const std::string&>().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();
}