()
| 181 | } |
| 182 | |
| 183 | const refreshOpencodeChecks = async () => { |
| 184 | await Promise.all( |
| 185 | state.servers.map((item) => |
| 186 | checkOpencode(item.config.distro) |
| 187 | .then((check) => { |
| 188 | if (!hasServer(item.config.id, item.config.distro)) return |
| 189 | setOpencodeCheck(item.config.distro, check) |
| 190 | }) |
| 191 | .catch((error) => { |
| 192 | const message = error instanceof Error ? error.message : String(error) |
| 193 | logger?.error("wsl opencode check failed", { |
| 194 | id: item.config.id, |
| 195 | distro: item.config.distro, |
| 196 | message, |
| 197 | }) |
| 198 | }), |
| 199 | ), |
| 200 | ) |
| 201 | } |
| 202 | |
| 203 | const refreshDistroLists = async (opts: { signal?: AbortSignal }) => { |
| 204 | const [installed, online] = await Promise.all([listInstalledWslDistros(opts), listOnlineWslDistros(opts)]) |
no test coverage detected