MCPcopy
hub / github.com/Dimillian/CodexMonitor / extractCollabPrompt

Function extractCollabPrompt

src/utils/threadItems.collab.ts:264–277  ·  view source on GitHub ↗
(
  output: string | undefined,
  statuses: CollabAgentStatus[] | undefined,
)

Source from the content-addressed store, hash-verified

262}
263
264function 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
279function buildCollabDetail(
280 sender: CollabAgentRef | undefined,

Callers 1

Calls 1

Tested by

no test coverage detected