(id: string)
| 180 | }; |
| 181 | |
| 182 | const isGitHubRepo = (id: string): boolean => { |
| 183 | const cleanId = id.startsWith("/") ? id.slice(1) : id; |
| 184 | const parts = cleanId.split("/"); |
| 185 | if (parts.length !== 2) return false; |
| 186 | const nonGitHubPrefixes = ["websites", "packages", "npm", "docs", "libraries", "llmstxt"]; |
| 187 | return !nonGitHubPrefixes.includes(parts[0].toLowerCase()); |
| 188 | }; |
| 189 | |
| 190 | const libraries = searchResult.results.slice(0, 5); |
| 191 | const indexWidth = libraries.length.toString().length; |