You can prompt the agent from the code editor for code suggestions to modify,
optimize, or add code to your app as follows:

1. To get the prompt input field, from the code editor, highlight code that you want the agent to modify, right-click in the code editor, and select **AI \> Inline edit** from the context menu (or press <kbd>CTRL+\</kbd> on Windows or <kbd>Command+\</kbd> on macOS).
2. Prompt the agent by describing how you want to modify or add to your code and press <kbd>Enter</kbd>. After the agent processes your request, you should see a code diff. With the code diff, you can review and accept only the suggestions you want.
3. Review the code diff and do one of the following:
   - Further modify the suggested code by clicking **Refine** and entering a new prompt.
   - Click **Accept Changes** to add the suggested changes to your code.

Things to try:

- "Simplify this code"
- "Make this code idiomatic"
- "Generate a new function that does \<description\>"
- "Add documentation for this code"