feat(recall): cap injected memory context#71
Open
YOMXXX wants to merge 3 commits into
Open
Conversation
Signed-off-by: 李冠辰 <liguanchen@xiaomi.com>
Signed-off-by: 李冠辰 <liguanchen@xiaomi.com>
Collaborator
|
感谢您如此及时地解决了 #70 的问题!我们会内部评估,有结论后会尽快反馈。 |
yuanrengu
added a commit
to yuanrengu/TencentDB-Agent-Memory
that referenced
this pull request
May 25, 2026
- Move preExtractMemories to newMessages only (after background/new split) to prevent extracting memories from background context that should only serve as conversational context for the LLM - Remove MEDIUM-confidence hints logging (hints not wired to LLM prompt; keeping types as interface for follow-up PR) - Remove src/ from package.json files field to fix Size Guard limit (matches pattern from Tencent#76 and Tencent#71) - Export callLlmExtraction and passesConfidenceCheck for testability - Add pre-extractor.test.ts covering: - Background messages not pre-extracted - HIGH-confidence dedup via mergeExtractedMemories - Malformed JSON triggers exactly one retry - Confidence filtering does not reject valid persona/instruction
withRiver
reviewed
May 25, 2026
Collaborator
There was a problem hiding this comment.
DO NOT modify this file, which might cause some problems. We have increased the limitation of Size Guard from 512KB to 2048KB.
Contributor
Author
There was a problem hiding this comment.
Resolved in 8031ec0: restored package.json to match upstream/main and removed the manifest / extension entry changes from this PR. Fresh checks are green, including Size Guard under the updated 2048KB limit.
Contributor
Author
|
Thanks for the review. I restored Fresh local verification after the update:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
recall.maxCharsPerMemoryandrecall.maxTotalRecallCharswith defaults of800and3000.<relevant-memories>injection, preserving score order while truncating oversized entries and dropping overflow.openclaw.plugin.json.src/and pointing OpenClaw todist/index.mjs.Test Plan
npm testnpm run buildnpm pack --dry-run --jsongit diff --checkNotes
npx tsc --noEmit ...still fails on currentupstream/maindue unrelated existing type issues in commander/OpenAI settings/offload strict initialization; this PR does not touch those areas.