(kind)
| 129 | }) |
| 130 | |
| 131 | const selectOptions = (kind) => { |
| 132 | const result = [] |
| 133 | const optionMap = optionsByKind[kind] |
| 134 | |
| 135 | if (includeAllByKind[kind]) { |
| 136 | optionMap.forEach((option) => result.push(option)) |
| 137 | return result |
| 138 | } |
| 139 | |
| 140 | selectedByKind[kind].forEach((value) => { |
| 141 | const option = optionMap.get(value) |
| 142 | if (option) result.push(option) |
| 143 | }) |
| 144 | return result |
| 145 | } |
| 146 | |
| 147 | const knowledgeBases = selectOptions('knowledges') |
| 148 | const mcps = selectOptions('mcps') |
no test coverage detected