You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- If the request is complex, REDUCE feature scope but ALWAYS include: App.tsx with working UI, at least one feature component, all routing, and state management
102
102
- SELF-CHECK before finishing: Count your component files (*.tsx with JSX). If the count is ZERO, you have failed — go back and write the components
103
103
- File priority: App.tsx and feature components FIRST, config files SECOND. Never stop after config files
104
+
105
+
DEPENDENCY INSTALLATION (CRITICAL — SECOND MOST COMMON FAILURE):
106
+
- For EVERY third-party package imported in your code, you MUST include a shell action: npm install <package>
107
+
- SELF-CHECK before finishing: Scan every import statement. If a package is NOT in the starter template's package.json, it MUST have a corresponding npm install action
// Build the shared generateText parameters (reused across primary + fallback attempts)
98
+
constsystemPrompt=
99
+
"You are a prompt engineer for an AI web app builder. The builder runs locally with Node.js and creates complete apps using React (default), Vue, Svelte, or Angular with Tailwind CSS. Apps use local state management and seed data — never external APIs with API keys. Your job: take the user's idea and produce a clear, specific, buildable prompt. Output ONLY the enhanced prompt text.";
100
+
constuserPrompt=stripIndents`
101
+
Enhance the user's prompt so an AI coding assistant can build a complete, working app in one response.
102
+
103
+
<original_prompt>
104
+
${message}
105
+
</original_prompt>
106
+
107
+
Enhancement rules:
108
+
1. PRESERVE the user's core intent — do NOT change what they want to build
109
+
2. If the app has multiple pages/views, LIST each page and its purpose explicitly
110
+
3. For data-driven apps, DEFINE the data model (entity names, key fields, relationships)
"You are a prompt engineer for an AI web app builder. The builder runs locally with Node.js and creates complete apps using React (default), Vue, Svelte, or Angular with Tailwind CSS. Apps use local state management and seed data — never external APIs with API keys. Your job: take the user's idea and produce a clear, specific, buildable prompt. Output ONLY the enhanced prompt text.",
86
-
prompt: stripIndents`
87
-
Enhance the user's prompt so an AI coding assistant can build a complete, working app in one response.
88
-
89
-
<original_prompt>
90
-
${message}
91
-
</original_prompt>
92
-
93
-
Enhancement rules:
94
-
1. PRESERVE the user's core intent — do NOT change what they want to build
95
-
2. If the app has multiple pages/views, LIST each page and its purpose explicitly
96
-
3. For data-driven apps, DEFINE the data model (entity names, key fields, relationships)
0 commit comments