Code Editor & Highlight-to-Ask AI
CodeMirror 6 editing with inline selection actions and multi-file navigation.
BhaiCode Desktop ships a responsive code editor powered by CodeMirror 6, with contextual AI actions attached to whatever you select.
Ask AI on selection
Highlight any lines and a contextual action bar appears under the selection:
export async function processPayment(orderId: string) {
const order = await db.order.findUnique({ where: { id: orderId } });
if (!order) throw new Error("Order not found");
const res = await dodoPayments.charges.create({
amount: order.totalAmount,
currency: "INR",
});
return res;
}With lines 5–8 selected, the bar offers Ask AI, Explain, Refactor, and Add tests.
| Action | Shortcut | What it does |
|---|---|---|
| Ask AI | Cmd + K / Ctrl + K | Opens a prompt attached to the selection |
| Explain | — | Logic, complexity, and edge cases, in your preferred language |
| Refactor | — | Readability, modern framework patterns, or performance |
| Add unit tests | — | Tests matching your framework (Vitest, Jest, PyTest, Go test) |
| Fix | — | Resolves a linter warning or compiler diagnostic on the line |
Editor features
- Language support: highlighting, bracket matching, and indentation for 100+ languages (TypeScript, JavaScript, Python, Rust, Go, SQL, HTML, CSS, JSON, YAML, Markdown).
- Split panes and tabs: keep implementations and their tests side by side.
- Minimap and breadcrumbs: navigate large files by structure.
- Find and replace: regex project search with case-sensitivity toggles.
Every AI edit to a file still goes through the diff viewer unless you accept it inline.
Was this page helpful?