(a: ToolWithAnnotations, b: ToolWithAnnotations)
| 93 | } |
| 94 | |
| 95 | function sortTools(a: ToolWithAnnotations, b: ToolWithAnnotations): number { |
| 96 | const aHasConditions = Boolean(a.annotations?.conditions?.length > 0); |
| 97 | const bHasConditions = Boolean(b.annotations?.conditions?.length > 0); |
| 98 | |
| 99 | if (aHasConditions && !bHasConditions) { |
| 100 | return 1; |
| 101 | } |
| 102 | if (!aHasConditions && bHasConditions) { |
| 103 | return -1; |
| 104 | } |
| 105 | |
| 106 | return a.name.localeCompare(b.name); |
| 107 | } |
| 108 | |
| 109 | function generateToolsTOC( |
| 110 | categories: Record<string, ToolWithAnnotations[]>, |
nothing calls this directly
no outgoing calls
no test coverage detected