From b74cac005d6695c6fa78b3c009367f1fc7144ee3 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 29 Nov 2025 19:56:07 +0100 Subject: [PATCH] Retrieve manual chunk only once. --- profiler/src/profiler/TracyLlmTools.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/profiler/src/profiler/TracyLlmTools.cpp b/profiler/src/profiler/TracyLlmTools.cpp index db51d6a7..52baf2fb 100644 --- a/profiler/src/profiler/TracyLlmTools.cpp +++ b/profiler/src/profiler/TracyLlmTools.cpp @@ -838,12 +838,13 @@ std::string TracyLlmTools::SearchManual( const std::string& query, TracyLlmApi& nlohmann::json json; for( auto& chunk : chunks ) { + auto& m = m_manualChunks[chunk.first]; nlohmann::json r; r["distance"] = chunk.second; - r["content"] = m_manualChunks[chunk.first].text; - r["section"] = m_manualChunks[chunk.first].section; - r["title"] = m_manualChunks[chunk.first].title; - r["parents"] = m_manualChunks[chunk.first].parents; + r["content"] = m.text; + r["section"] = m.section; + r["title"] = m.title; + r["parents"] = m.parents; json.emplace_back( std::move( r ) ); }