← Back to task

Commit c876a36f

commit c876a36f99de750fd3834cd3867c1948193bbc19
Author: Coder Agent <coder@agents.omni>
Date:   Thu Feb 19 23:08:57 2026

    Wire adaptive context thresholds in semantic search
    
    Task-Id: t-485

diff --git a/Omni/Agent/Context.hs b/Omni/Agent/Context.hs
index e1033357..f3e1731f 100755
--- a/Omni/Agent/Context.hs
+++ b/Omni/Agent/Context.hs
@@ -158,7 +158,13 @@ passiveSemanticSource scope =
     let mChatId = scopeChatId scope
     results <- case mChatId of
       Nothing -> pure []
-      Just chatId -> Memory.searchChatHistoryInChat chatId (spObservation params) (spMaxItems params)
+      Just chatId ->
+        Memory.searchChatHistoryInChatWithConfig
+          chatId
+          (spObservation params)
+          (spMaxItems params)
+          (accSimilarityThreshold defaultAdaptiveContextConfig)
+          (accRecencyDecay defaultAdaptiveContextConfig)
 
     let scoredMatches =
           [ (Memory.cheCreatedAt entry, Memory.cheRole entry, Memory.cheContent entry, score)