This document shows you how to use Gemini Code Assist in Project IDX to generate code with the example prompt # Function to perform binary search on a list of numbers
inside a Python file. You can also select a part of your code and then prompt Gemini Code Assist for help through the chat feature, and receive and accept or reject code suggestions while you code.
Create a new or use an existing code file. If you're using the Python (Flask) sample, you can do this in your main.py
file: navigate to Explorer > src > and open the main.py
file.
In your code file, on a new line, enter # Function to perform binary search on a list of numbers
, and then press Enter (for Windows and Linux) or Return (for macOS).
Next to your prompt text in the Python file, Gemini Code Assist generates the code in the form of ghost text.