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

Rework LLM summary error display in callstack window.

This commit is contained in:
Bartosz Taudul
2026-01-14 02:50:09 +01:00
parent 828d32521d
commit 23e752a03b

View File

@@ -236,6 +236,21 @@ void View::DrawCallstackTable( uint32_t callstack, bool globalEntriesButton )
}
}
if( res.contains( "error" ) )
{
auto& err = res["error"];
if( err.contains( "message" ) )
{
auto& msg = err["message"];
if( msg.is_string() )
{
std::lock_guard lock( m_callstackDescLock );
m_callstackDesc[callstack] = "<error> " + msg.get_ref<const std::string&>();
return;
}
}
}
std::lock_guard lock( m_callstackDescLock );
m_callstackDesc[callstack] = "<error>";
} );
@@ -250,6 +265,10 @@ void View::DrawCallstackTable( uint32_t callstack, bool globalEntriesButton )
{
DrawWaitingDots( s_time, true, true );
}
else if( strncmp( it->second.c_str(), "<error>", 7 ) == 0 )
{
TextColoredUnformatted( ImVec4( 1.0f, 0.3f, 0.3f, 1.0f ), it->second.c_str() );
}
else
{
ImGui::TextUnformatted( it->second.c_str() );