(input: Record<string, unknown>)
| 18 | import { clearPluginCache } from "./doctor-opencode-cache"; |
| 19 | |
| 20 | function 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 | |
| 29 | describe("doctor OpenCode legacy agent enabled migration", () => { |
| 30 | it("migrates legacy enabled fields with conflict rules and warning text", () => { |
no test coverage detected