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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user