The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | /** Only asset paths are bot badges; keep same-host screenshots and all inline markdown images. */ |
| 2 | const BOT_BADGE_PREFIXES = [ |
| 3 | "static.devin.ai/assets/", |
| 4 | "cursor.com/assets/images/", |
| 5 | "storage.googleapis.com/coderabbit_public_assets/", |
| 6 | "greptile-static-assets.s3.amazonaws.com/badges/", |
| 7 | "static.graphite.dev/", |
| 8 | "qodo.ai/wp-content/uploads/", |
| 9 | "cubic.dev/buttons/", |
| 10 | "github.githubassets.com/static/images/icons/copilot-code-review/", |
| 11 | "gstatic.com/codereviewagent/", |
| 12 | "vercel.com/vercel-agent-view-suggestion-", |
| 13 | "agents-vade-review.vercel.sh/", |
| 14 | "new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/", |
| 15 | "pr-comments-assets.blacksmith.sh/", |
| 16 | "app.roocode.com/cloud-agents/github/", |
| 17 | "app.parameter.ai/_static/icons/", |
| 18 | "img.shields.io/", |
| 19 | "raster.shields.io/", |
| 20 | "dependabot-badges.githubapp.com/", |
| 21 | "developer.mend.io/api/mc/badges/", |
| 22 | "api.securityscorecards.dev/projects/", |
| 23 | "github-app-statics.socket.dev/", |
| 24 | "static.deepsource.com/comment_artifacts/", |
| 25 | "sonarsource.github.io/sonarcloud-github-static-resources/", |
| 26 | "codescene.io/imgs/svg/", |
| 27 | "app.codecov.io/gh/", |
| 28 | "github.com/codecov/engineering-team/assets/", |
| 29 | "codspeed.io/pr-report/", |
| 30 | "static.trunk.io/assets/", |
| 31 | "res.cloudinary.com/snyk/", |
| 32 | "api.segment.io/v1/pixel/", |
| 33 | "cla-assistant.io/pull/badge/", |
| 34 | "vercel.com/static/status/", |
| 35 | "vercel.com/api/www/avatar", |
| 36 | "app.netlify.com/qr-code/", |
| 37 | "workers.cloudflare.com/logo.svg", |
| 38 | // Cloudflare Pages reuses one old GitHub upload as its logo. |
| 39 | "user-images.githubusercontent.com/23264/106598434-9e719e00-654f-11eb-9e59-6167043cfa01.png", |
| 40 | "qr.expo.dev/", |
| 41 | ]; |
| 42 | |
| 43 | export function isBotBadgeImage(href: string) { |
| 44 | const path = href.replace(/^https?:\/\/(?:www\.)?/i, "").toLowerCase(); |
| 45 | return BOT_BADGE_PREFIXES.some((prefix) => path.startsWith(prefix)); |
| 46 | } |