Updating Your Project with AI
Navigating Project Files
From the main project screen within Bulifier AI, you can see the file and folder structure of your project. Tapping on a file allows you to view its contents and, if needed, make direct manual edits using the built-in code editor.
Using the AI Button for Updates
To make changes to your existing code using AI assistance, navigate back to the main project screen and tap the main "AI" button again. This will open the AI interface, offering different modes (tabs) for interaction:
1. Code Tab
The "Code" tab is designed for prompts that might require awareness of the entire project's context.
- How it Works: When you submit a prompt here, Bulifier AI gathers the content of most of your project files (excluding those listed in
context.gitignore
- see Project Structure) and sends this large context along with your prompt to the AI model. - Use Cases: Good for broad refactoring requests or when you're unsure which files need modification.
- Considerations: Because it sends a lot of data, this method can be slower and consume more Bulifier Tokens (see Settings) compared to the Chat tab.
- The AI will attempt to directly modify the relevant project files based on your instructions.
2. Chat Tab (Recommended)
The "Chat" tab provides a more conversational and generally more efficient way to iterate on your code.
- How it Works: Instead of sending the whole project, the AI first analyzes your prompt to identify the most relevant files or code sections (context discovery). It then focuses its analysis and modifications on that specific context.
- Advantages: Usually faster to get a response, consumes fewer tokens (cheaper), and often yields higher-quality, targeted results because the AI isn't overwhelmed by irrelevant code.
- Interactive Feedback: The Chat interface often provides explanations from the AI about the changes it's proposing or making, helping you understand the modifications and learn more about your codebase.
- Follow-up Requests: You can continue the conversation within the same chat thread to refine the previous changes or ask related questions. Note that follow-up prompts in the *same chat* typically operate on the *original context* identified for that conversation.
- Starting New Topics: If you want to shift focus to a completely different feature or part of the codebase, it's best to start a *new chat conversation* by clicking the "+" or "New Chat" button. This allows the AI to perform a fresh context discovery relevant to your new request.
Using Console Logs with AI
Don't forget the console! If your app throws an error or behaves unexpectedly during testing (see Running and Testing), copy the relevant error message or log output from the console.
Paste this copied information directly into your AI prompt (especially effective in the Chat tab). Providing the exact error message gives the AI valuable information to help diagnose the problem and suggest a fix. Example prompt: "My game crashes when the ball hits the top boundary. The console shows this error: [paste error message here]".