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:
-
Open the Extensions tab in VS Code
-
In the search bar, type Pieces
-
Once the extension appears, click the Manage icon (⚙️) on the toolbar to open a dropdown menu
-
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:
-
Open the Keyboard Shortcuts editor by pressing
⌘+k+s
(macOS) orctrl+k+s
(Windows/Linux) -
Use the search bar at the top of the editor to locate the Pieces command you want to modify, such as
Save Current Selection
-
Click the pencil icon next to the command and select
Add Keybinding
-
Enter your preferred shortcut—be sure it doesn’t conflict with an existing VS Code command—i.e.,
⌘+shift+'
(macOS) orctrl+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:
-
Open Pieces Settings (search
Pieces
in the VS Code settings menu, or click the settings button next toSaved Materials
in the Pieces Explorer) -
Scroll down to Pieces: Autocomplete Key
-
Select your preferred key—
tab
orEnter or Tab
-
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.
Automatically Copy Link
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
Auto-Save Related Materials Selection
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.
Search
You can adjust the default Pieces Copilot search behavior in a few different ways.
- 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.
- Search Display
Select what you'd like to display in your search results.
-
title
,tags
, andcode
-
title
,tags
, anddescription
- 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.
| Sets the automatic save interval for open files. |
---|---|
| Automatically updates tools in the extension. |
| Specifies the icon theme for the VS Code workbench. |
| Enables automatic fetching in Git to keep your branches updated. |
| Controls the visibility of the GitLens graph minimap. |
| Allows customization of the color scheme for your editor. |
| Determines whether backlinks are always shown in the markdown preview. |
| Enables Zen mode in markdown preview. |
| Shows release notes when VS Code updates. |
| Suppresses inline suggestions in the editor. |
| Specifies the Machine Learning model type for Pieces. |
| Controls telemetry (data sharing) with the Pieces team. |
| Defines if Pieces OS should launch on startup. |
| 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.