Skip to content

Commit f54fe51

Browse files
committed
docs(plugin-chatbot): changeset and plan-card paragraph for the iterate_or_new question
Claude-Session: https://claude.ai/code/session_01Utp6Ca9ZbSdPg2iuzBYA3d Co-authored-by: Claude <noreply@anthropic.com>
1 parent aaf9869 commit f54fe51

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/plugin-chatbot': patch
3+
'@object-ui/app-shell': patch
4+
'@object-ui/i18n': patch
5+
---
6+
7+
fix(plugin-chatbot): a plan that overlaps an existing app asks whether to extend it or build a new one, instead of offering Build it
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: none
11+
12+
When `propose_blueprint` finds that the plan overlaps an app the user already has, its result carries `decision: 'iterate_or_new'` and the overlapping app in `existingAppOverlap`. The chat used to draw that result as an ordinary plan card with a "Build it" button, so one click could build a duplicate of the existing app.
13+
14+
- **The question.** `detectProposedPlan` lifts the decision as `ProposedPlan.iterateOrNew`, with the app's `name` and `label` from `existingAppOverlap`. The plan card keeps its rows and, in place of "Build it" / "Adjust", asks whether to keep improving that app or build a separate one. Each of the two choices sends its answer as a chat message. A result that names no object still gets the question, never the fallback "Build it" card; an overlap that names no app gets the question without a name and a reply hint.
15+
- **The answers follow the conversation.** `ChatbotEnhanced` takes two new optional props, `planExtendExistingMessage(app)` and `planBuildNewAppMessage`. The console resolves both by the conversation's language, like the plan card's other outbound messages (`console.ai.planExtendExistingMessage` and `console.ai.planBuildNewAppMessage`, in the `en` and `zh` packs only). Neither reads as approval to the confirm gate.
16+
- **After a reload.** Server history re-parses the stored result. The message cache now writes `decision` and `existingAppOverlap` back into its compact plan envelope, so a cache-fallback reload asks the question too.
17+
- **Labels.** `chatbot.plan.iterateOrNew.*` (question, choices, reply hint) in all ten packs.

‎content/docs/frontend/plugins/plugin-chatbot.mdx‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,13 @@ results declare. The plan card (`propose_blueprint`) reads the result's
496496
dashed chip for a field the agent added on its own, the record's name field,
497497
one line per view, the assumptions, the sample data the build will stage, and
498498
how the build will land (`posture`: live at once, or saved as a draft).
499+
A plan whose result says `decision: 'iterate_or_new'` overlaps an app the user
500+
already has (`existingAppOverlap`, by `name` and `label`). Its card draws no
501+
"Build it" button: in its place it asks whether to keep improving that app or
502+
build a separate one, naming the app, and each choice sends its answer as a
503+
chat message (`planExtendExistingMessage(app)` and `planBuildNewAppMessage`,
504+
which the console picks by the conversation's language). The question survives
505+
a reload from server history and from the console's message cache.
499506
The result card (`apply_blueprint`, then a later `verify_build` in the same
500507
turn) reads `checklist`: a passed/total chip, the verified lines in two
501508
columns, and the app and package that "Open app" and "View in Studio" open.

0 commit comments

Comments
 (0)