mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 22:28:10 +09:00
Checkpoint: File edits
Automatic checkpoint created by Claude Code - Branch: rebrand/ruvflow-umbrella - Timestamp: 2026-02-09T17:39:07Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
99b8c5bd58
commit
c8e2ea3db9
1 file changed
+8
-4
@@ -344,14 +344,18 @@ function getContext(prompt) {
|
||||
scored.sort((a, b) => b.score - a.score);
|
||||
const topEntries = scored.slice(0, TOP_K);
|
||||
|
||||
// Store matched IDs in session state for feedback
|
||||
// Boost previously matched patterns (implicit success: user continued working)
|
||||
const prevMatched = sessionGet('lastMatchedPatterns');
|
||||
|
||||
// Store NEW matched IDs in session state for feedback
|
||||
const matchedIds = topEntries.map(e => e.id);
|
||||
sessionSet('lastMatchedPatterns', matchedIds);
|
||||
|
||||
// Boost previously matched patterns (implicit success: user continued working)
|
||||
const prevMatched = sessionGet('lastMatchedPatterns');
|
||||
// Only boost previous if they differ from current (avoid double-boosting)
|
||||
if (prevMatched && Array.isArray(prevMatched)) {
|
||||
boostConfidence(prevMatched, 0.03);
|
||||
const newSet = new Set(matchedIds);
|
||||
const toBoost = prevMatched.filter(id => !newSet.has(id));
|
||||
if (toBoost.length > 0) boostConfidence(toBoost, 0.03);
|
||||
}
|
||||
|
||||
// Format output
|
||||
|
||||
Reference in new issue
Block a user