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

Function isTextBreaker

src/utils/collapseReadSearch.ts:358–366  ·  view source on GitHub ↗

* Check if a message is assistant text that should break a group.

(msg: RenderableMessage)

Source from the content-addressed store, hash-verified

356 * Check if a message is assistant text that should break a group.
357 */
358function isTextBreaker(msg: RenderableMessage): boolean {
359 if (msg.type === 'assistant') {
360 const content = msg.message.content[0]
361 if (content?.type === 'text' && content.text.trim().length > 0) {
362 return true
363 }
364 }
365 return false
366}
367
368/**
369 * Check if a message is a non-collapsible tool use that should break a group.

Callers 1

collapseReadSearchGroupsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected