import { assert, assertStringIncludes } from "@std/assert"; import { withDom } from "@berry/util/dom.ts"; import { event } from "./event.tsx"; Deno.test("subagent lifecycle events render without being mistaken for model configuration", () => withDom(() => { const lifecycle = event({ ext: "subagent", event: { type: "spawned", conversationId: 2, task: "check the build" }, }); assertStringIncludes(lifecycle!.textContent!, "spawned"); assertStringIncludes(lifecycle!.textContent!, "2"); assert(!lifecycle!.textContent!.includes("check the build")); const models = event({ ext: "subagent", event: { type: "models", models: [{ provider: "faux", modelId: "worker" }] }, }); assertStringIncludes(models!.textContent!, "faux/worker"); }));