MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / isLoggableMessage

Function isLoggableMessage

source code/utils/sessionStorage.ts:4353–4369  ·  view source on GitHub ↗
(m: Message)

Source from the content-addressed store, hash-verified

4351// Exported so useLogMessages can sync-compute the last loggable uuid
4352// without awaiting recordTranscript's return value (race-free hint tracking).
4353export function isLoggableMessage(m: Message): boolean {
4354 if (m.type === 'progress') return false
4355 // IMPORTANT: We deliberately filter out most attachments for non-ants because
4356 // they have sensitive info for training that we don't want exposed to the public.
4357 // When enabled, we allow hook_additional_context through since it contains
4358 // user-configured hook output that is useful for session context on resume.
4359 if (m.type === 'attachment' && getUserType() !== 'ant') {
4360 if (
4361 m.attachment.type === 'hook_additional_context' &&
4362 isEnvTruthy(process.env.CLAUDE_CODE_SAVE_HOOK_ADDITIONAL_CONTEXT)
4363 ) {
4364 return true
4365 }
4366 return false
4367 }
4368 return true
4369}
4370
4371function collectReplIds(messages: readonly Message[]): Set<string> {
4372 const ids = new Set<string>()

Callers

nothing calls this directly

Calls 2

getUserTypeFunction · 0.85
isEnvTruthyFunction · 0.85

Tested by

no test coverage detected