mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-29 15:50:21 +00:00
17 lines
536 B
TypeScript
17 lines
536 B
TypeScript
import { Effect } from "effect"
|
|
import { PluginV2 } from "../../plugin"
|
|
import { ProviderV2 } from "../../provider"
|
|
|
|
export const ZenmuxPlugin = PluginV2.define({
|
|
id: PluginV2.ID.make("zenmux"),
|
|
effect: Effect.gen(function* () {
|
|
return {
|
|
"provider.update": Effect.fn(function* (evt) {
|
|
if (evt.provider.id !== ProviderV2.ID.make("zenmux")) return
|
|
evt.provider.options.headers["HTTP-Referer"] ??= "https://opencode.ai/"
|
|
evt.provider.options.headers["X-Title"] ??= "opencode"
|
|
}),
|
|
}
|
|
}),
|
|
})
|