design-parser.ts gains tryParseAllElementToolOutputs(raw) → returns every `<op_tool>` tag in emit order (element-tool or batch-design-dsl shape). Single-tag helper stays for orchestrator's current path; this one's for future prompts that emit multiple tags per response. element-tools-dispatcher.ts gains dispatchElementToolCalls(shapes, ctx) — wraps the whole loop in ONE startBatch/endBatch pair so N tags collapse to one undo entry. Per-shape results preserve emit order. Individual shape failure does NOT abort the batch (matches pen-mcp handleBatchDesign's "collect-errors-keep-going" philosophy; the AI's later tags may depend on earlier successful inserts). BatchDispatchResult.status rolls up to applied / partial / all-failed / empty. 5 new unit tests: empty list skips batch, 3-successful one undo entry, partial status, all-failed status, result order matches input order. Full repo: 2043 tests across 211 files. |
||
|---|---|---|
| .. | ||
| public | ||
| server | ||
| src | ||
| CLAUDE.md | ||
| components.json | ||
| dev.ts | ||
| package.json | ||
| tsconfig.json | ||
| vite.config.ts | ||