@avocadostudio-ai/orchestrator-core 0.11.7 → 0.11.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -174,50 +174,37 @@ export function postEditSuggestions(args) {
|
|
|
174
174
|
return;
|
|
175
175
|
suggestions.push(value);
|
|
176
176
|
};
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
/*
|
|
178
|
+
* No bare "Edit <thing>" chips.
|
|
179
|
+
*
|
|
180
|
+
* This branch used to emit "Edit heading", "Edit CTA", "Edit Banner",
|
|
181
|
+
* "Edit cards" after every edit. Clicking one sends that literal string to
|
|
182
|
+
* the planner, which knows the field and not the value — so the only possible
|
|
183
|
+
* answer is "edit it to what?". Three clean-room runs measured the same
|
|
184
|
+
* outcome: **zero operations**, and on a keyed plan about $0.012 and five
|
|
185
|
+
* seconds to be asked a question the chip existed to avoid.
|
|
186
|
+
*
|
|
187
|
+
* There is no repair for the shape. A suggestion is a sentence the product is
|
|
188
|
+
* offering to run, and "change this field to something" is not a sentence
|
|
189
|
+
* anybody can run — only the person typing knows the something. The chips
|
|
190
|
+
* that survive below are the ones that name a complete action: add a section,
|
|
191
|
+
* add another item, generate an image.
|
|
192
|
+
*
|
|
193
|
+
* The `isImageUpdate` special-casing went with them; it chose *which*
|
|
194
|
+
* underspecified chip to show, which was never the problem.
|
|
195
|
+
*/
|
|
179
196
|
for (const op of plan.ops) {
|
|
180
|
-
if (op.op === "
|
|
181
|
-
const block = current.blocks.find((b) => b.id === op.blockId);
|
|
182
|
-
if (block) {
|
|
183
|
-
if (isImageUpdate) {
|
|
184
|
-
// After image updates, suggest content edits relevant to the block
|
|
185
|
-
const blockType = block.type;
|
|
186
|
-
if (blockType === "CardGrid" || blockType === "Card") {
|
|
187
|
-
pushUniqueSuggestion("Edit cards");
|
|
188
|
-
pushUniqueSuggestion("Update links");
|
|
189
|
-
}
|
|
190
|
-
else if (blockType === "FeatureGrid") {
|
|
191
|
-
pushUniqueSuggestion("Edit features");
|
|
192
|
-
}
|
|
193
|
-
else if (blockType === "Hero") {
|
|
194
|
-
pushUniqueSuggestion("Edit heading");
|
|
195
|
-
pushUniqueSuggestion("Edit CTA");
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
pushUniqueSuggestion(`Edit ${blockType}`);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
const patchKeys = Object.keys(op.patch);
|
|
203
|
-
const otherKeys = editablePropsFromBlock(block)
|
|
204
|
-
.filter((k) => !patchKeys.includes(k) && !NON_CONTENT_PROP_KEYS.has(k));
|
|
205
|
-
for (const key of otherKeys.slice(0, 2)) {
|
|
206
|
-
pushUniqueSuggestion(promptFromPropKey(key, block.type));
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
else if (op.op === "create_page") {
|
|
197
|
+
if (op.op === "create_page") {
|
|
212
198
|
pushUniqueSuggestion("Generate image");
|
|
213
199
|
}
|
|
214
200
|
else if (op.op === "add_block") {
|
|
201
|
+
// Only the curated, complete follow-ups. A block with none falls through
|
|
202
|
+
// to the forward-looking section nudges below rather than to
|
|
203
|
+
// `Edit <Type>`, which is the same dead end as the branch above.
|
|
215
204
|
const followups = ADD_BLOCK_FOLLOWUPS[op.block.type];
|
|
216
205
|
if (followups)
|
|
217
206
|
for (const f of followups)
|
|
218
207
|
pushUniqueSuggestion(f);
|
|
219
|
-
else
|
|
220
|
-
pushUniqueSuggestion(`Edit ${op.block.type}`);
|
|
221
208
|
}
|
|
222
209
|
else if (op.op === "remove_block") {
|
|
223
210
|
if (!hasType("CTA"))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avocadostudio-ai/orchestrator-core",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./package.json": "./package.json",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"openai": "^4.87.1",
|
|
23
23
|
"sharp": "^0.35.4",
|
|
24
24
|
"zod": "^4.3.6",
|
|
25
|
-
"@avocadostudio-ai/migration-sdk": "^0.11.
|
|
26
|
-
"@avocadostudio-ai/shared": "^0.11.
|
|
25
|
+
"@avocadostudio-ai/migration-sdk": "^0.11.9",
|
|
26
|
+
"@avocadostudio-ai/shared": "^0.11.9"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@anthropic-ai/claude-agent-sdk": "^0.3.220",
|