Codebase Indexing
Learn how to manage and optimize codebase indexing for better AI assistance
When you open a project in Alex Sidebar, it automatically analyzes and indexes your code files to better understand your codebase.
Think of this like creating a smart map of your code - Alex reads through each file and then can utilize this information to provide more accurate and relevant suggestions when going through your queries.
What is Indexing?
Indexing is the process where Alex:
- Scans through all your code files
- Creates special embeddings for each file
- Stores these embeddings to quickly reference later
Why is it Important?
This indexing helps Alex:
- Give you more accurate code suggestions
- Better understand the context when you ask questions
- Find relevant code examples from your own project
- Make smarter recommendations based on your actual codebase
Code Maps
Building on top of basic indexing, Alex now automatically parses your Swift project and constructs a “Code Map” for the files you are chatting about. This means Alex has an understanding of how files interact with each other, resulting in better code generation.
When you start a chat, Alex:
- Analyzes file dependencies and imports
- Maps class and type relationships
- Understands protocol conformances
- Tracks function calls between files
This deeper understanding helps Alex:
- Generate more accurate code suggestions
- Provide better refactoring recommendations
- Maintain consistency across related files
- Respect your project’s architecture
Code Maps are enabled by default for all chats, so you don’t need to do anything extra to get these benefits!
Managing Indexes
Access Index Management
Open the “Indexed Files” section in Settings to access the indexing UI.
Here you can:
- View all indexed files
- Check indexing status
- Manage existing indexes
- Set custom override paths
Index Operations
The following operations are available:
- Reload Index: Initialize or refresh indexing for files
- Delete Index: Remove existing index data
- Set override path: Manually specify a folder path to index
Automatic Synchronization
Your codebase index automatically updates when:
- Files are modified
- New files are added
- Files are deleted
- Git branches are switched
This ensures Alex Sidebar always has the most up-to-date information about your codebase!
Was this page helpful?