feat(core): add opencode integration (#33560)
This commit is contained in:
parent
cfddb2407c
commit
c556bddda3
2 changed files with 10 additions and 28 deletions
|
|
@ -49,24 +49,16 @@ function withEnv<A, E, R>(vars: Record<string, string | undefined>, effect: () =
|
|||
const cost = (input: number, output = 0) => [{ input, output, cache: { read: 0, write: 0 } }]
|
||||
|
||||
describe("OpencodePlugin", () => {
|
||||
it.effect("registers OAuth and API key methods", () =>
|
||||
it.effect("registers account and service account methods", () =>
|
||||
Effect.gen(function* () {
|
||||
yield* addPlugin()
|
||||
expect((yield* (yield* Integration.Service).get(Integration.ID.make("opencode")))?.methods).toEqual([
|
||||
{
|
||||
id: Integration.MethodID.make("device"),
|
||||
type: "oauth",
|
||||
label: "Sign in with OpenCode",
|
||||
prompts: [
|
||||
{
|
||||
type: "text",
|
||||
key: "server",
|
||||
message: "OpenCode server",
|
||||
placeholder: "https://console.opencode.ai",
|
||||
},
|
||||
],
|
||||
label: "OpenCode Console account",
|
||||
},
|
||||
{ type: "key", label: "API key" },
|
||||
{ type: "key", label: "API key (service account)" },
|
||||
])
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue