( toolIdByAlias: Map<string, string>, toolNames: string[], )
| 114 | } |
| 115 | |
| 116 | function resolveCustomWorkflowToolIds( |
| 117 | toolIdByAlias: Map<string, string>, |
| 118 | toolNames: string[], |
| 119 | ): { toolIds: string[]; unknownToolNames: string[] } { |
| 120 | const toolIds: string[] = []; |
| 121 | const seen = new Set<string>(); |
| 122 | const unknownToolNames: string[] = []; |
| 123 | |
| 124 | for (const toolName of toolNames) { |
| 125 | const normalizedToolName = normalizeName(toolName); |
| 126 | if (!normalizedToolName) { |
| 127 | continue; |
| 128 | } |
| 129 | const toolId = toolIdByAlias.get(normalizedToolName); |
| 130 | if (!toolId) { |
| 131 | unknownToolNames.push(toolName); |
| 132 | continue; |
| 133 | } |
| 134 | if (!seen.has(toolId)) { |
| 135 | seen.add(toolId); |
| 136 | toolIds.push(toolId); |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | return { toolIds, unknownToolNames }; |
| 141 | } |
| 142 | |
| 143 | function buildCustomWorkflowEntry(name: string, toolIds: string[]): WorkflowManifestEntry { |
| 144 | return { |
no test coverage detected