MCPcopy
hub / github.com/openai/codex-plugin-cc / describeStartedItem

Function describeStartedItem

plugins/codex/scripts/lib/codex.mjs:241–269  ·  view source on GitHub ↗
(state, item)

Source from the content-addressed store, hash-verified

239}
240
241function 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
271function describeCompletedItem(state, item) {
272 switch (item.type) {

Callers 1

applyTurnNotificationFunction · 0.85

Calls 3

labelForThreadFunction · 0.85
shortenFunction · 0.70

Tested by

no test coverage detected