( spawnAgentsMap: Map<string, SpawnAgentInfo>, eventAgentType: string, )
| 9 | } |
| 10 | |
| 11 | export const findMatchingSpawnAgent = ( |
| 12 | spawnAgentsMap: Map<string, SpawnAgentInfo>, |
| 13 | eventAgentType: string, |
| 14 | ): SpawnAgentMatch | null => { |
| 15 | const eventBaseName = getAgentBaseName(eventAgentType || '') |
| 16 | |
| 17 | for (const [tempId, info] of spawnAgentsMap.entries()) { |
| 18 | const storedBaseName = getAgentBaseName(info.agentType || '') |
| 19 | if (eventBaseName === storedBaseName) { |
| 20 | return { tempId, info } |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | return null |
| 25 | } |
| 26 | |
| 27 | export const resolveSpawnAgentToReal = (options: { |
| 28 | blocks: ContentBlock[] |
no test coverage detected