Configuration

Refer to the guide below to effectively configure the Pieces for VS Code Extension to align with your workflow and personal preferences.


Supported LLMs

We constantly update and configure our plugins and extensions to work with the latest LLMs.

The Pieces for VS Code Extension currently supports 26 different models:


GPT-3.5-Turbo

GPT-4

GPT-4-Turbo

GPT-4o

GPT-4o-mini

Gemini Pro Chat

Gemini 1.5 Flash

Gemini 1.5 Pro

Claude 3 Haiku

Claude 3 Opus

Claude 3 Sonnet

Claude 3.5 Sonnet

Code Chat Bison

Chat Bison

Mistral 7B

Phi-2

Phi-3 Mini 128k

Phi-3 Mini 4k

Llama 2 7B

Llama 3 8B

Gemma 1.1 7B

Gemma 1.1 2B

Code Gemma 1.1 7B

Granite 3B & 8B


Read documentation on how to switch your Pieces Copilot Runtime (LLM) utilized by the Pieces for VS Code Extension within your IDE.

Opening Pieces Settings

To open the Pieces Settings in the Pieces for VS Code Extension, follow these steps:

  1. Open the Extensions tab in VS Code

  2. In the search bar, type Pieces

  3. Once the extension appears, click the Manage icon (⚙️) on the toolbar to open a dropdown menu

  4. Select Settings from the dropdown to view and adjust the Pieces settings

You can also access Pieces Settings in the bottom-left corner of the screen, where it says Pieces Settings.

Overriding Commands in VS Code

If you’d like to adjust the keyboard shortcuts for Pieces functionality in VS Code, such as saving a snippet or previewing markdown, follow these steps:

  1. Open the Keyboard Shortcuts editor by pressing ⌘+k+s (macOS) or ctrl+k+s (Windows/Linux)

  2. Use the search bar at the top of the editor to locate the Pieces command you want to modify, such as Save Current Selection

  3. Click the pencil icon next to the command and select Add Keybinding

  4. Enter your preferred shortcut—be sure it doesn’t conflict with an existing VS Code command—i.e., ⌘+shift+' (macOS) or ctrl+shift+' on (Windows/Linux)

Settings Overview

Below is a breakdown of each adjustable setting (preferences, behaviors, views, etc.) you can find in the Pieces for VS Code Extension, broken down by section.

Snippet Preferences

Adjustable settings specific to saved materials, like code snippets, and other material-related action behavior.

Add Snippets

To import your User Snippets from VS Code to Pieces, click Import User Snippets to Pieces.

This will seamlessly bring your custom snippets into Pieces, making them available across your projects.

Snippet Auto-Complete

This setting enables or disables Snippet Autocomplete within the Pieces extension, which is a feature that suggests pieces of saved code from your snippet repository where it makes sense to use them.

To enable or disable auto-complete, check or uncheck the box in this section of the VS Code settings.

To modify the auto-complete key:

  1. Open Pieces Settings (search Pieces in the VS Code settings menu, or click the settings button next to Saved Materials in the Pieces Explorer)

  2. Scroll down to Pieces: Autocomplete Key

  3. Select your preferred key—tab or Enter or Tab

  4. Save your settings, and Snippet Autocomplete will be configured to your preference

Auto-Expansion

Enabling this option will expand your snippet list to match the programming language of your active file, making it easier to find relevant snippets as you code.

This setting automatically copies any generated Pieces link. When enabled, links are ready to share instantly, so you don’t need to manually copy them.

Auto-Save

With auto-save enabled, Pieces will automatically save frequently used snippets as you work.

This helps reduce the number of snippets you need to save manually and makes it easier to revisit the code you use often.

Explored Snippet Insights

Manage insights for explored snippets:

  • Document with Pieces Insights: Add exploration results as a comment above the snippet.

  • Explore and Save: Saves any explored snippets automatically to your Pieces repository.

Display

Control what displays in your snippet list:

  • Name: Shows the snippet title

  • Description: Shows the snippet’s description

  • Preview: Shows a code preview for a glance at the snippet’s contents

Check this box if you’d like any code selected for related materials search to be saved automatically to your Pieces repository.

Git Context

This setting allows you to add Git context to your snippets. Choose if you’d like to include details from your Git history, such as commit links and authors, to better track where snippets originated.

Copilot Preferences

Adjustable preferences related specifically to Pieces Copilot and LLM runtime usage.

Cloud Capabilities

Choose the type of ML models you’d like the Pieces Copilot to use:

  • Cloud: For cloud-based models

  • Local: For on-device models

  • Blended: A mix of cloud and local

To learn more about the types of ML models and their privacy implications, visit our documentation.

You can adjust the default Pieces Copilot search behavior in a few different ways.

  1. Search By

Pick your search parameters! In Search By, you can decide if your search will match the characters in your snippets' titles, tags, code contents, or combinations of the three.

  1. Search Display

Select what you'd like to display in your search results.

  • title, tags, and code

  • title, tags, and description

  1. Search Result Action

Choose what you want to happen when you select a search result.

  • Open in Overview

  • Insert Snippet at Cursor

  • Open in Overview and Copy to Clipboard

  • Copy to Clipboard

Pieces Settings

Launch PiecesOS

If PiecesOS isn’t running, launch it directly from this settings page instead of opening it from your Applications folder.

Notifications

Customize your notification preferences for a more streamlined experience:

  • All Notifications: Receive all types of notifications, including successes and suggestions.

  • Only Critical Notifications: Only critical alerts, like failures, will be shown.

Side Panel Views

Customize the sections shown in your Pieces Side Panel by selecting or deselecting:

Other Configurable Settings

Telemetry

Uncheck this box to opt out of sharing analytics with the Pieces development team.

You can also read up on our privacy policy and usage statements for more information about what data is and isn’t collected.

.JSON-Adjustable Settings

All configurable settings for the Pieces for VS Code Extension are available in the settings.json file, accessible through the Pieces Settings window.


files.autoSave

Sets the automatic save interval for open files.

go.toolsManagement.autoUpdate

Automatically updates tools in the extension.

workbench.iconTheme

Specifies the icon theme for the VS Code workbench.

git.autofetch

Enables automatic fetching in Git to keep your branches updated.

gitlens.graph.minimap.enabled

Controls the visibility of the GitLens graph minimap.

workbench.colorCustomizations

Allows customization of the color scheme for your editor.

markdown-preview-enhanced.alwaysShowBacklinksInPreview

Determines whether backlinks are always shown in the markdown preview.

markdown-preview-enhanced.enablePreviewZenMode

Enables Zen mode in markdown preview.

update.showReleaseNotes

Shows release notes when VS Code updates.

editor.inlineSuggest.suppressSuggestions

Suppresses inline suggestions in the editor.

pieces.cloudCapabilities

Specifies the Machine Learning model type for Pieces.

pieces.telemetry

Controls telemetry (data sharing) with the Pieces team.

pieces.OS.launchOnStartup

Defines if Pieces OS should launch on startup.

pieces.launchPiecesOS

Determines if Pieces OS should be launched manually or automatically.


Once you've edited the contents of the settings.json file (shown below) to your preferences, simply save the file and restart VS Code for your changes to take effect.

{
    "files.autoSave": "afterDelay",
    "go.toolsManagement.autoUpdate": true,
    "workbench.iconTheme": "vscode-icons",
    "git.autofetch": true,
    "gitlens.graph.minimap.enabled": false,
    "workbench.colorCustomizations": {},
    "markdown-preview-enhanced.alwaysShowBacklinksInPreview": false,
    "markdown-preview-enhanced.enablePreviewZenMode": false,
    "update.showReleaseNotes": false,
    "editor.inlineSuggest.suppressSuggestions": true,
    "pieces.cloudCapabilities": "Blended",
    "pieces.telemetry": true,
    "pieces.OS.launchOnStartup": "Yes",
    "pieces.launchPiecesOS": null
}

You can save the .json file with ⌘+s (macOS) or ctrl+s (Windows/Linux).

There's no need to use Save As, since file already exists—you're simply updating it with your new settings, which come with the Pieces for VS Code Extension.


For additional support resources, check out our troubleshooting guide.

Updated on