(message: Message)
| 191 | * back to running after the command has already completed. |
| 192 | */ |
| 193 | export function shouldReportRunningForMessage(message: Message): boolean { |
| 194 | if (message.type !== 'user') return false |
| 195 | if (message.isVisibleInTranscriptOnly) return false |
| 196 | if (message.toolUseResult !== undefined) return true |
| 197 | if (!message.isMeta) return true |
| 198 | |
| 199 | const tags = getEnvelopeTagNames(extractUserMessageText(message)) |
| 200 | if (!tags) return true |
| 201 | |
| 202 | return tags.some( |
| 203 | tag => |
| 204 | tag !== LOCAL_COMMAND_CAVEAT_TAG && |
| 205 | tag !== SYSTEM_REMINDER_TAG && |
| 206 | RUNNING_STATE_META_TAGS.has(tag), |
| 207 | ) |
| 208 | } |
| 209 | |
| 210 | export function shouldReportRunningForMessages( |
| 211 | messages: readonly Message[], |
no test coverage detected