Prompt Bhai and Review Changes
Break a Studio build into chat turns, point Bhai at relevant files, and review or undo its edits.
The AI chat pane is where you work with Bhai to build and refine a Cloud Studio project. Use it when you can describe what should change, then check the result in the app. A file reference gives Bhai a starting point, but it isn’t a restriction on which files the agent can change.
Build the app one change at a time
Start with a layout you can inspect. Then refine a component or add an interaction in a separate turn. Waiting to see each result makes it easier to tell which change introduced a problem and which turn to undo.
Build the core layout
Ask: “Build a cryptocurrency price dashboard with four summary cards and a chart using Recharts.” Open Preview and check that the cards and chart appear before you add behavior.
Refine one component
Ask: “Show the 24-hour price change as a percentage on each card. Use a green badge for positive values and a red badge for negative values.” Check that the sign and color agree for both cases.
Add an interaction
Ask: “Add search and a category filter to the coin table.” Try both controls together before starting another change.
Give Bhai the relevant context
Name the project file or component in the prompt, such as src/components/Header.tsx or src/lib/db.ts. Tell Bhai what should stay the same as well as what to edit. For example, ask it to change the header’s mobile layout without changing its desktop layout or navigation links.
When you’re building a form or writing a query against D1 or Postgres, include the relevant schema: the tables, columns, and relationships the change needs. That gives Bhai the field names and types instead of leaving it to infer them from the UI.
Review the diff before the next prompt
When Bhai changes files, the chat shows which files it touched and how many lines it changed. Expand the files changed summary to review the patches, then test the behavior in Preview. Check for changes outside the scope you asked for, even if you gave Bhai a specific path to start with.
If you don’t want to keep a turn, use Undo in its message header when the control is available. This restores the project files to their state before that prompt, rather than removing a single line from the diff. Verify the restored result in Preview before you try a different prompt.