( output: string | undefined, statuses: CollabAgentStatus[] | undefined, )
| 262 | } |
| 263 | |
| 264 | function extractCollabPrompt( |
| 265 | output: string | undefined, |
| 266 | statuses: CollabAgentStatus[] | undefined, |
| 267 | ) { |
| 268 | const text = output ?? ""; |
| 269 | if (!text) { |
| 270 | return ""; |
| 271 | } |
| 272 | const statusText = formatCollabAgentStatuses(statuses ?? []); |
| 273 | if (!statusText || !text.endsWith(statusText)) { |
| 274 | return text; |
| 275 | } |
| 276 | return text.slice(0, text.length - statusText.length).replace(/\n\n$/, ""); |
| 277 | } |
| 278 | |
| 279 | function buildCollabDetail( |
| 280 | sender: CollabAgentRef | undefined, |
no test coverage detected