mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix issue with provider cache
This commit is contained in:
parent
8f852b396f
commit
b8bbee4718
1 changed files with 2 additions and 2 deletions
|
|
@ -232,8 +232,8 @@ export namespace Provider {
|
|||
const s = await state()
|
||||
const existing = s.sdk.get(provider.id)
|
||||
if (existing) return existing
|
||||
const [pkg, version] = provider.npm ?? provider.id
|
||||
const mod = await import(await BunProc.install(pkg, version))
|
||||
const pkg = provider.npm ?? provider.id
|
||||
const mod = await import(await BunProc.install(pkg, "latest"))
|
||||
const fn = mod[Object.keys(mod).find((key) => key.startsWith("create"))!]
|
||||
const loaded = fn(s.providers[provider.id]?.options)
|
||||
s.sdk.set(provider.id, loaded)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue