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

Method summarizeAgentInput

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

Source from the content-addressed store, hash-verified

493 };
494
495 const summarizeAgentInput = (input: unknown): string | null => {
496 const prompt = extractAgentPrompt(input);
497 if (prompt) {
498 const cleaned = cleanAgentPromptForSummary(prompt);
499 if (cleaned.length > 0) {
500 return truncateText(cleaned, 80);
501 }
502 }
503
504 const record = asRecord(input);
505 const agentType = asString(record?.agent_type ?? record?.subagent_type ?? record?.type);
506 return agentType ? `${agentType} agent` : null;
507 };
508
509 const getPatchFiles = (changes: unknown): string[] => {
510 const record = asRecord(changes);

Callers

nothing calls this directly

Calls 4

asRecordFunction · 0.70
truncateTextFunction · 0.50
asStringFunction · 0.50

Tested by

no test coverage detected