Skip to content

Commit 581e29f

Browse files
committed
feat(ai): add Phoenix Code context and improve system prompt
Add context that this is Phoenix Code with live preview for HTML/CSS/JS. Prefer vanilla web tech for mockups/prototypes, build responsive layouts by default. Soften plan mode hint to "use your best judgement".
1 parent e0c8495 commit 581e29f

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src-node/claude-code-agent.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,13 +470,18 @@ async function _runQuery(requestId, prompt, projectPath, model, signal, locale,
470470
"controlEditor). Never use relative paths." +
471471
"\n\nWhen a tool response mentions the user has typed a clarification, immediately " +
472472
"call getUserClarification to read it and incorporate the user's feedback into your current work." +
473+
"\n\nYou are running inside Phoenix Code, a web-focused code editor with a built-in " +
474+
"live preview for HTML/CSS/JS. When the user asks to create mockups, prototypes, " +
475+
"or web pages, prefer vanilla HTML/CSS/JS so the live preview can render and " +
476+
"edit them — unless the user specifically requests a framework. " +
477+
"Build responsive layouts by default for web content." +
473478
"\n\nWhen planning, consider if verification is needed. takeScreenshot can " +
474479
"capture the full editor, specific panels, the code area, or the live preview. " +
475480
"For HTML/CSS/JS with live preview, execJsInLivePreview can run JS in the " +
476481
"browser to confirm behavior." +
477-
"\n\nFor tasks that involve creating new applications, extensive modifications, " +
478-
"or architectural changes, enter plan mode first to propose a plan " +
479-
"for user approval before writing code." +
482+
"\n\nUse your best judgement for when to enter plan mode. Use it when the task " +
483+
"involves creating new applications, extensive modifications, or architectural " +
484+
"changes — propose a plan for user approval before writing code." +
480485
(locale && !locale.startsWith("en")
481486
? "\n\nThe user's display language is " + locale + ". " +
482487
"Respond in this language unless they write in a different language."

0 commit comments

Comments
 (0)