()
| 45 | } |
| 46 | |
| 47 | async function fetchProviderIcons() { |
| 48 | const url = process.env.OPENCODE_MODELS_URL || "https://models.dev" |
| 49 | const providers = await fetch(`${url}/api.json`) |
| 50 | .then((res) => res.json()) |
| 51 | .then((json) => Object.keys(json)) |
| 52 | await Promise.all( |
| 53 | providers.map((provider) => |
| 54 | fetch(`${url}/logos/${provider}.svg`) |
| 55 | .then((res) => res.text()) |
| 56 | .then((svg) => fs.writeFileSync(`./src/assets/icons/provider/${provider}.svg`, svg)), |
| 57 | ), |
| 58 | ) |
| 59 | } |
no test coverage detected