diff --git a/profiler/src/profiler/TracyConfig.cpp b/profiler/src/profiler/TracyConfig.cpp index 0ba66851..24c47039 100644 --- a/profiler/src/profiler/TracyConfig.cpp +++ b/profiler/src/profiler/TracyConfig.cpp @@ -47,6 +47,7 @@ void LoadConfig() if( v2 = ini_get( ini, "llm", "useragent" ); v2 ) s_config.llmUserAgent = v2; if( v2 = ini_get( ini, "llm", "searchIdentifier" ); v2 ) s_config.llmSearchIdentifier = v2; if( v2 = ini_get( ini, "llm", "searchApiKey" ); v2 ) s_config.llmSearchApiKey = v2; + if( ini_sget( ini, "llm", "annotateCallstacks", "%d", &v ) ) s_config.llmAnnotateCallstacks = v; ini_free( ini ); } @@ -95,6 +96,7 @@ bool SaveConfig() fprintf( f, "useragent = %s\n", s_config.llmUserAgent.c_str() ); fprintf( f, "searchIdentifier = %s\n", s_config.llmSearchIdentifier.c_str() ); fprintf( f, "searchApiKey = %s\n", s_config.llmSearchApiKey.c_str() ); + fprintf( f, "annotateCallstacks = %i\n", (int)s_config.llmAnnotateCallstacks ); fclose( f ); return true; diff --git a/profiler/src/profiler/TracyConfig.hpp b/profiler/src/profiler/TracyConfig.hpp index f3e07266..d8d62b3b 100644 --- a/profiler/src/profiler/TracyConfig.hpp +++ b/profiler/src/profiler/TracyConfig.hpp @@ -43,6 +43,7 @@ struct Config std::string llmUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"; std::string llmSearchIdentifier; std::string llmSearchApiKey; + bool llmAnnotateCallstacks = false; }; extern Config s_config; diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index 18a0d393..0ce36486 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -298,6 +298,13 @@ void TracyLlm::Draw() if( responding ) ImGui::EndDisabled(); ImGui::Checkbox( ICON_FA_EARTH_AMERICAS " Internet access", &m_tools->m_netAccess ); + ImGui::SameLine(); + ImGui::Spacing(); + ImGui::SameLine(); + if( ImGui::Checkbox( ICON_FA_TAG " Annotate call stacks", &s_config.llmAnnotateCallstacks ) ) + { + SaveConfig(); + } if( ImGui::TreeNode( "Advanced" ) ) {