MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isLoggableMessage

Function isLoggableMessage

src/utils/sessionStorage.ts:4351–4367  ·  view source on GitHub ↗
(m: Message)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

getUserTypeFunction · 0.85
isEnvTruthyFunction · 0.85

Tested by

no test coverage detected