mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-23 17:20:48 +00:00
Check for content being available when deleting user message.
This commit is contained in:
@@ -456,10 +456,14 @@ void TracyLlm::Draw()
|
||||
}
|
||||
else if( role == TracyLlmChat::TurnRole::User || role == TracyLlmChat::TurnRole::UserDebug )
|
||||
{
|
||||
const auto sz = std::min( InputBufferSize - 1, content.size() );
|
||||
memcpy( m_input, content.data(), sz );
|
||||
m_input[sz] = 0;
|
||||
inputChanged = true;
|
||||
if( line.contains( "content" ) )
|
||||
{
|
||||
auto& content = line["content"].get_ref<const std::string&>();
|
||||
const auto sz = std::min( InputBufferSize - 1, content.size() );
|
||||
memcpy( m_input, content.data(), sz );
|
||||
m_input[sz] = 0;
|
||||
inputChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
auto cit = it;
|
||||
|
||||
Reference in New Issue
Block a user