OpenGenerativeUI icon indicating copy to clipboard operation
OpenGenerativeUI copied to clipboard

fix: edit existing HTML instead of regenerating from scratch

Open jerelvelarde opened this issue 7 months ago • 0 comments

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 mode parameter ("new" | "edit") to plan_visualization tool 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_visualization with mode="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

jerelvelarde avatar Apr 06 '26 21:04 jerelvelarde