@xdarkicex/openclaw-memory-libravdb 1.9.10-beta.3 → 1.9.10-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/context-engine.js +9 -1
- package/dist/index.js +3 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/context-engine.js
CHANGED
|
@@ -1692,7 +1692,15 @@ export function buildContextEngineFactory(runtime, cfg, logger = console) {
|
|
|
1692
1692
|
userIdOverride: args.userId,
|
|
1693
1693
|
sessionKey: args.sessionKey,
|
|
1694
1694
|
});
|
|
1695
|
-
|
|
1695
|
+
// Only normalize the recent tail: the daemon already stores every
|
|
1696
|
+
// turn and can pull older messages from its own session store.
|
|
1697
|
+
// Processing the full history on every turn is O(N²) and the
|
|
1698
|
+
// primary source of growing turn latency.
|
|
1699
|
+
const normalizeWindow = 50;
|
|
1700
|
+
const recentMessages = args.messages.length > normalizeWindow
|
|
1701
|
+
? args.messages.slice(-normalizeWindow)
|
|
1702
|
+
: args.messages;
|
|
1703
|
+
const messages = normalizeKernelMessages(recentMessages);
|
|
1696
1704
|
const strippedPrompt = args.prompt
|
|
1697
1705
|
? normalizeKernelContent(args.prompt, { retainOpenClawContext: false })
|
|
1698
1706
|
: "";
|
package/dist/index.js
CHANGED
|
@@ -36928,7 +36928,9 @@ function buildContextEngineFactory(runtime, cfg, logger = console) {
|
|
|
36928
36928
|
userIdOverride: args.userId,
|
|
36929
36929
|
sessionKey: args.sessionKey
|
|
36930
36930
|
});
|
|
36931
|
-
const
|
|
36931
|
+
const normalizeWindow = 50;
|
|
36932
|
+
const recentMessages = args.messages.length > normalizeWindow ? args.messages.slice(-normalizeWindow) : args.messages;
|
|
36933
|
+
const messages = normalizeKernelMessages(recentMessages);
|
|
36932
36934
|
const strippedPrompt = args.prompt ? normalizeKernelContent(args.prompt, { retainOpenClawContext: false }) : "";
|
|
36933
36935
|
const lastUserIndex = findLastUserMessageIndex(messages);
|
|
36934
36936
|
const isPostToolContinuation = lastUserIndex >= 0 && lastUserIndex < messages.length - 1 && hasLiveToolProtocolAfterLastUser(messages, lastUserIndex);
|
package/openclaw.plugin.json
CHANGED