Codebase Explorer
Learn how to navigate and manage your codebase context efficiently using Assembly’s Codebase Explorer
The Codebase Explorer is a powerful feature in Assembly that allows you to navigate, select, and manage the context of your codebase visually. This tool enhances your ability to work with large codebases by providing an intuitive interface for selecting relevant files and folders for your current task.
Key Features
- Visual representation of your codebase structure
- Selective context inclusion of files and folders
- Quick navigation with file search and autocomplete
- Real-time token count and size information
- Flexible selection modes for precise context management
Understanding Folder Selection
When you select a folder in Codebase Explorer, you’re not adding all of its contents to your context. Instead, you’re adding a semantic summary that describes what the folder contains and its purpose in the codebase. This is much more token-efficient than including all individual files.
For example:
- Selecting the “utils/” folder adds a summary like “This folder contains utility functions for date formatting, string manipulation, and common mathematical operations”
- Selecting individual files within that folder would add their actual contents to your context
Using Codebase Explorer
Accessing Codebase Explorer
Open Context Panel
In your Assembly session, navigate to the context panel.
Launch Codebase Explorer
Click the graph icon in the top right corner to open the Codebase Explorer.
Navigating Your Repositories
Selecting Files and Folders
Basic Selection
Click on a file to toggle it. Click on a folder to toggle visibility of its children.
Precise Selection
Command+click (or Ctrl+click on Windows) on a folder to toggle its summary without affecting its children.
Folder Selection
Shift+click a folder to select summaries for it and all its children.
Remove Descendants
Option+click (or Alt+click on Windows) a folder to remove an entire folder and its descendants from selection.
Pending Changes
The right panel shows a list of all pending changes to your context.
Apply or Undo
Use the “Apply” button to apply all pending changes or “Undo All” to remove all selections.
Remember: Selecting a folder adds a high-level description of its purpose and contents, while selecting individual files adds their actual contents to the context.
Quick Navigation
Viewing File and Folder Information
Managing Context Size
Monitor Token Usage
Keep an eye on the token count displayed at the bottom of the interface.
Remove Pending Changes
Click on an item in the right panel to remove it from pending changes.
Changes are not applied automatically. You must click “Apply” to update your session’s context with the new selections.
Best Practices
- Start Broad, Then Refine: Begin by selecting high-level folders to get semantic summaries of different areas of your codebase. Then narrow down to specific files when you need their actual contents.
- Use Precise Selection: Leverage Command+click for granular control over your context.
- Balance Context Size: Keep an eye on the token count to ensure you’re not overloading your context.
- Utilize Search: For large codebases, use the search function to quickly locate relevant files.
- Regular Updates: As your task evolves, revisit Codebase Explorer to adjust your context.