[NEW] Inline actions: Boost coding efficiency with inline responses
Home / Blog /
Introducing Tabnine inline actions: Boost coding efficiency with seamless inline responses
//

Introducing Tabnine inline actions: Boost coding efficiency with seamless inline responses

//
Shantanu Kedar /
4 minutes /
August 27, 2024

We’re thrilled to announce a new form factor for AI coding tasks within Tabnine: inline actions. Inline actions allow you to work directly on selected snippets of code — getting AI-enabled edits, fixes, refactoring, documentation, and more — with all responses generated inline. 

Building on Tabnine’s existing AI code completions and AI chat, this new interface is purpose-built for use cases when you want the AI to work directly where you’re coding. Simply select the code you want to work with, choose from predefined actions or ask Tabnine to complete a task, and the results are generated inline with visual highlights of what’s changed. You can accept, modify, or reject what’s generated right from the code snippet. Inline actions enable you to stay in the flow by offering an intuitive and faster way of using Tabnine.

Stay in the flow with inline responses

Our mission has always been to accelerate and simplify software development for every developer. We continuously improve Tabnine with each release, and strive to make AI code assistance a seamless part of your current workflows. This commitment is at the heart of inline actions. 

Inline actions is the third form factor for using Tabnine, joining AI code completion and AI chat. With code completions, Tabnine automatically generates code as you type. The responses are inline, thus letting developers stay in the flow. Tabnine estimates what the user is looking to achieve based on what they’ve typed and by leveraging context from the locally available code and data in the IDE. It then automatically generates entire lines of code and complete functions with minimal latency.

Chat is our AI-enabled interface that allows developers to interact with Tabnine across software development tasks using natural language. The chat interface allows users to specify the task they want Tabnine to perform, with responses generated in a side panel for review and insertion into your files. 

Inline actions brings together the best of chat and code completions into a single interface. By delivering AI-generated code or edits within the same environment where you’re working, inline actions are a faster and easier method to create, refine, document, and fix code quickly. 

How to use inline actions

Inline actions are embedded in VS Code and the JetBrains family of IDEs (support for other IDEs to come soon). Trigger Tabnine by selecting a block of code, by clicking Edit in the code lens functionality, or by using the ⌘+I (Ctrl + I for Windows and Linux) keyboard shortcut. These actions open up a Tabnine-specific command palette containing an array of commands. You can choose from the available commands or click Edit to open a dialog window to request changes using plain language.

You can also specify the scope for your actions by selecting anything from a few lines of code or an entire block that you want to edit, or you can have Tabnine generate the response at the cursor location. Once you hit Enter, Tabnine provides responses along with a diff view that makes it easy to determine the suggested changes. You can accept (using Alt + A) or discard (using Alt +R) the response — after you accept, Tabnine inserts the response inline. 

Inline actions also benefit from Tabnine’s switchable models. Select the best model for your use case or corporate requirements, choosing from Tabnine’s custom-developed models (Tabnine Protected 2, Tabnine + Mistral) or from popular models from third parties (Command R+, Claude 3.5 Sonnet, GPT-4o, and Codestral). With Tabnine, you’re always in control. 

Inline actions also continue to leverage your context to deliver optimized recommendations for your use case — accessing locally available code and information in your IDE and (for Enterprise users) your organization’s global codebases to generate responses tailored to you and your organization. 

Check out the video below to see what you can do with inline actions.

Generate new code inline: Simply click the ⌘+I keyboard shortcut to trigger inline actions. Type in natural language the instructions for creating new code and hit Enter. Tabnine generates the code and offers responses right where your cursor is. Review the suggestions quickly with the diff view, and hit Alt+A to accept the response. 

Fix code with inline actions: Click Edit in the code lens to open the inline actions command palette. Select the /fix-code command (or type in natural language) and hit Enter. Tabnine fixes the code and generates the response inline. Review quickly with the diff view and accept the changes.

Create inline documentation: Use the ⌘+I keyboard shortcut to trigger inline actions. Type in natural language to create inline documentation (or use the /document-code quick command) and hit Enter. Tabnine generates inline responses — review and accept changes by hitting Alt+A.

Get started with Tabnine’s latest updates

Tabnine inline actions are available now for all Tabnine SaaS customers — simply update your IDE plug-in to start using it. Check out our Docs to learn more. Not yet a customer? Sign up for free today.