mirror of
https://github.com/coder/coder.git
synced 2026-11-08 17:53:56 +08:00
closes CODAGT-121 When an invisible assistant message (e.g. a `provider_executed` tool-result with no text content) appeared between a visible assistant message and the next user message, the visible assistant's action bar was incorrectly hidden. The chain logic computed `isLastInChain` from the raw `parsedMessages` array, which includes entries that `ChatMessageItem` returns `null` for. Extract a shared `isTimelineMessageVisible` helper that encodes the three null-return conditions (`provider_executed` tool-result-only, all-provider-executed parts, metadata-only) in one place. Use it both to guard the early return in `ChatMessageItem` and to skip invisible entries when computing `isLastInChain`, so chain boundaries are based on the next *rendered* message.