Enhance memory management and compaction features
- Implement global memory layer for cross-project patterns. - Improve memory entry scoring with recency and tokenization. - Adjust MAX_TEXT limit from 400 to 800 for better context retention. - Add TTL pruning for stale memory entries. - Capture and summarize dropped content during compaction. - Update tests to reflect changes in memory behavior and compaction logic.
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ test('an empty note is refused', async () => {
|
||||
test('long text is truncated', async () => {
|
||||
const m = new Memory('/repo');
|
||||
const entry = await m.add('fact', 'x'.repeat(2000));
|
||||
expect(entry?.text.length).toBe(400);
|
||||
expect(entry?.text.length).toBe(800);
|
||||
});
|
||||
|
||||
test('search requires every term and records a hit', async () => {
|
||||
|
||||
Reference in New Issue
Block a user