(state, item)
| 239 | } |
| 240 | |
| 241 | function describeStartedItem(state, item) { |
| 242 | switch (item.type) { |
| 243 | case "enteredReviewMode": |
| 244 | return { message: `Reviewer started: ${item.review}`, phase: "reviewing" }; |
| 245 | case "commandExecution": |
| 246 | return { |
| 247 | message: `Running command: ${shorten(item.command, 96)}`, |
| 248 | phase: looksLikeVerificationCommand(item.command) ? "verifying" : "running" |
| 249 | }; |
| 250 | case "fileChange": |
| 251 | return { message: `Applying ${item.changes.length} file change(s).`, phase: "editing" }; |
| 252 | case "mcpToolCall": |
| 253 | return { message: `Calling ${item.server}/${item.tool}.`, phase: "investigating" }; |
| 254 | case "dynamicToolCall": |
| 255 | return { message: `Running tool: ${item.tool}.`, phase: "investigating" }; |
| 256 | case "collabAgentToolCall": { |
| 257 | const subagents = (item.receiverThreadIds ?? []).map((threadId) => labelForThread(state, threadId) ?? threadId); |
| 258 | const summary = |
| 259 | subagents.length > 0 |
| 260 | ? `Starting subagent ${subagents.join(", ")} via collaboration tool: ${item.tool}.` |
| 261 | : `Starting collaboration tool: ${item.tool}.`; |
| 262 | return { message: summary, phase: "investigating" }; |
| 263 | } |
| 264 | case "webSearch": |
| 265 | return { message: `Searching: ${shorten(item.query, 96)}`, phase: "investigating" }; |
| 266 | default: |
| 267 | return null; |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | function describeCompletedItem(state, item) { |
| 272 | switch (item.type) { |
no test coverage detected