From 324ecdcb99c96224c98204a9bb22cbb70b690a15 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 1 Feb 2026 01:48:55 +0100 Subject: [PATCH] Change source code separator in LLM attachments. --- profiler/src/profiler/TracyLlmTools.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/profiler/src/profiler/TracyLlmTools.cpp b/profiler/src/profiler/TracyLlmTools.cpp index 7d2758e5..cd6958be 100644 --- a/profiler/src/profiler/TracyLlmTools.cpp +++ b/profiler/src/profiler/TracyLlmTools.cpp @@ -811,13 +811,13 @@ std::string TracyLlmTools::SourceFile( const std::string& file, uint32_t line, u nlohmann::json json = { { "file", file }, - { "hint", "Each line starts with a line number, then a <|> symbol, then the actual line content." }, + { "hint", "Each line starts with a line number, then: space, pipe, space, then the actual line content." }, }; std::string contents; for( uint32_t i = minLine; i < maxLine; i++ ) { - contents += std::to_string( i+1 ) + "<|>" + lines[i] + "\n"; + contents += std::to_string( i+1 ) + " | " + lines[i] + "\n"; } json.push_back( { "contents", std::move( contents ) } ); @@ -829,7 +829,7 @@ std::string TracyLlmTools::SourceSearch( std::string query, bool caseInsensitive { auto& cache = m_worker.GetSourceFileCache(); nlohmann::json json = { - { "hint", "Each line starts with a line number, then a <|> symbol, then the actual line content." } + { "hint", "Each line starts with a line number, then: space, pipe, space, then the actual line content." } }; if( caseInsensitive ) std::ranges::transform( query, query.begin(), []( char c ) { return std::tolower( c ); } ); @@ -892,14 +892,14 @@ std::string TracyLlmTools::SourceSearch( std::string query, bool caseInsensitive auto linesOrig = SplitLines( mem.data, mem.len ); for( auto& line : res ) { - r += std::to_string( line + 1 ) + "<|>" + linesOrig[line] + "\n"; + r += std::to_string( line + 1 ) + " | " + linesOrig[line] + "\n"; } } else { for( auto& line : res ) { - r += std::to_string( line + 1 ) + "<|>" + lines[line] + "\n"; + r += std::to_string( line + 1 ) + " | " + lines[line] + "\n"; } }