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.5) 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.
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 you’d like to comment
-
Right click on the selection
-
Hover over
Pieces
-
Then, hover over
Ask Copilot
-
Lastly, 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.
After accepting the changes, the selected code snippet should now display your new 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 pinpoints issues and suggests potential fixes, streamlining the debugging process. This feature is highly useful for improving code quality and reducing the time spent on troubleshooting.
To quickly debug your selection with Pieces:
-
Select the piece of code you’re having issues with
-
Right-click
-
Hover over Pieces
-
Then, hover over
Ask Copilot
-
You can then select the
Fix a Bug
option -
This will prompt you to input the error message you’ve received
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 also assists in updating existing code by providing improved or refactored versions where needed, helping you optimize processes, add updates, and automate otherwise repetitive tasks, all based on the context of your existing code.
Selecting Your Pieces Copilot Runtime
You can change which LLM is utilized by Pieces Copilot in the Pieces for Sublime Text Plugin by editing a single .JSON file.
Easily switch between different LLMs in Sublime Text by:
-
Opening the Command Palette with
⌘+shift+p
(macOS) andctrl+shift+p
(Windows/Linux) -
Entering
Pieces:
into the newly opened prompt -
Selecting
Pieces: Open Pieces Settings
-
Copying the JSON settings from the left editor over to the right editor
-
Updating the model option in the JSON settings displayed in the right editor by choosing one the listed LLM models
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!