@vedtechsolutions/engram-mcp 1.0.17 → 1.0.19
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/hook.js +16 -4
- package/package.json +1 -1
package/dist/hook.js
CHANGED
|
@@ -3244,11 +3244,22 @@ function sanitizeCognitiveState(state) {
|
|
|
3244
3244
|
if (cog.current_approach && cog.current_approach.length < 5) {
|
|
3245
3245
|
cog.current_approach = null;
|
|
3246
3246
|
}
|
|
3247
|
-
|
|
3248
|
-
|
|
3247
|
+
const templatePrefixes = ["Pre-compaction", "chronologically analyze", "This session is being continued"];
|
|
3248
|
+
if (cog.current_approach) {
|
|
3249
|
+
for (const prefix of templatePrefixes) {
|
|
3250
|
+
if (cog.current_approach.startsWith(prefix)) {
|
|
3251
|
+
cog.current_approach = null;
|
|
3252
|
+
break;
|
|
3253
|
+
}
|
|
3254
|
+
}
|
|
3249
3255
|
}
|
|
3250
|
-
if (cog.recent_discovery
|
|
3251
|
-
|
|
3256
|
+
if (cog.recent_discovery) {
|
|
3257
|
+
for (const prefix of templatePrefixes) {
|
|
3258
|
+
if (cog.recent_discovery.startsWith(prefix)) {
|
|
3259
|
+
cog.recent_discovery = null;
|
|
3260
|
+
break;
|
|
3261
|
+
}
|
|
3262
|
+
}
|
|
3252
3263
|
}
|
|
3253
3264
|
if (state.active_task && state.active_task.startsWith("<")) {
|
|
3254
3265
|
state.active_task = null;
|
|
@@ -5976,6 +5987,7 @@ function handlePromptCheck(stdinJson, argFallback) {
|
|
|
5976
5987
|
if (!rawContent || typeof rawContent !== "string" || rawContent.length < 3) return;
|
|
5977
5988
|
const content = rawContent.length > INPUT.MAX_CONTENT_LENGTH ? rawContent.slice(0, INPUT.MAX_CONTENT_LENGTH) : rawContent;
|
|
5978
5989
|
const state = loadWatcherState();
|
|
5990
|
+
sanitizeCognitiveState(state);
|
|
5979
5991
|
const budget = new OutputBudget();
|
|
5980
5992
|
if (!state.active_project) {
|
|
5981
5993
|
const inferred = inferProjectFromCwd();
|