1. Adding Context from Your Codebase
You can click Add Context on any file (or even just select particular functions) to include them in your AI session. For example, here’s ourapp.py:
Never commit sensitive values like
SECRET_KEY or database credentials in your production code. Use environment variables or a secrets manager instead.2. Querying Specific Contexts: Templates & Templating Engines
You can narrow your search to HTML templates and ask, “Which templating system do these use?” The AI will identify Jinja2, Flask’s default engine:
3. Excluding Irrelevant Files
Context exclusion is just as powerful. You can omit JavaScript files, tests, or any directories that aren’t relevant:4. Focusing on Individual Functions
To optimize a specific routine, just select the function. For example, a simple password hashing utility:get_db() function to ask for performance improvements. The AI might suggest enabling WAL mode, tuning cache sizes, and using autocommit:
Performance tuning PRAGMAs can greatly reduce disk I/O and improve concurrency for SQLite-based applications.