1
0
Fork 0
polaris-task-force/src
Z8MB1E 3d73aee193 fix(ai-compose): one prose output contract for every field prompt
Rich text fields received the plugin's richText system prompt, which
demanded lexical JSON and a blog layout of [paragraph]/[heading] markers,
next to an instruction asking for plain prose. The model answered by
arguing about the conflict, and that argument was saved into the field.
Text fields had the mirror problem: a prose instruction sent over a
transport that forced JSON.

Every field now asks for plain prose and nothing else, and the handler
assembles the JSON the Compose client already parses:

- src/lib/ai/composeSystem.ts owns the shared rules, keeps only the
  plugin's [[[BLOCK_<n>]]] echo instruction for richText, and wraps prose
  into lexical JSON or a single field value.
- payload.config.ts routes every wrappable schema through
  generatePlainText; streamObject stays only as the fallback for shapes
  prose cannot fill, such as a hasMany array.
- Truncated output reaches the client again (finish_reason length was
  swallowed on the prose path).

Adds tests/int/ai-compose-system.int.spec.ts (10 cases) and picks up the
generated payload-types.ts drift for the model field description.
2026-10-19 13:03:33 -04:00
..
app feat(arena): websocket match replication for Ordnance Disposal 2026-10-19 12:27:17 -04:00
arena feat(arena): websocket match replication for Ordnance Disposal 2026-10-19 12:27:17 -04:00
assets/images feat: application staging deployment (ensure better commits after this) 2025-12-15 01:14:30 -05:00
bot feat(bot): add edit modal to /changelog for last-minute copy tweaks 2026-10-15 12:34:18 -04:00
collections feat(minigames): add Ordnance Disposal (bomperator) multiplayer drill 2026-10-16 00:32:52 -04:00
components feat(arena): websocket match replication for Ordnance Disposal 2026-10-19 12:27:17 -04:00
hooks feat(minigames): add Ordnance Disposal (bomperator) multiplayer drill 2026-10-16 00:32:52 -04:00
lib fix(ai-compose): one prose output contract for every field prompt 2026-10-19 13:03:33 -04:00
migrations feat(ai): configure Compose model and label via env 2026-10-19 12:13:22 -04:00
permissions feat(analytics): add first-party analytics collector, SDK, rollups, and admin dashboard 2026-10-14 12:12:53 -04:00
scripts feat(analytics): add first-party analytics collector, SDK, rollups, and admin dashboard 2026-10-14 12:12:53 -04:00
tools feat(garage): add vehicle bay schema fields, geometry helpers, and backfill 2026-10-13 16:02:58 -04:00
utils feat(minigames): add Ordnance Disposal (bomperator) multiplayer drill 2026-10-16 00:32:52 -04:00
payload-generated-schema.ts feat(ai): configure Compose model and label via env 2026-10-19 12:13:22 -04:00
payload-types.ts fix(ai-compose): one prose output contract for every field prompt 2026-10-19 13:03:33 -04:00
payload.config.ts fix(ai-compose): one prose output contract for every field prompt 2026-10-19 13:03:33 -04:00