MCPcopy Create free account
hub / github.com/github/gh-aw / appendAgentText

Function appendAgentText

actions/setup/js/log_parser_format.cjs:409–426  ·  view source on GitHub ↗
(lines, text, state)

Source from the content-addressed store, hash-verified

407 }
408
409 function appendAgentText(lines, text, state) {
410 let displayText = text;
411 if (displayText.length > MAX_AGENT_TEXT_LENGTH) {
412 displayText = displayText.substring(0, MAX_AGENT_TEXT_LENGTH) + `... [truncated: showing first ${MAX_AGENT_TEXT_LENGTH} of ${text.length} chars]`;
413 }
414
415 const textLines = displayText.split("\n");
416 for (let i = 0; i < textLines.length; i++) {
417 if (i === 0) {
418 state.traceEventCount += 1;
419 }
420 const prefix = i === 0 ? `[${state.traceEventCount}] ◆ ` : " ";
421 if (!appendConversationLine(lines, `${prefix}${textLines[i]}`, state)) {
422 return;
423 }
424 }
425 appendConversationLine(lines, "", state);
426 }
427
428 function appendReasoningText(lines, text, state) {
429 let displayText = text;

Callers 1

generateSummaryLinesFunction · 0.85

Calls 1

appendConversationLineFunction · 0.85

Tested by

no test coverage detected