#432

fix(core): keep patch indentation out of streamed prose

OpenJassi2004wants to merge intofrom

Fixes #422.

An indented JSONL patch currently leaves its leading whitespace in the prose: the issue's input produces "x\n y" instead of "x\ny". Hold leading whitespace until the line can be classified, then discard it with patch lines and spec fence delimiters or emit it with ordinary text.

Adds regression coverage for spaces, tabs, mixed and Unicode whitespace, chunk boundaries, stream closure, indented fences, and preservation of ordinary indentation and blank lines. Updates the core README, API reference, skill, and docs parity fixture.

Validation:

  • pnpm test — 1,275 tests passed. The new regression file fails on unmodified main.
  • pnpm type-check, pnpm lint, package builds, and pnpm run version:check passed.
  • Web dependency build, pnpm --filter web build, and pnpm --filter web test:routes passed (122 route checks).
  • Built-package AI SDK probe preserves exact prose and text/spec interleaving for single and character-sized chunks.
  • Applied the source patch cleanly alongside #426 and ran both transform test files: 143 tests passed.

Activity

2
vercel[bot]18d ago

@Jassi2004 is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.