MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / extractCodexPlanText

Function extractCodexPlanText

projects/openade-module/src/hyperplan.ts:424–433  ·  view source on GitHub ↗
(rawMessages: Array<Record<string, unknown>>)

Source from the content-addressed store, hash-verified

422}
423
424function extractCodexPlanText(rawMessages: Array<Record<string, unknown>>): string | null {
425 const textParts: string[] = []
426 for (const raw of rawMessages) {
427 const message = raw.message as Record<string, unknown>
428 if (message.type !== "item.completed") continue
429 const item = typeof message.item === "object" && message.item !== null ? (message.item as Record<string, unknown>) : {}
430 if (item.type === "agent_message" && typeof item.text === "string") textParts.push(item.text)
431 }
432 return textParts.length > 0 ? textParts.join("\n") : null
433}

Callers 1

extractOpenADEPlanTextFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected