* Build missing_tool context string for display in failure issues/comments. * @param {Array } [items] - Optional pre-loaded agent output items. When provided, avoids re-reading the output file. * @returns {string} Formatted missing tool context
(items)
| 1316 | * @returns {string} Formatted missing tool context |
| 1317 | */ |
| 1318 | function buildMissingToolContext(items) { |
| 1319 | const missingToolMessages = loadMissingToolMessages(items).filter(message => !isPermissionDeniedMissingTool(message)); |
| 1320 | |
| 1321 | if (missingToolMessages.length === 0) { |
| 1322 | return ""; |
| 1323 | } |
| 1324 | |
| 1325 | core.info(`Found ${missingToolMessages.length} missing_tool message(s)`); |
| 1326 | |
| 1327 | const formattedList = formatMissingTools(missingToolMessages); |
| 1328 | |
| 1329 | let context = buildWarningAlertLine("Missing Tools Reported", "The agent reported missing tools during execution.") + "\n**Missing Tools:**\n"; |
| 1330 | context += formattedList; |
| 1331 | context += "\n\n"; |
| 1332 | |
| 1333 | return context; |
| 1334 | } |
| 1335 | |
| 1336 | /** |
| 1337 | * Build permission denied context string when the agent reported numerous permission denied errors. |
no test coverage detected