mirror of
https://github.com/wolfpld/tracy.git
synced 2026-11-13 11:25:51 +00:00
Use the intended weighting order in ManageContext().
This commit is contained in:
@@ -903,7 +903,7 @@ void TracyLlm::ManageContext( std::unique_lock<std::mutex>& lock )
|
||||
|
||||
// exponentially increase sizes of old tool outputs to prefer the most recent
|
||||
constexpr float K = 1.1f;
|
||||
for( size_t i=0; i<toolOutputs.size(); i++ ) toolOutputs[i].first *= std::pow( K, i+1 );
|
||||
for( size_t i=0; i<toolOutputs.size(); i++ ) toolOutputs[i].first *= std::pow( K, toolOutputs.size() - i );
|
||||
|
||||
// remove the largest tool output
|
||||
std::ranges::stable_sort( toolOutputs, []( const auto& a, const auto& b ) { return a.first > b.first; } );
|
||||
|
||||
Reference in New Issue
Block a user