MCPcopy Create free account
hub / github.com/tiann/hapi / extractAgentPrompt

Method extractAgentPrompt

cli/src/codex/codexRemoteLauncher.ts:459–468  ·  view source on GitHub ↗
(input: unknown)

Source from the content-addressed store, hash-verified

457 };
458
459 const extractAgentPrompt = (input: unknown): string | null => {
460 const record = asRecord(input);
461 if (!record) return null;
462
463 const direct = asString(record.message ?? record.prompt);
464 if (direct) return direct;
465
466 const textItems = extractTextItems(input);
467 return textItems.length > 0 ? textItems.join('\n\n') : null;
468 };
469
470 const cleanAgentPromptForSummary = (prompt: string): string => {
471 const withoutTags = prompt

Callers

nothing calls this directly

Calls 2

asRecordFunction · 0.70
asStringFunction · 0.50

Tested by

no test coverage detected