package main import "github.com/kami/maven/internal/memory" // bestRecall is the read side of the long-term memory store: the top hit's // stored text when it clears the confidence gate. This recalls across BOTH // notes and facts (facts aren't in the notes table, so this is the only path // that can answer "when did I last …?" from a captured fact). A note hit here // is redundant with the notes-RAG path — by design; the two indexes can diverge // once the backend is swapped for a persistent/external store. ok=false when // there's no hit above the threshold or the hit carries no text. func bestRecall(results []memory.Result, min float64) (string, bool) { if len(results) == 0 { return "", false } top := results[0] if top.Score < min { return "", false } text := top.Meta["text"] if text == "" { return "", false } return text, true }