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).

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.

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.

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.

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:

ActionKey
Trigger suggestions manuallyOption (⌥)\
Accept entire suggestionTab
Accept next word (requires VS Code Inline Suggest)⌘→ (macOS) / ⌥→ (Windows, Linux)
Dismiss suggestionEsc

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.

The following VS Code settings control inline autocomplete behavior. Access them via File > Preferences > Settings and search for Agentforce Vibes Autocomplete.

SettingDefaultEffect
Enable Auto CompletionsOnEnables inline autocomplete suggestions as you type. Toggle per language (Apex, JavaScript, HTML, CSS).
Show an indicator to signal that Agentforce is making an autocomplete requestOffShows a visual indicator in the editor while the extension generates a completion.

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 for details about what data is collected and how it’s used.

  • Agentforce Vibes sometimes formats completions incorrectly. Run prettier 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.