Skip to content

Commit d38b281

Browse files
authored
include remove op in system prompt (#73)
1 parent 39fcc19 commit d38b281

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/core/src/catalog.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,13 +502,15 @@ export function generateSystemPrompt<
502502
lines.push(
503503
'{"op":"add","path":"/elements/key","value":{"key":"...","type":"...","props":{...},"children":[...]}}',
504504
);
505+
lines.push('{"op":"remove","path":"/elements/key"}');
505506
lines.push("");
506507

507508
// Rules
508509
lines.push("RULES:");
509510
const baseRules = [
510511
"First line sets /root to root element key",
511512
"Add elements with /elements/{key}",
513+
"Remove elements with op:remove - also update the parent's children array to exclude the removed key",
512514
"Children array contains string keys, not objects",
513515
"Parent first, then children",
514516
"Each element needs: key, type, props",

0 commit comments

Comments
 (0)