(m: Message)
| 4349 | // Exported so useLogMessages can sync-compute the last loggable uuid |
| 4350 | // without awaiting recordTranscript's return value (race-free hint tracking). |
| 4351 | export 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 | |
| 4369 | function collectReplIds(messages: readonly Message[]): Set<string> { |
| 4370 | const ids = new Set<string>() |
nothing calls this directly
no test coverage detected