fix: gate privacy warning on !hasCustomContent
The late-set blockSessionSave privacy warning incorrectly fired when custom content was pre-set (transcript was never loaded or sent to LLM). Now only warns when transcript was actually loaded — matching the condition that guards transcript loading at line 304.
This commit is contained in:
parent
b17165f982
commit
8ccb587965
@ -444,14 +444,17 @@ const saveSessionToMemory: HookHandler = async (event) => {
|
||||
if (event.context.blockSessionSave === true && inlineWriteHappened) {
|
||||
// Privacy note: late-set blockSessionSave retracts the file but does NOT
|
||||
// prevent transcript content from having already been sent to the LLM
|
||||
// provider for slug generation. To prevent transcript processing entirely,
|
||||
// set blockSessionSave before the session-memory handler runs (pre-set path).
|
||||
log.warn(
|
||||
"blockSessionSave was set by a late hook — memory file will be retracted, but " +
|
||||
"transcript content may have already been sent to the LLM provider for slug generation. " +
|
||||
"To prevent transcript processing entirely, set blockSessionSave before the " +
|
||||
"session-memory handler runs.",
|
||||
);
|
||||
// provider for slug generation — but only when the transcript was actually
|
||||
// loaded (i.e. no custom content was pre-set). When hasCustomContent is
|
||||
// true, transcript loading and LLM calls were skipped entirely.
|
||||
if (!hasCustomContent) {
|
||||
log.warn(
|
||||
"blockSessionSave was set by a late hook — memory file will be retracted, but " +
|
||||
"transcript content may have already been sent to the LLM provider for slug generation. " +
|
||||
"To prevent transcript processing entirely, set blockSessionSave before the " +
|
||||
"session-memory handler runs.",
|
||||
);
|
||||
}
|
||||
if (preExistingContent !== null) {
|
||||
// Slug collision: another entry already existed at this filename
|
||||
// before our inline write. Restore the original content rather
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user