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

Function shouldSkipMessage

src/utils/collapseReadSearch.ts:412–429  ·  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

410 * This includes thinking blocks, redacted thinking, attachments, etc.
411 */
412function shouldSkipMessage(msg: RenderableMessage): boolean {
413 if (msg.type === 'assistant') {
414 const content = msg.message.content[0]
415 // Skip thinking blocks and other non-text, non-tool content
416 if (content?.type === 'thinking' || content?.type === 'redacted_thinking') {
417 return true
418 }
419 }
420 // Skip attachment messages
421 if (msg.type === 'attachment') {
422 return true
423 }
424 // Skip system messages
425 if (msg.type === 'system') {
426 return true
427 }
428 return false
429}
430
431/**
432 * 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