chore: generate

This commit is contained in:
opencode-agent[bot]
2026-05-06 15:13:34 +00:00
parent d9c18381a6
commit b9b854bf9f
+3 -6
View File
@@ -70,11 +70,7 @@ function normalizeLoadedConfig(data: unknown, source: string) {
return copy return copy
} }
async function substituteWellKnownRemoteConfig(input: { async function substituteWellKnownRemoteConfig(input: { value: unknown; dir: string; source: string }) {
value: unknown
dir: string
source: string
}) {
if (!isRecord(input.value) || typeof input.value.url !== "string") return if (!isRecord(input.value) || typeof input.value.url !== "string") return
const url = await ConfigVariable.substitute({ const url = await ConfigVariable.substitute({
@@ -543,7 +539,8 @@ export const layer = Layer.effect(
? ((yield* Effect.promise(async () => { ? ((yield* Effect.promise(async () => {
log.debug("fetching remote config", { url: remote.url }) log.debug("fetching remote config", { url: remote.url })
const response = await fetch(remote.url, { headers: remote.headers }) const response = await fetch(remote.url, { headers: remote.headers })
if (!response.ok) throw new Error(`failed to fetch remote config from ${remote.url}: ${response.status}`) if (!response.ok)
throw new Error(`failed to fetch remote config from ${remote.url}: ${response.status}`)
const data = await response.json() const data = await response.json()
return isRecord(data) && isRecord(data.config) ? data.config : data return isRecord(data) && isRecord(data.config) ? data.config : data
})) as Record<string, unknown>) })) as Record<string, unknown>)