claude-mem-lite 2.32.5 → 2.32.6
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/hook-handoff.mjs
CHANGED
|
@@ -299,7 +299,16 @@ export function renderHandoffInjection(db, project, currentCcSessionId = null) {
|
|
|
299
299
|
ageSec < 86400 ? `${Math.round(ageSec / 3600)}h` :
|
|
300
300
|
`${Math.round(ageSec / 86400)}d`;
|
|
301
301
|
|
|
302
|
-
|
|
302
|
+
// Framing header: `UserPromptSubmit` hook writes this block to stdout, which
|
|
303
|
+
// Claude Code surfaces alongside the real user prompt. Without an explicit
|
|
304
|
+
// "this is not a new message" marker, models can misread `## Working On <text>`
|
|
305
|
+
// as a fresh user utterance and either answer the old task or end the turn.
|
|
306
|
+
// The `[mem]` prefix mirrors the SessionStart dashboard convention; `origin`
|
|
307
|
+
// on the tag gives programmatic callers a stable anchor.
|
|
308
|
+
const lines = [
|
|
309
|
+
`[mem] Resumed context from previous session (${handoff.type}, age ${ageStr}) — system-injected, NOT a new user message:`,
|
|
310
|
+
`<session-handoff source="${handoff.type}" age="${ageStr}" origin="hook-injected">`,
|
|
311
|
+
];
|
|
303
312
|
|
|
304
313
|
if (handoff.working_on) {
|
|
305
314
|
lines.push('## Working On', handoff.working_on, '');
|