0
0
mirror of https://github.com/wolfpld/tracy.git synced 2026-01-18 17:11:26 +01:00

Allow attaching source code to LLM in simple view.

This commit is contained in:
Bartosz Taudul
2026-01-15 21:38:12 +01:00
parent ef77600bae
commit c4207dec75

View File

@@ -1067,6 +1067,19 @@ void SourceView::Render( Worker& worker, View& view )
stream.write( m_source.data(), m_source.data_size() );
ImGui::SetClipboardText( stream.str().c_str() );
}
if( s_config.llm )
{
ImGui::SameLine();
if( ImGui::SmallButton( ICON_FA_ROBOT ) )
{
nlohmann::json json = {
{ "type", "source", },
{ "file", m_source.filename(), },
{ "code", std::string( m_source.data(), m_source.data_size() ) }
};
view.AddLlmAttachment( json );
}
}
ImGui::PopFont();
ImGui::SameLine();
ImGui::Spacing();