Generative AI Conversations
If you're unsure how to implement a specific feature or stuck on a bug, you can ask the Pieces Copilot coding-related questions directly in Sublime. It will provide context-aware responses to help you move forward.
The Pieces for Sublime Text plugin provides various conversation features, all fully integrated with Pieces. You can activate the Long Term Memory Engine (LTM-2) for detailed, seamless context across your entire workflow, or start a limited context conversation in the text editor's side view.
Adding Conversation Context
Contextual awareness enables the Pieces Copilot to provide solutions that are directly relevant to the challenges you're facing and your code.
Start by right-clicking an active file in Sublime Text and click Pieces: Add to Copilot Context
.
Within the Pieces Copilot active chat, you can also add multiple types of context by clicking the message icon
. After doing so a new menu will pop up asking what you’d like to add as context.
Pieces Copilot Tools
Explore powerful AI-driven tools and features with the Pieces for Sublime Text Plugin.
Documenting Code
Keeping well-documented code is an often overlooked aspect of programming, but it’s very important—that’s why the Pieces Copilot in Sublime Text lets you use AI to generate intelligent and context-aware code comments.
To add documentation and comments to code, select the code snippet—no matter the length—then right click, hover over Pieces
, then hover over Quick Actions
, and finally click on Add Code Comments
.
This opens a pop-up near the selected code with an option to Accept
or Reject
the changes that contain the newly generated comments.
Enhanced Debugging Tools
The Code Debugging feature in the Pieces for Sublime Text Plugin assists developers in identifying and resolving errors within their code and is accessible with just a few clicks.
This feature identifies issues and suggests fixes, making debugging easier. It's great for improving code quality and saving troubleshooting time.
To quickly debug your code with Pieces, select the code snippet you're having trouble with, right-click, hover over Pieces
, then hover over Quick Actions
, select Fix a Bug
, and enter your query.
This opens a pop-up near the selected code with an option to Accept or Reject the changes that contain the fixes for the broken segment of code.
Generate & Update Code
The Pieces Copilot can generate code snippets based on your specifications.
With the Pieces for Sublime Text Plugin, you can enhance your workflow with two powerful Pieces Copilot commands:
-
Modify
: Edit or transform the selected code snippet to improve readability, optimize performance, or adapt it for specific needs. -
Explain
: Get a clear explanation of what the selected code does, making it easier to understand and document.
It helps update existing code by offering improved or refactored versions, optimizing processes, adding updates, and automating repetitive tasks based on your current code context.
Selecting Your Pieces Copilot Runtime
You can change which LLM is utilized by Pieces Copilot in the Pieces for Sublime Text Plugin by running the command Pieces: Change LLM
.
Options include lightweight models for simple queries, advanced models for in-depth analysis, and both local and cloud-based LLMs.
This flexibility lets you customize the Pieces Copilot experience to suit your specific development needs, whether prioritizing speed or accuracy.
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 Sublime Text Plugin today!