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

Function appendReasoningText

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

Source from the content-addressed store, hash-verified

426 }
427
428 function appendReasoningText(lines, text, state) {
429 let displayText = text;
430 if (displayText.length > MAX_AGENT_TEXT_LENGTH) {
431 displayText = displayText.substring(0, MAX_AGENT_TEXT_LENGTH) + `... [truncated: showing first ${MAX_AGENT_TEXT_LENGTH} of ${text.length} chars]`;
432 }
433
434 const textLines = displayText.split("\n");
435 for (let i = 0; i < textLines.length; i++) {
436 if (i === 0) {
437 state.traceEventCount += 1;
438 }
439 const prefix = i === 0 ? `[${state.traceEventCount}] ◐ ` : " ";
440 if (!appendConversationLine(lines, `${prefix}${textLines[i]}`, state)) {
441 return;
442 }
443 }
444 appendConversationLine(lines, "", state);
445 }
446
447 function appendToolExecutionLine(lines, content, toolUsePairs, state) {
448 const toolName = content.name;

Callers 1

generateSummaryLinesFunction · 0.85

Calls 1

appendConversationLineFunction · 0.85

Tested by

no test coverage detected