MCPcopy Create free account
hub / github.com/codeaashu/claude-code / stripReinjectedAttachments

Function stripReinjectedAttachments

src/services/compact/compact.ts:211–223  ·  view source on GitHub ↗
(messages: Message[])

Source from the content-addressed store, hash-verified

209 * don't exist on external builds).
210 */
211export function stripReinjectedAttachments(messages: Message[]): Message[] {
212 if (feature('EXPERIMENTAL_SKILL_SEARCH')) {
213 return messages.filter(
214 m =>
215 !(
216 m.type === 'attachment' &&
217 (m.attachment.type === 'skill_discovery' ||
218 m.attachment.type === 'skill_listing')
219 ),
220 )
221 }
222 return messages
223}
224
225export const ERROR_MESSAGE_NOT_ENOUGH_MESSAGES =
226 'Not enough messages to compact.'

Callers 1

streamCompactSummaryFunction · 0.85

Calls 1

featureFunction · 0.85

Tested by

no test coverage detected