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:
@@ -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 );
|
std::lock_guard lock( m_callstackDescLock );
|
||||||
m_callstackDesc[callstack] = "<error>";
|
m_callstackDesc[callstack] = "<error>";
|
||||||
} );
|
} );
|
||||||
@@ -250,6 +265,10 @@ void View::DrawCallstackTable( uint32_t callstack, bool globalEntriesButton )
|
|||||||
{
|
{
|
||||||
DrawWaitingDots( s_time, true, true );
|
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
|
else
|
||||||
{
|
{
|
||||||
ImGui::TextUnformatted( it->second.c_str() );
|
ImGui::TextUnformatted( it->second.c_str() );
|
||||||
|
|||||||
Reference in New Issue
Block a user