Skip to content

Commit 845810d

Browse files
committed
feat(ai-chat): prefer img tags over div background-image
Tells the AI to default to real <img> tags so the user can swap, inspect, and resize images in the editor, only falling back to background-image when an effect genuinely requires it.
1 parent 7a0e929 commit 845810d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src-node/claude-code-agent.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,10 @@ async function _runQuery(requestId, prompt, projectPath, model, signal, locale,
667667
"live preview for both HTML/CSS/JS/SVG and Markdown. When the user asks to create " +
668668
"mockups, prototypes, or web pages, prefer vanilla HTML/CSS/JS so the live preview " +
669669
"can render and edit them — unless the user specifically requests a framework. " +
670-
"Build responsive layouts by default for web content." +
670+
"Build responsive layouts by default for web content. For images, prefer real " +
671+
"<img> tags over div background-image so the user can swap, inspect, and resize " +
672+
"them in the editor — only fall back to background-image when an effect (parallax, " +
673+
"cover-with-overlay, repeating tile) genuinely requires it." +
671674
"\n\nYou can debug and inspect the live preview directly — these tools are for " +
672675
"active iteration, not just final verification:" +
673676
"\n- takeScreenshot: see the rendered HTML preview, the rendered Markdown preview, " +

0 commit comments

Comments
 (0)