diff --git a/docs/how-to-guides/save-a-snippet-new/media/images/all-context.webp b/docs/how-to-guides/save-a-snippet-new/media/images/all-context.webp deleted file mode 100644 index 20041acd9..000000000 Binary files a/docs/how-to-guides/save-a-snippet-new/media/images/all-context.webp and /dev/null differ diff --git a/docs/how-to-guides/save-a-snippet-new/media/images/saved-materials-tab.webp b/docs/how-to-guides/save-a-snippet-new/media/images/saved-materials-tab.webp deleted file mode 100644 index 397fd7538..000000000 Binary files a/docs/how-to-guides/save-a-snippet-new/media/images/saved-materials-tab.webp and /dev/null differ diff --git a/docs/how-to-guides/save-a-snippet-new/media/images/saved-snippet-panel.webp b/docs/how-to-guides/save-a-snippet-new/media/images/saved-snippet-panel.webp deleted file mode 100644 index 9061788f4..000000000 Binary files a/docs/how-to-guides/save-a-snippet-new/media/images/saved-snippet-panel.webp and /dev/null differ diff --git a/docs/how-to-guides/save-a-snippet-new/media/images/view-all-context.webp b/docs/how-to-guides/save-a-snippet-new/media/images/view-all-context.webp deleted file mode 100644 index 474b7ebdd..000000000 Binary files a/docs/how-to-guides/save-a-snippet-new/media/images/view-all-context.webp and /dev/null differ diff --git a/docs/how-to-guides/save-a-snippet-new/resources/helloworld.py b/docs/how-to-guides/save-a-snippet-new/resources/helloworld.py deleted file mode 100644 index ac0887f65..000000000 --- a/docs/how-to-guides/save-a-snippet-new/resources/helloworld.py +++ /dev/null @@ -1,2 +0,0 @@ -name = input("What is your name? ") -print("Hello, " + name + "!") \ No newline at end of file diff --git a/docs/how-to-guides/save-a-snippet-new/save-a-snippet-new.mdx b/docs/how-to-guides/save-a-snippet/index.mdx similarity index 90% rename from docs/how-to-guides/save-a-snippet-new/save-a-snippet-new.mdx rename to docs/how-to-guides/save-a-snippet/index.mdx index 8c867f104..5b443fd33 100644 --- a/docs/how-to-guides/save-a-snippet-new/save-a-snippet-new.mdx +++ b/docs/how-to-guides/save-a-snippet/index.mdx @@ -51,12 +51,13 @@ After processing, review the snippet and the added context: ![Saved Snippet Panel](./media/images/saved-snippet-panel.webp) -In the _Context Preview_ pane, review the data added by Pieces, including: -- Suggested searches for similar snippets. -- Suggested links for more information. -- Tags. -- Related files and folders. -- A description of the code snippet. +In the _Context Preview_ pane, review the metadata automatically added by Pieces, including: +- A description of the code snippet +- Suggested searches for similar snippets +- Suggested links for more information +- Tags +- Related files and folders +- Relate people Use the **View all context** button to expand the _Context Preview_ to see more details. diff --git a/docs/how-to-guides/save-a-snippet/save-a-snippet.mdx b/docs/how-to-guides/save-a-snippet/save-a-snippet.mdx deleted file mode 100644 index 4fba34061..000000000 --- a/docs/how-to-guides/save-a-snippet/save-a-snippet.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: Save a code snippet and add additional context with AI using the Pieces Desktop app -description: Learn how to save a code snippet in Pieces for Developers ---- - -Pieces allows you to save a piece of code, or code snippet, into the Pieces app, where additional context is added using AI. - -This is a powerful way to keep track of the code that you may need to refer back to later, or to share with your team. Instead of copying code snippets into a notes app where they are easy to lose, or writing them in a physical notebook where you cannot search for them, Pieces is designed to make code snippets not only easily searchable, but augmented using AI to provide additional context and information, such as automatically tagging the snippet, and providing relevant links to documentation. - -This guide will walk you through the process for saving code snippets in the Pieces Desktop app, and have additional context added to your snippet automatically by the Pieces AI capabilities. - -## Prerequisites - -To save a code snippet, you will need: - -- [Pieces installed](/installation-getting-started/what-am-i-installing) on your machine -- A code snippet that you want to save. This can be a code file, code copied to your clipboard, or even a picture of code, for example a photo from a lecture. - - If you don't have a code snippet to hand, you can copy this example: - - ```python - name = input("What is your name? ") - print("Hello, " + name + "!") - ``` - - Or download this as a Python file from [this link](./resources/helloworld.py). - -## Steps - -To save a snippet, you will take the following steps: - -1. [Open Pieces Desktop](#open-pieces-desktop) -1. [Add the code snippet](#add-the-code-snippet) -1. [Review the context added to the snippet](#review-the-context-added-to-the-snippet) - -### Open Pieces Desktop - -To save a snippet, launch Pieces Desktop. - -You can either: -- Click on Pieces OS in your menu bar or system tray, and select **Launch Pieces for Developers** -- Run Pieces from your Windows Start menu, macOS Applications folder, or Linux Applications menu - -Once Pieces is open, select the **Saved Materials** tab from the left-hand menu. - -
-
-
- ![The saved materials tab](./media/images/saved-materials-tab.webp) -
-
-
- -### Add the code snippet - -Depending on where your code snippet is located, you can add it to Pieces in a few different ways: - -- **From a code file**: Drag and drop the file into the Pieces app. -- **From an image file**: Drag and drop the file into the Pieces app. Pieces will detect the text in the image and convert it to a code snippet. -- **From your clipboard**: Copy the code snippet, then paste it into the Pieces app using _Ctrl+v_ (Windows/Linux) or _Cmd+v_ (macOS). - -Pieces will then automatically augment the snippet with additional context, such as tags, links to documentation, and other relevant information. It will do a quick local pass, then send the snippet to the cloud for further processing, depending on your app settings. - -### Review the context added to the snippet - -Once the snippet has been processed, you will be able to review the snippet and see the additional context that Pieces has added. - -- The snippet you just added should be selected in the list of saved materials, but if not, select it. - -
-
-
- ![The saved snippet panel showing the snippet code and generated details](./media/images/saved-snippet-panel.webp) -
-
-
- - The top panel shows the code snippet, and the bottom panel shows a preview of the added context. - -- In the _Context Preview_ pane, review the data that Pieces has added. This includes: - - Suggested searches to find similar snippets - - Suggested links to learn more about the code you just added - - Tags - - Related anchors, such as relevant files and folders - - A description of the code snippet - -- Use the **View all context** button to expand the _Context Preview_ to see more details. - -
-
-
- ![The view all context button](./media/images/view-all-context.webp) -
-
-
- - This will swap the _Context Preview_ for the _All Context_ pane, which shows more details. - -
-
-
- ![The all context pane](./media/images/all-context.webp) -
-
-
- - -## Next steps - -- [Manage your code snippet](/features/managing-saved-materials) -- [Share your code snippet](/features/one-click-snippet-sharing) diff --git a/sidebars.ts b/sidebars.ts index a0d5ad910..669b33cb7 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -219,13 +219,8 @@ const sidebars: SidebarsConfig = { items: [ { type: 'doc', - id: 'how-to-guides/save-a-snippet-new/save-a-snippet-new', - label: 'Save a Code Snippet Using Pieces Desktop' - }, - { - type: 'doc', - id: 'how-to-guides/save-a-snippet/save-a-snippet', - label: 'Save a code snippet using the Pieces Desktop app', + id: 'how-to-guides/save-a-snippet/index', + label: 'Save a Code Snippet Using Pieces Desktop App' }, { type: 'doc',