Integrating Context & Projects
Learn how to enrich your Pieces Copilot chats by integrating context—like folders, file, and other saved materials—from your previous tasks and current projects.
Enriching Chats with LTM-2 Context
Integrating context ensures Pieces Copilot isn’t answering in a vacuum.
By including Long-Term Memory data and project-specific resources, you can improve the accuracy of generative AI responses, reduce context-switching, work more effectively.
LTM Context Toggle
Below the Set Context section of the main Pieces Copilot view, you have the option to enable LTM Context.
When turned on, your long-term memory data—captured by PiecesOS from your previous workflow—is automatically injected into every new chat.
This means that even if you start a fresh conversation, Pieces Copilot has access to important context from earlier sessions.
Adding Folders
Click the Folders
button in the Set Context area.
This opens the Manage Copilot Context modal, where you can add local code directories.
To do so, click Add Folders
to open your Finder (macOS) or File Explorer (Windows/Linux).
Select the directories that you want the Pieces Copilot to use as context. This is especially useful when working on large projects where entire folders contain valuable code references.
Adding Files
Similarly, clicking the Files
button opens the same modal so you can select individual files from anywhere on your device.
Click Add Files
to select specific code files.
These files are then parsed by Pieces Copilot to provide precise answers related to your code.
Adding Websites
If you need to reference external code on a website—like on Stack Overflow—click the Add Websites
option, which is accessible via the Quick Action menu.
This opens a modal where you can enter a website URL.
Websites with code snippets or technical documentation can then be used as contextual material for your Pieces Copilot queries.
Enriching Chats with Saved Materials
You can also add saved materials from the Pieces Drive into your Pieces Copilot Chat as context for the conversation.
Selecting Saved Materials
Clicking the Saved Materials
button opens up an interface that displays a clickable list of code snippets and documents previously saved in Pieces Drive.
Choose the relevant saved material that you’d like to include in your current conversation.
This ensures that the Pieces Copilot is aware of your pre-curated, AI-enriched materials and can reference them in its responses.