MCPcopy Create free account
hub / github.com/Noumena-Network/code / isLoggableMessage

Function isLoggableMessage

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

Source from the content-addressed store, hash-verified

4575// Exported so useLogMessages can sync-compute the last loggable uuid
4576// without awaiting recordTranscript's return value (race-free hint tracking).
4577export function isLoggableMessage(m: Message): boolean {
4578 if (m.type === 'progress') return false
4579 // IMPORTANT: We deliberately filter out most attachments for non-ants because
4580 // they have sensitive info for training that we don't want exposed to the public.
4581 // When enabled, we allow hook_additional_context through since it contains
4582 // user-configured hook output that is useful for session context on resume.
4583 if (m.type === 'attachment' && !isAntOrNoumena()) {
4584 if (
4585 m.attachment.type === 'hook_additional_context' &&
4586 isEnvTruthy(process.env.CLAUDE_CODE_SAVE_HOOK_ADDITIONAL_CONTEXT)
4587 ) {
4588 return true
4589 }
4590 return false
4591 }
4592 return true
4593}
4594
4595function collectReplIds(messages: readonly Message[]): Set<string> {
4596 const ids = new Set<string>()

Callers

nothing calls this directly

Calls 2

isEnvTruthyFunction · 0.90
isAntOrNoumenaFunction · 0.85

Tested by

no test coverage detected