OpenGenerativeUI
OpenGenerativeUI copied to clipboard
fix: edit existing HTML instead of regenerating from scratch
Summary
- Adds edit-vs-regenerate decision logic to the agent's system prompt so it modifies previous HTML in place when the user requests changes to an existing visualization
- Adds a
modeparameter ("new"|"edit") toplan_visualizationtool as a forcing function for the edit/new decision - Adds editing guidance to the master playbook skill for surgical, minimal changes
Closes #77
Test plan
- [ ] Generate a visualization (e.g., "Create a bar chart showing quarterly revenue")
- [ ] Send a follow-up edit (e.g., "Change the colors to blue and add a title") — verify agent calls
plan_visualizationwithmode="edit"and modifies rather than regenerates - [ ] Send an unrelated request (e.g., "Show me a pie chart of market share") — verify agent generates fresh with
mode="new" - [ ] Confirm no regressions on first-time visualization generation
🤖 Generated with Claude Code