( message: NormalizedMessage, isTranscriptMode: boolean, )
| 4656 | } |
| 4657 | |
| 4658 | export function shouldShowUserMessage( |
| 4659 | message: NormalizedMessage, |
| 4660 | isTranscriptMode: boolean, |
| 4661 | ): boolean { |
| 4662 | if (message.type !== 'user') return true |
| 4663 | if (message.isMeta) { |
| 4664 | // Channel messages stay isMeta (for snip-tag/turn-boundary/brief-mode |
| 4665 | // semantics) but render in the default transcript — the keyboard user |
| 4666 | // should see what arrived. The <channel> tag in UserTextMessage handles |
| 4667 | // the actual rendering. |
| 4668 | if ( |
| 4669 | (feature('KAIROS') || feature('KAIROS_CHANNELS')) && |
| 4670 | message.origin?.kind === 'channel' |
| 4671 | ) |
| 4672 | return true |
| 4673 | return false |
| 4674 | } |
| 4675 | if (message.isVisibleInTranscriptOnly && !isTranscriptMode) return false |
| 4676 | return true |
| 4677 | } |
| 4678 | |
| 4679 | export function isThinkingMessage(message: Message): boolean { |
| 4680 | if (message.type !== 'assistant') return false |
no test coverage detected