MCPcopy Create free account
hub / github.com/cortexkit/magic-context / migrate

Function migrate

packages/cli/src/commands/doctor-opencode.test.ts:20–27  ·  view source on GitHub ↗
(input: Record<string, unknown>)

Source from the content-addressed store, hash-verified

18import { clearPluginCache } from "./doctor-opencode-cache";
19
20function migrate(input: Record<string, unknown>) {
21 const logs: Array<{ level: "success" | "warn"; message: string }> = [];
22 const result = migrateLegacyAgentEnabledConfigForDoctor(input, {
23 success: (message) => logs.push({ level: "success", message }),
24 warn: (message) => logs.push({ level: "warn", message }),
25 });
26 return { config: input, logs, result };
27}
28
29describe("doctor OpenCode legacy agent enabled migration", () => {
30 it("migrates legacy enabled fields with conflict rules and warning text", () => {

Callers 1

Tested by

no test coverage detected