(edge: MemoryEdge)
| 77 | } |
| 78 | |
| 79 | function decayWeight(edge: MemoryEdge): number { |
| 80 | const daysSinceCreation = (Date.now() - edge.createdAt) / 86_400_000; |
| 81 | return edge.weight * Math.exp(-DECAY_LAMBDA * daysSinceCreation); |
| 82 | } |
| 83 | |
| 84 | async function loadGraph(rootDir: string): Promise<GraphStore> { |
| 85 | if (graphCache.has(rootDir)) return graphCache.get(rootDir)!; |
no outgoing calls
no test coverage detected