The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { assert, it } from "@effect/vitest"; |
| 2 | |
| 3 | import { shouldPrepareLegacyImportHandoff } from "./Orchestrator.ts"; |
| 4 | |
| 5 | it("reissues imported context until a V2 run completes", () => { |
| 6 | assert.isTrue( |
| 7 | shouldPrepareLegacyImportHandoff({ |
| 8 | historyOrigin: "v1_import", |
| 9 | hasCompletedRun: false, |
| 10 | legacyImportItemCount: 2, |
| 11 | }), |
| 12 | ); |
| 13 | assert.isFalse( |
| 14 | shouldPrepareLegacyImportHandoff({ |
| 15 | historyOrigin: "v1_import", |
| 16 | hasCompletedRun: false, |
| 17 | legacyImportItemCount: 2, |
| 18 | hasNativeHistory: true, |
| 19 | }), |
| 20 | ); |
| 21 | assert.isFalse( |
| 22 | shouldPrepareLegacyImportHandoff({ |
| 23 | historyOrigin: "v1_import", |
| 24 | hasCompletedRun: true, |
| 25 | legacyImportItemCount: 2, |
| 26 | }), |
| 27 | ); |
| 28 | assert.isFalse( |
| 29 | shouldPrepareLegacyImportHandoff({ |
| 30 | historyOrigin: undefined, |
| 31 | hasCompletedRun: false, |
| 32 | legacyImportItemCount: 2, |
| 33 | }), |
| 34 | ); |
| 35 | assert.isFalse( |
| 36 | shouldPrepareLegacyImportHandoff({ |
| 37 | historyOrigin: "v1_import", |
| 38 | hasCompletedRun: false, |
| 39 | legacyImportItemCount: 0, |
| 40 | }), |
| 41 | ); |
| 42 | }); |