---
schema_version: "1"
id: 0a30f61870e1c77f013b0f9130c6121658fc97d1c039ffbb3a55941ffbe68c8b
title: Inline Auto Completion
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/agentforcevibes/guides/files/afv-inline-auto-complete.md
canonical_url: https://developer.salesforce.com/docs/platform/agentforcevibes/guide/afv-inline-auto-complete.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c29eaffeaf61cdb665288024f4747fc49a601cb93510f2d4a9db1cb6af1814e8
products:
  - Agentforce Vibes Developer Guide
  - salesforcedx
---
# Inline Auto Completion

Agentforce Vibes Autocomplete is a separate VS Code extension that provides AI-based inline code suggestions as you write. It triggers autocompletions in **Apex**, **JavaScript**, **HTML**, and **CSS** files (including Lightning Web Component files).

## Enable or Disable Inline Autocomplete

Inline autocomplete is enabled by default. The Agentforce Vibes status icon in the **VS Code status bar** (bottom panel) shows whether the feature is active. Click the status icon to open the command palette for quick access to enable and disable commands.

To toggle inline autocomplete from the command palette:

- Run **Agentforce: Toggle Auto Completions** to turn the feature off or on for all supported file types.
- Run **Agentforce: Toggle Auto Completions for Current File Type** to toggle it only for the currently active file type.

To enable or disable inline autocomplete from Settings, follow these steps:

1. Select **File** > **Preferences** > **Settings** (Windows or Linux) or **Code** > **Preferences** > **Settings** (macOS).
2. Under **Agentforce Vibes**, select **Enable Auto Completions**, then select the language for which to enable the feature.

**note:** Agentforce Vibes turns off inline autocomplete when you're idle. The sleeping Agentforce status icon in the status bar indicates this state. To re-enable, restart VS Code or press **Option (⌥)\\** to trigger suggestions manually. Inline autocomplete also re-enables automatically after 1 hour of inactivity.

## See a Visual Notification for an Ongoing Completion

To see a visual indicator while Agentforce Vibes generates an autocompletion:

1. Select **File** > **Preferences** > **Settings** (Windows or Linux) or **Code** > **Preferences** > **Settings** (macOS).
2. Under **Agentforce Vibes**, check **Show an indicator to signal that Agentforce is making an autocomplete request**.

## Receive Your First Inline Completions

Agentforce Vibes automatically generates code and suggests completions as you type. When writing code, you're often assigning variable values to an `SObject` such as `Account.Name = 'abc'` or `Account.Type = 'Business'` in Apex. Pause the cursor after the variable value and Agentforce Vibes suggests a completion and fills out the remaining fields in grayed (ghost) text.

Use these keyboard shortcuts to interact with suggestions:

| Action                                                 | Key                                      |
| ------------------------------------------------------ | ---------------------------------------- |
| Trigger suggestions manually                           | **Option (⌥)\\**                         |
| Accept entire suggestion                               | **Tab**                                  |
| Accept next word (requires VS Code **Inline Suggest**) | **⌘→** (macOS) / **⌥→** (Windows, Linux) |
| Dismiss suggestion                                     | **Esc**                                  |

**note:** If you don't see a suggestion, make sure that Auto Completions are enabled. Run **Agentforce: Toggle Auto Completions** to toggle the feature off and on. You can always trigger inline suggestions manually by pressing **Option (⌥)\\**, even when Auto Completions are off.

## Settings Reference

The following VS Code settings control inline autocomplete behavior. Access them via **File** > **Preferences** > **Settings** and search for **Agentforce Vibes Autocomplete**.

| Setting                                                                           | Default | Effect                                                                                                  |
| --------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------- |
| **Enable Auto Completions**                                                       | On      | Enables inline autocomplete suggestions as you type. Toggle per language (Apex, JavaScript, HTML, CSS). |
| **Show an indicator to signal that Agentforce is making an autocomplete request** | Off     | Shows a visual indicator in the editor while the extension generates a completion.                      |

## Privacy and Telemetry

When inline autocomplete is active, Agentforce Vibes sends code context from your active file to the Salesforce LLM Gateway to generate suggestions. This context includes the code surrounding your cursor position. Salesforce doesn't use this data to train its models.

You must enable telemetry to use Agentforce Vibes in Code Builder. In VS Code, you can turn off telemetry after initial setup if your organization's policy permits. See [Salesforce CLI Data Collection and Metrics](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_dev_cli_telemetry.htm) for details about what data is collected and how it's used.

## Known Issues

- Agentforce Vibes sometimes formats completions incorrectly. Run [prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) after you accept the suggestions.
- Completions sometimes populate piecemeal. Accept the partial suggestion and the remainder populates.
- If you have multiple AI-based inline completion extensions enabled, suggested completions from all providers appear as ghost text. Scroll through them to find the Agentforce Vibes suggestion, or disable competing extensions as described in [Set Up Agentforce Vibes](https://developer.salesforce.com/docs/platform/agentforcevibes/guide/afv-extension-setup.md).
