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

Function shouldSkipMessage

source code/utils/collapseReadSearch.ts:386–403  ·  view source on GitHub ↗

* Check if a message should be skipped (not break the group, just passed through). * This includes thinking blocks, redacted thinking, attachments, etc.

(msg: RenderableMessage)

Source from the content-addressed store, hash-verified

384 * This includes thinking blocks, redacted thinking, attachments, etc.
385 */
386function shouldSkipMessage(msg: RenderableMessage): boolean {
387 if (msg.type === 'assistant') {
388 const content = msg.message.content[0]
389 // Skip thinking blocks and other non-text, non-tool content
390 if (content?.type === 'thinking' || content?.type === 'redacted_thinking') {
391 return true
392 }
393 }
394 // Skip attachment messages
395 if (msg.type === 'attachment') {
396 return true
397 }
398 // Skip system messages
399 if (msg.type === 'system') {
400 return true
401 }
402 return false
403}
404
405/**
406 * Type predicate: Check if a message is a collapsible tool use.

Callers 1

collapseReadSearchGroupsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected