Skip to main content

Chat-Driven Editing

The fastest way to build with AppX is to talk to it. You describe a change, the AI reads your current code, makes a precise edit, and shows you the result on your phone — before anything is locked in.

How It Works

When you send a message targeting a screen:

  1. The AI reads the current code for that screen.
  2. It plans the change (in Plan mode) or goes straight to editing (in Direct mode).
  3. It applies a diff — surgical search‑and‑replace edits, not a full rewrite.
  4. AppX checks the result for syntax errors and missing imports.
  5. Your phone updates so you can see the change live.
  6. You decide — keep it or reject it.

Powered by the Gemini 3.1 family: a stronger model plans, and a fast model applies the edits.


Pick the Target Screen

The screen selector above the message box is the single most important control for accurate edits.

  • General mode (default) — new screens, questions about the whole app, and app‑wide changes (navigation, theme, global state).
  • Screen mode — select a screen (Home, Profile, …) to make a focused edit. The AI gets that screen's full code and won't wander into other screens.

For any UI tweak, select the screen first. It's faster and more accurate than editing from General mode.


Plan Mode vs. Direct Mode

A toggle next to the message box.

Direct mode — the AI edits immediately. Best for simple, clear changes and quick iterations.

Plan mode — the AI writes a short plan first and waits for you to approve it. Best for bigger, multi‑part changes, or when you want to confirm it understood you before it touches code.


Keep or Reject

Every edit shows up on your phone first, then waits for your call:

  • Keep it — the edit is committed to your project.
  • Try again — discard this attempt and have the AI take another pass at the same request.
  • Reject — throw the edit away; your code returns exactly to where it was.

Rejecting (or cancelling) an edit refunds the credits for it — you only pay for changes you keep.

Edit summaries

After each change, AppX drops a plain‑English summary in the chat:

  • "Moved the header to a gradient background"
  • "Rounded the card corners from 8 to 16"
  • "Added a missing SafeAreaView wrapper"

Handy for tracking what actually changed, especially on bigger edits.


Writing Good Edit Prompts

The more specific you are, the better the result.

Be specific about the change

❌ "Make it look better"
✅ "Increase the card padding to 20, add a subtle shadow, and round the corners to 12"

Point at what you see

❌ "The button is wrong"
✅ "The Submit button at the bottom is too wide — give it 16 of horizontal margin on each side"

Describe the outcome, not the code

❌ "Add a useState hook for the modal"
✅ "Add a button that opens a modal with a text field for renaming the item"

One thing at a time — break big features into steps. The AI is far more accurate with a focused request than with five unrelated changes at once.


What the AI Can See

When you target a screen, the AI works with:

  • The full code of that screen
  • Summaries of your other screens (not their full code — this keeps edits fast and cheap)
  • The file list for your project
  • The conversation so far

It can also open specific files when it needs to — for example constants/colors.ts to match your palette.


You Can Just Ask

Not every message has to change something. Questions are free:

"What's handling navigation in this project?"
"Where is the user's data stored?"
"Why does the header look different on Android?"

The AI answers from your actual code.


When an Edit Goes Sideways

AppX checks edits before they reach you, but occasionally one looks off on device. If so:

  1. Describe the problem — "that edit removed the back button on the navigation header."
  2. Let the AI fix it — it reads the current state and repairs it.
  3. Or fix it by hand in the code editor if you know exactly what's wrong.

Always glance at your phone after an edit — the device is the source of truth.


What Edits Cost

Chat edits are metered by how much work they take. A small edit is usually a credit or two; bigger changes cost a bit more. There's a minimum of 1 credit per editing turn, and retries within that same turn are free. Questions that don't change code cost nothing, and a rejected or cancelled edit is refunded.

Generating a brand‑new screen is 1 credit per screen instead (failed screens are auto‑refunded). Full rules: Credits.