AI Troubleshooting

What to do when the AI gets stuck or provides the same wrong answer.

1. Rephrase Your Request
The AI might be misinterpreting a specific keyword. Try explaining what you want in a completely different way.
  • Be more specific: Instead of "fix the button," say "The 'Submit' button in 'src/components/my-form.tsx' should be blue and say 'Send' instead of 'Submit'."
  • Be more general: Instead of a very specific implementation, describe the end goal. "I want a user profile page with an avatar and a name" instead of "Add a div with a border-radius of 50%..."
  • Provide context: Mention the file name or the high-level goal you're trying to achieve. "I'm building a login form and I'm getting a validation error."
2. Point Out the Error Explicitly
If you see a specific error message, copy and paste it directly into the chat. This gives the AI a very strong signal about what is wrong.

For example, you can say:
I see this error: 'TypeError: Cannot read properties of undefined (reading 'map')' in the browser console.

3. Break Down the Problem
Instead of asking for a large, complex feature in one go, ask for it in smaller, incremental steps.
  • First, ask it to create the basic component structure.
  • Next, ask it to add the state management.
  • Then, ask it to add the styling.
  • Finally, ask it to implement the logic.