This commit is contained in:
Vendored
+4
-19
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Agent, Model, Provider } from "@opencode/plugin/effect";
|
||||
import { Plugin, Agent } from "@opencode/plugin/effect";
|
||||
import { Rpc } from "@opencode/plugin/rpc";
|
||||
import { Session } from "@opencode/schema/session";
|
||||
import { SessionMessage } from "@opencode/schema/session-message";
|
||||
@@ -6,7 +6,7 @@ import { Tool } from "@opencode/schema/tool";
|
||||
import { Cause, Effect } from "effect";
|
||||
import { z } from "zod";
|
||||
import { appendFile } from "node:fs/promises";
|
||||
import plugin from "../../src/index.js";
|
||||
import multiWork from "../../src/multi-work.js";
|
||||
|
||||
const probe = Rpc.define({
|
||||
id: "multi-work-test",
|
||||
@@ -24,25 +24,10 @@ const probe = Rpc.define({
|
||||
});
|
||||
|
||||
export default Plugin.define({
|
||||
id: plugin.id,
|
||||
id: multiWork.id,
|
||||
effect: (context) =>
|
||||
Effect.gen(function* () {
|
||||
const providerID = Provider.ID.make("fixture");
|
||||
yield* context.provider.transform((editor) =>
|
||||
editor.add({
|
||||
info: {
|
||||
...Provider.Info.empty(providerID),
|
||||
name: "Isolated fixture",
|
||||
activation: "enabled",
|
||||
package: "@opencode/ai/providers/openai-compatible",
|
||||
settings: { baseURL: process.env.FIXTURE_MODEL_URL! },
|
||||
},
|
||||
models: ["gpt-6-luna", "gpt-6.1-sol", "gpt-6-astra"].map((id) =>
|
||||
Model.Info.default(providerID, Model.ID.make(id)),
|
||||
),
|
||||
}),
|
||||
);
|
||||
yield* plugin.effect({ ...context, options: { provider: "fixture" } });
|
||||
yield* multiWork.effect(context);
|
||||
let delegate: Tool.Info | undefined;
|
||||
yield* context.tool.transform((editor) => {
|
||||
delegate = editor.get("subagent");
|
||||
|
||||
Reference in New Issue
Block a user