mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-13 15:44:56 +00:00
16 lines
465 B
TypeScript
16 lines
465 B
TypeScript
import { Effect } from "effect"
|
|
import { PluginV2 } from "../../plugin"
|
|
|
|
export const VenicePlugin = PluginV2.define({
|
|
id: PluginV2.ID.make("venice"),
|
|
effect: Effect.gen(function* () {
|
|
return {
|
|
"aisdk.sdk": Effect.fn(function* (evt) {
|
|
if (evt.package !== "venice-ai-sdk-provider") return
|
|
const mod = yield* Effect.promise(() => import("venice-ai-sdk-provider"))
|
|
evt.sdk = mod.createVenice(evt.options)
|
|
}),
|
|
}
|
|
}),
|
|
})
|