Distinct callees in the order the body reaches them, capped.
(ir: SemanticIR, limit: number)
| 1226 | |
| 1227 | /** Distinct callees in the order the body reaches them, capped. */ |
| 1228 | function proseChips(ir: SemanticIR, limit: number): { chips: TwinChip[]; hidden: number } { |
| 1229 | const seen = new Set<string>(); |
| 1230 | const distinct: CallSite[] = []; |
| 1231 | for (const call of ir.steps.value) { |
| 1232 | const key = call.targetQualifiedName ?? call.targetName; |
| 1233 | if (key.length === 0 || seen.has(key)) { |
| 1234 | continue; |
| 1235 | } |
| 1236 | seen.add(key); |
| 1237 | distinct.push(call); |
| 1238 | } |
| 1239 | return { |
| 1240 | chips: distinct.slice(0, limit).map(call => ({ label: call.targetName, target: stepTarget(call) })), |
| 1241 | hidden: Math.max(0, distinct.length - limit) |
| 1242 | }; |
| 1243 | } |
| 1244 | |
| 1245 | /** |
| 1246 | * One honest sentence about whether anything tests this, in plain words. |
no test coverage detected