* Truncate content for logging if it exceeds the maximum length * @param {string} content - Content to potentially truncate * @returns {string} Truncated content with indicator if truncated
(content)
| 17 | * @returns {string} Truncated content with indicator if truncated |
| 18 | */ |
| 19 | function truncateForLogging(content) { |
| 20 | if (content.length <= MAX_LOG_CONTENT_LENGTH) { |
| 21 | return content; |
| 22 | } |
| 23 | return content.substring(0, MAX_LOG_CONTENT_LENGTH) + `\n... (truncated, total length: ${content.length})`; |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Load and parse agent output from the GH_AW_AGENT_OUTPUT file |