| ... | ... | @@ -43,7 +43,6 @@ import { |
| 43 | 43 | type OpenCodeRuntimeShape, |
| 44 | 44 | } from "../opencodeRuntime.ts"; |
| 45 | 45 | import { |
| 46 | | appendOpenCodeAssistantTextDelta, |
| 47 | 46 | isOpenCodeNotFound, |
| 48 | 47 | isSameOpenCodeDirectory, |
| 49 | 48 | makeOpenCodeAdapter, |
| ... | ... | @@ -6430,20 +6429,17 @@ it.layer(OpenCodeAdapterTestLayer)("OpenCodeAdapterLive", (it) => { |
| 6430 | 6429 | }).pipe(Effect.scoped), |
| 6431 | 6430 | ); |
| 6432 | 6431 | |
| 6433 | | it.effect("appends raw assistant text deltas and reconciles part update snapshots", () => |
| 6432 | it.effect("reconciles assistant text snapshots", () => |
| 6434 | 6433 | Effect.sync(() => { |
| 6435 | 6434 | const firstUpdate = mergeOpenCodeAssistantText(undefined, "Hello"); |
| 6436 | | const overlapDelta = appendOpenCodeAssistantTextDelta(firstUpdate.latestText, "lo world"); |
| 6437 | | const secondUpdate = mergeOpenCodeAssistantText(overlapDelta.nextText, "Hellolo world"); |
| 6438 | 6435 | const appendedUpdate = mergeOpenCodeAssistantText("Hello", "Hello world"); |
| 6439 | 6436 | const changedUpdate = mergeOpenCodeAssistantText("Hello world", "Hello there"); |
| 6440 | 6437 | const staleUpdate = mergeOpenCodeAssistantText("Hello world", "Hello"); |
| 6441 | 6438 | |
| 6442 | | NodeAssert.deepEqual( |
| 6443 | | [firstUpdate.deltaToEmit, overlapDelta.deltaToEmit, secondUpdate.deltaToEmit], |
| 6444 | | ["Hello", "lo world", ""], |
| 6445 | | ); |
| 6446 | | NodeAssert.equal(secondUpdate.latestText, "Hellolo world"); |
| 6439 | NodeAssert.deepEqual(firstUpdate, { |
| 6440 | latestText: "Hello", |
| 6441 | deltaToEmit: "Hello", |
| 6442 | }); |
| 6447 | 6443 | NodeAssert.deepEqual(appendedUpdate, { |
| 6448 | 6444 | latestText: "Hello world", |
| 6449 | 6445 | deltaToEmit: " world", |