()
| 170 | |
| 171 | // Status rendering logic |
| 172 | const renderStatus = (): React.ReactNode => { |
| 173 | if (teammate.shutdownRequested) { |
| 174 | return <Text dimColor>[stopping]</Text>; |
| 175 | } |
| 176 | if (teammate.awaitingPlanApproval) { |
| 177 | return <Text color="warning">[awaiting approval]</Text>; |
| 178 | } |
| 179 | if (teammate.isIdle) { |
| 180 | if (allIdle) { |
| 181 | return <Text dimColor> |
| 182 | {pastTenseVerb} for {displayTime} |
| 183 | </Text>; |
| 184 | } |
| 185 | return <Text dimColor>Idle for {idleElapsedTime}</Text>; |
| 186 | } |
| 187 | // Active - show spinner glyph + activity description (only when not highlighted; |
| 188 | // when highlighted, the main spinner above already shows the verb) |
| 189 | if (isHighlighted) { |
| 190 | return null; |
| 191 | } |
| 192 | return <Text dimColor> |
| 193 | {activityText?.endsWith('…') ? activityText : `${activityText}…`} |
| 194 | </Text>; |
| 195 | }; |
| 196 | |
| 197 | // Get preview lines if enabled |
| 198 | const previewLines = showPreview ? getMessagePreview(teammate.messages) : []; |
no outgoing calls
no test coverage detected