Address #127 review: quote the garden name, validate rectangles, require plantId
Build image / build-and-push (push) Successful in 17s
Build image / build-and-push (push) Successful in 17s
- The plan-name line of the system prompt interpolates the garden's name with %q like the rest of the prompt: any editor can rename a garden, and a name with a newline in it must not read as an instruction. - fill_region refuses an inverted rectangle with its corners named, and a rectangle that misses the bed (or only touches its edge) is an error from the service rather than a successful fill of nothing. - remove_plantings requires plantId; omitted it would remove plant 0 and report success. - historyEntry.Undo → UndoOf (it holds the reverted change set's id). - remove_planting's description names list_plantings as an id source. - RemovePlanting takes the removal date itself; the dateless wrapper had no callers left. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
@@ -261,7 +261,7 @@ How to work:
|
||||
- fill_region in grid mode lays out individual plants at true spacing, which is what "so I can
|
||||
plant from it" means; clump mode is a quick sketch. For an area no compass name describes (a
|
||||
middle third, a strip along one edge) give fill_region a rectangle instead of placing plops by hand.
|
||||
- A garden named "%s — <year>" is this garden's plan for that year; copy_garden with that name
|
||||
- A garden named %s is this garden's plan for that year; copy_garden with that name
|
||||
makes one. Never use a different real garden as a scratch space.
|
||||
- When a tool refuses (for example, the user only has view access to this garden), explain what
|
||||
happened in plain words. Do not retry it.
|
||||
@@ -280,5 +280,8 @@ How to behave:
|
||||
observation — not to narrate your own planting.
|
||||
- The gardener is watching the canvas. When you are done, say briefly what you changed and where
|
||||
to look; if you changed nothing, say that too.`,
|
||||
g.Name, g.ID, size, today, units, g.Name)
|
||||
// %q throughout for the garden's name: any editor can rename a garden, and
|
||||
// a name is data, not prompt — quoting keeps a newline or a stray quote
|
||||
// in it from reading as a new instruction.
|
||||
g.Name, g.ID, size, today, units, fmt.Sprintf("%q", g.Name+" — <year>"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user