Pieces Copilot

The Pieces Copilot in the Pieces for VS Code Extension integrates advanced AI capabilities into your coding workflow, like swappable LLMs for adding code comments, generating additional code, debugging, and more.

With the Pieces Copilot, you can generate intelligent code comments, access AI Quick Actions, and ask variable-context coding questions without leaving Visual Studio Code.


Generative AI Conversations

Facing an issue or not sure how to tackle a coding challenge? You can ask the Pieces Copilot specific coding questions directly in VS Code using the Copilot Chat side window.

You can either ask any question that doesn’t require context, such as “What is the basic format for a .JSON object?” to more in-depth questions where the Pieces Copilot needs context from your active code.

Adding Conversation Context

Contextual awareness allows the Pieces Copilot to help you overcome obstacles faster by providing answers that are actually relevant to the current issue you’re facing, and to your code.

To use this feature, include details like error messages or file context for more accurate responses from the LLM conversation.

You can also add multiple files and other items as context to your question, giving the Pieces Copilot comprehensive information to help you troubleshoot.

Start by right-clicking some code and select one of the following options from the tool menu:

  • Ask Copilot About Selection: Includes the active selected code with the conversation.

  • Ask Copilot About Active File: Includes the entire active file with the conversation for a broader range of context.

  • Add Active File to Copilot Context: Adds the whole file to the conversation, this time inserting it permanently (as long as this conversation is utilized) into the Copilot Chat—useful when you need to ask several questions.

Pieces Copilot Tools

Discover powerful AI-powered tools and features within the Pieces for VS Code Extension.

Documenting Code

Easily generate insightful code comments with Pieces for VS Code Extension. By understanding your code’s structure and function, Pieces Copilot creates clear and useful comments to enhance readability and simplify maintenance.

To add documentation and comments to code, select the code snippet—no matter how long—then right-click, hover on Pieces, and click on Comment Selection with Copilot.

This opens the Pieces Copilot in the VS Code sidebar, which begins adding documentation to the highlighted snippet, from which you can select the Insert at Cursor option to add the comments to your code.

You can also click Pieces: Add Comments, which is an AI Quick Action that lives above accessible functions within your code.

Use this feature to maintain consistency in documentation and simplify handoffs for collaborative projects.

Enhanced Debugging Tools

Detect and address code issues quickly with Pieces for VS Code Extension Code Debugging feature. It pinpoints problems, suggests solutions, and provides detailed context, making bug fixes faster and more intuitive.

The code debugging feature is particularly useful for tackling complex debugging tasks and ensuring code quality across projects.

Using this feature is simple—click the lightbulb icon near an error—marked with a red underline—to see the Pieces: Fix option, then click it.

Generate & Update Code

With the Pieces for VS Code extension, you can enhance your workflow with two powerful Pieces Copilot commands:

Selecting Your Pieces Copilot Runtime

Choose between different LLMs directly within VS Code by accessing the sidebar and selecting your preferred model by clicking the currently-utilized LLM under Active Model (Claude 3.5 Sonnet).

Options range from lightweight models for simple queries to advanced models for in-depth analysis, as well as local and cloud-based LLMs.

This flexibility allows you to tailor Pieces Copilot to your specific development needs, whether it’s speed or accuracy.

Read more about what LLMs are available for use with the Pieces for VS Code Extension.

Pieces Copilot As a Daily Driver

The Pieces Copilot is a powerful, adaptable tool that grows with you as you use it—so use it!



Download the Pieces for VS Code Extension today!
Updated on