- Open the global chat window with
Command+L(macOS) orCtrl+L(Windows/Linux). - Trigger inline generation at the caret with
Command+K(macOS) orCtrl+K(Windows/Linux). - Inline edits present a diff directly in the editor (green = additions, red = removals). Accept or reject with the UI or keyboard shortcuts (for example,
Command+Y/Command+Non macOS).
Inline editing is useful for small, iterative changes (refactors, quick helpers, micro-optimizations). Use the full chat window when you need a longer discussion or to preserve a long context.
When to use inline edits vs full chat
Keyboard shortcuts
Example: editing a Flask-like app inline
Below is a compact, corrected example of a Flask-like application fragment you might edit inline. It shows typical structure and small helpers you might add during a focused edit session.login_required decorator that adds logging and graceful error handling while preserving functools.wraps:
- Small inline edits are great for iterating quickly, but always review and harden prototypes before deploying.
- For example, do not use raw SHA-1 for storing passwords in production.
Do not use raw SHA-1 for password hashing in production. Use a secure password hashing method such as
werkzeug.security.generate_password_hash / check_password_hash, bcrypt, or argon2.Best practices for inline AI edits
- Keep inline generation for targeted, small changes: helpers, single-function refactors, docstrings, or micro-optimizations.
- Use the full chat window when you need extended back-and-forth, design discussions, or to maintain long context across many edits.
- Always review generated diffs before accepting—treat them like a code review.
- Replace any quick prototypes (e.g., SHA-1 examples) with production-grade libraries and established patterns when hardening your application.
- Add tests for any generated code that affects behavior or security.