diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..1801bd82e --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "streetsidesoftware.code-spell-checker" + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index d9d89060f..85e82fe24 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,6 +4,10 @@ "mdx" ], "cSpell.words": [ + "ipynb", + "jupyterlab", + "quickstart", + "raycast", "webp" ] } \ No newline at end of file diff --git a/docs/extensions-plugins/cli/quickstart.mdx b/docs/extensions-plugins/cli/quickstart.mdx index 29fd9d3bb..4bdd3d4c4 100644 --- a/docs/extensions-plugins/cli/quickstart.mdx +++ b/docs/extensions-plugins/cli/quickstart.mdx @@ -12,7 +12,7 @@ In this tutorial, you'll learn how to set up and start using the Pieces CLI. We' - - - -_Pieces For Developers captures **NO identifiable user data**. Our **Local-only** architecture means your data never has to leave your device._ - -_The [Pieces Suite](/installation-getting-started/what-am-i-installing) must be downloaded and installed separately from the JupyterLab Extension for it to work properly._ - -## Installation Instructions - ---- - -1. Run this command: - ```sh - pip install jupyter-pieces - ``` -2. *(optional)* Be sure to have extensions enabled: [Read about enabling extensions](https://tljh.jupyter.org/en/latest/howto/admin/enable-extensions.html) - -:::info - -Be sure to accept the disclaimer before moving forward in this process. - -::: - -## Newest Features - ---- - -### Pieces Copilot powered by qGPT -- Make sure Pieces OS is open and updated to the latest available version. -- To view the Copilot, open the Pieces JupyterLab Extension and click the bot logo on the top slider to switch to Copilot -- Interact with the Pieces Copilot and receive answers that are specific to your notebooks. -- You can 'Ask Copilot' about a specific piece of code by highlighting it in a cell, right-clicking, and clicking on 'Ask Copilot' -- [A familiar chat experience spread across all your favorite text editing softwares](/features/pieces-copilot#plugin-integrations) - - The Copilot chat window has the same familiar features integrated into multiple text editing softwares: VS Code, Jetbrains, Visual Studio, Web Extension, Obsidian, and JupyterLab. - -### Enrich Selected Code -Select any text within a code cell in your notebook, right-click, and add a useful description to it. - -### Realtime Streaming -Any changes you make across any Pieces integration (e.g., the Pieces Desktop App, the Pieces VS Code Extension, the Pieces JetBrains Plugin, etc.) will automatically be reflected in the JupyterLab plugin. - -## Save your Snippets - -**To save a snippet:** - -- Highlight the text, right-click, and select "Save to Pieces." -- Click the Pieces button within any code block. -- Highlight the desired code and use a dedicated keyboard shortcut. - -![Example of saving an active cell as a snippet](https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/JUPYTER/MACOS/RIGHT_CLICK_SAVE_SELECTION/16X9/PIECES_FOR_DEVELOPERS-JUPYTER-RIGHT_CLICK_SAVE_SELECTION-16X9-MACOS-6_22_2023.gif) - -## Find your Snippets - -Open the Pieces View from the Ribbon Menu. - -- Sort by **recent** or by **language** -- Search your snippets to save time leafing through your files. - -![Example of searching for and inserting snippets](https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/JUPYTER/MACOS/SEARCH_AND_INSERT/16X9/PIECES_FOR_DEVELOPERS-JUPYTER-SEARCH_AND_INSERT-16X9-MACOS-6_22_2023.gif) - -## Use your Snippets - -- Copy and share your snippets from the Pieces View -- You can expand your code snippets to view automatically generated metadata -- View your snippets with syntax highlighting - -![Example of viewing all context related to snippet in expanded view](https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/JUPYTER/MACOS/EXPANDED_VIEW/16X9/PIECES_FOR_DEVELOPERS-JUPYTER-EXPANDED_VIEW-16X9-MACOS-6_22_2023.gif) - -## Share your Snippets - -**To share a snippet:** - -1. Highlight the text, right-click, and select "Share via Pieces Link." -2. Click the Pieces Share button within any code block/in the Pieces View. -3. Highlight the desired code and use a dedicated keyboard shortcut. - -![Example of generating a shareable link for a snippet](https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/JUPYTER/MACOS/SNIPPET_BUTTON_SHARE/16X9/PIECES_FOR_DEVELOPERS-JUPYTER-SNIPPET_BUTTON_SHARE-16X9-MACOS-6_22_2023.gif) - -_Pieces stores all of your snippets for seamless sharing._ - -## Discover Snippets - -The snippet list feature also includes a tab that is labeled *Discover*. Navigating to this tab you will see a list of snippets that Pieces discovered in your project. A great way to get booted up with saved materials in JupyterLab! - -![Example of discovered snippets in Jupyter Lab](/jupyterlab/PIECES_FOR_DEVELOPERS-JUPYTER-MACOS-SNIPPET_DISCOVERY-jupyterlab-snippet-discovery.gif) - -## Embedded Button - -Pieces adds an **embedded button** into your code cells. - -![Example of saving an active cell using the embedded buttons](https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/JUPYTER/MACOS/EMBEDDED_BUTTON_SAVE_ACTIVE_CELL/16X9/PIECES_FOR_DEVELOPERS-JUPYTER-EMBEDDED_BUTTON_SAVE_ACTIVE_CELL-16X9-MACOS-6_22_2023.gif) - ---- - -## Data Privacy, Security, and Offline-First Approach - -In **Pieces for Developers**, we not only prioritize your data privacy and security but also align our approach with the philosophy of JupyterLab: Offline-first, ensuring an optimal user experience. Here are key features that uphold these principles: - -- **Privacy and Security**: All user data, including code snippets, are stored directly on your device, reinforcing our commitment to data privacy. - -![Privacy and security details](/assets/jupyterlab/finder_window_privacy.png) - -- **On-Device ML Processing**: We carry out ~80% of machine learning processing on-device, which minimizes exposure to third-party servers. - -- **Offline-First Design**: Like JupyterLab, our tool is built to work seamlessly offline and provides robust functionality even without internet connectivity. - -- **Fully On-Device ML**: We're progressing toward fully on-device ML capabilities, with an aim to ship 100% of ML features on-device in Q4. - -- **Opt-In Cloud Capability**: We provide opt-in cloud features on a per-resource basis, ensuring that data transfers to the cloud only occur with your explicit consent. This grants you full control over your data. - -Just like JupyterLab, we are steadfast in our commitment to providing a tool that respects user privacy, ensures data security, and delivers a powerful offline-first experience. So, feel free to switch off your Wi-Fi and give Pieces for Developers a spin. - -## Having Trouble with the Pieces For Developers JupyterLab Extension? - -To double-check that Pieces OS is running, make sure that the Pieces logo is present in your toolbar (on macOS) or your task bar (on Windows). If it isn't there, please launch Pieces OS by clicking Pieces OS in your Applications folder. - -If you need to download and install Pieces OS, please [visit this link](/installation-getting-started/what-am-i-installing). - -### If the JupyterLab extension still isn't working for you, please make sure you have the following: -- The latest version of the Pieces for Developers JupyterLab Extension -- Pieces OS version 8.0.0 or higher -- JupyterLab version 4.0.0 or higher - -:::info - -After installing or updating your software, please restart JupyterLab. - -::: - -If none of the above fix your issue, please [submit this form](https://getpieces.typeform.com/jupyterlab) and we'll get back to you! - -## Can I Customize the Pieces Plugin? - -**Definitely!** To customize your Pieces for JupyterLab Extension experience, visit the extension settings menu and then click `Pieces Settings`. - -You can adjust the following settings: - -1. Auto-open Pieces list view on snippet save -2. Cloud capabilities -3. Pieces server port -4. Login/Logout of your Pieces Cloud - -## Support and Community - - - - - - diff --git a/docs/extensions-plugins/jupyterlab/features.mdx b/docs/extensions-plugins/jupyterlab/features.mdx new file mode 100644 index 000000000..b22f0a2f2 --- /dev/null +++ b/docs/extensions-plugins/jupyterlab/features.mdx @@ -0,0 +1,88 @@ +--- +title: Features +description: Learn how to use the Pieces JupyterLab extension features to streamline your workflow and boost productivity. +--- + +import Video from "/src/components/Video"; + +## Pieces Copilot + +The [Pieces Copilot](/features/pieces-copilot) is available using the Pieces View from the Ribbon Menu, and selecting the bot logo on the top slider to switch to the copilot. From here you can interact with the Pieces Copilot and receive answers that are specific to your notebooks. + +This [has a familiar chat experience spread across all your favorite tools](/features/pieces-copilot#plugin-integrations). The Copilot chat window has the same familiar features integrated into multiple tools: VS Code, JetBrains, Visual Studio, your browser, Obsidian, and more. + +### Enrich Selected Code + +Select any text within a code cell in your notebook, right-click and select **Enrich Selection via Pieces**. The Pieces Copilot will add a helpful comment at the top describing your code. + +### Ask Pieces + +Select any text within a code cell, right-click and select **Ask Pieces about your Selection**. In the dialog that appears, ask a question about the code. A new Copilot chat wil be started providing an answer to the question you asked. + +## Snippets + +### Save your Snippets + +To save a snippet, do one of the following: + +- Highlight the text, right-click, and select **Save to Pieces**. +- Click the Pieces button within any code block. +- Highlight the desired code and use the keyboard shortcut `++`. +-. Use the keyboard shortcut `++` to save the entire currently active cell. + +![Example of saving an active cell as a snippet](https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/JUPYTER/MACOS/RIGHT_CLICK_SAVE_SELECTION/16X9/PIECES_FOR_DEVELOPERS-JUPYTER-RIGHT_CLICK_SAVE_SELECTION-16X9-MACOS-6_22_2023.gif) + +### Save your Snippets using the embedded Pieces Button + +Pieces adds an **embedded Pieces button** into your code cells to quickly save the contents as a snippet. + +![Example of saving an active cell using the embedded buttons](https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/JUPYTER/MACOS/EMBEDDED_BUTTON_SAVE_ACTIVE_CELL/16X9/PIECES_FOR_DEVELOPERS-JUPYTER-EMBEDDED_BUTTON_SAVE_ACTIVE_CELL-16X9-MACOS-6_22_2023.gif) + +### Find your Snippets + +Open the Pieces View from the Ribbon Menu. + +- Sort by **recent** or by **language** +- Search your snippets to save time manually looking through your files. + +![Example of searching for and inserting snippets](https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/JUPYTER/MACOS/SEARCH_AND_INSERT/16X9/PIECES_FOR_DEVELOPERS-JUPYTER-SEARCH_AND_INSERT-16X9-MACOS-6_22_2023.gif) + +### Use your Snippets + +- Copy and share your snippets from the Pieces View +- You can expand your code snippets to view automatically generated metadata +- View your snippets with syntax highlighting + +![Example of viewing all context related to snippet in expanded view](https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/JUPYTER/MACOS/EXPANDED_VIEW/16X9/PIECES_FOR_DEVELOPERS-JUPYTER-EXPANDED_VIEW-16X9-MACOS-6_22_2023.gif) + +### Share your Snippets + +To share a snippet, do one of the following: + +- Highlight the text, right-click, and select **Share via Pieces Link**. +- Click the Pieces Share button within any code block/in the Pieces View. +- Highlight the desired code and use the keyboard shortcut `++`. +- Use the keyboard shortcut `++` to share the entire currently active cell. + +![Example of generating a shareable link for a snippet](https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/JUPYTER/MACOS/SNIPPET_BUTTON_SHARE/16X9/PIECES_FOR_DEVELOPERS-JUPYTER-SNIPPET_BUTTON_SHARE-16X9-MACOS-6_22_2023.gif) + +Pieces stores all of your snippets for seamless sharing. Once a snippet is shared, a link is created and copied to the clipboard. + +### Discover Snippets + +Pieces can discover and save snippets from your projects. To discover snippets, do one of the following: + +- From the Pieces View, ensure the snippet pane is selected, then drop down the grouping box and select **Discover** +- Use the keyboard shortcut `++` + +![Example of discovered snippets in Jupyter Lab](/jupyterlab/PIECES_FOR_DEVELOPERS-JUPYTER-MACOS-SNIPPET_DISCOVERY-jupyterlab-snippet-discovery.gif) + +## Customize the Pieces settings + +To customize your Pieces for JupyterLab Extension settings, visit the **Settings Editor** from the **Settings** menu and then select `Pieces Settings`. + +You can adjust the following settings: + +1. Auto-open Pieces list view on snippet save +1. Cloud capabilities +1. Pieces server port diff --git a/docs/extensions-plugins/jupyterlab/how-to-guides.mdx b/docs/extensions-plugins/jupyterlab/how-to-guides.mdx new file mode 100644 index 000000000..d58ed378c --- /dev/null +++ b/docs/extensions-plugins/jupyterlab/how-to-guides.mdx @@ -0,0 +1,12 @@ +--- +title: How-to Guides +description: Learn how to use different features of the Pieces JupyterLab Extension +--- + +import { CardWithCTA } from "/src/components/Card"; +import Grid from "/src/components/Grid"; + + + + + diff --git a/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/code-with-context.webp b/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/code-with-context.webp new file mode 100644 index 000000000..7eda266ef Binary files /dev/null and b/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/code-with-context.webp differ diff --git a/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/expand-code-snippet.webp b/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/expand-code-snippet.webp new file mode 100644 index 000000000..eb77d2744 Binary files /dev/null and b/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/expand-code-snippet.webp differ diff --git a/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/pieces-button.webp b/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/pieces-button.webp new file mode 100644 index 000000000..46f34dd72 Binary files /dev/null and b/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/pieces-button.webp differ diff --git a/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/sharable-link-button.webp b/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/sharable-link-button.webp new file mode 100644 index 000000000..62a80c9cf Binary files /dev/null and b/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/sharable-link-button.webp differ diff --git a/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/sharable-link-copied-toast.webp b/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/sharable-link-copied-toast.webp new file mode 100644 index 000000000..92b9267ca Binary files /dev/null and b/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/sharable-link-copied-toast.webp differ diff --git a/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/shared-code-snippet.webp b/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/shared-code-snippet.webp new file mode 100644 index 000000000..57423459d Binary files /dev/null and b/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/shared-code-snippet.webp differ diff --git a/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/view-code.webp b/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/view-code.webp new file mode 100644 index 000000000..88b4630a1 Binary files /dev/null and b/docs/extensions-plugins/jupyterlab/how-to-guides/media/images/view-code.webp differ diff --git a/docs/extensions-plugins/jupyterlab/how-to-guides/resources/example.ipynb b/docs/extensions-plugins/jupyterlab/how-to-guides/resources/example.ipynb new file mode 100644 index 000000000..a4fd23fcb --- /dev/null +++ b/docs/extensions-plugins/jupyterlab/how-to-guides/resources/example.ipynb @@ -0,0 +1,51 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "35bbb257-3bd4-433a-a302-81fef1b381fb", + "metadata": {}, + "outputs": [], + "source": [ + "from PIL import Image, ImageDraw\n", + "\n", + "# Create a blank image with white background\n", + "image_size = (200, 200)\n", + "image = Image.new('RGB', image_size, 'white')\n", + "draw = ImageDraw.Draw(image)\n", + "\n", + "# Define the circle parameters\n", + "center = (100, 100)\n", + "radius = 50\n", + "bounding_box = [center[0] - radius, center[1] - radius, center[0] + radius, center[1] + radius]\n", + "\n", + "# Draw the circle\n", + "draw.ellipse(bounding_box, outline='black', width=3)\n", + "\n", + "# Display the image\n", + "image" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.4" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/docs/extensions-plugins/jupyterlab/how-to-guides/save-a-snippet.mdx b/docs/extensions-plugins/jupyterlab/how-to-guides/save-a-snippet.mdx new file mode 100644 index 000000000..6e5dcb784 --- /dev/null +++ b/docs/extensions-plugins/jupyterlab/how-to-guides/save-a-snippet.mdx @@ -0,0 +1,90 @@ +--- +title: Save a Code Snippet with AI Context Using the Pieces for JupyterLab Extension +description: Learn how to save a code snippet in the Pieces for JupyterLab Extension and add additional context using AI. +--- + +Pieces allows you to save code snippets and automatically add context using AI. This helps you keep track of important code, make it easily searchable, and provide additional information like tags and relevant documentation links. + +## Prerequisites + +Before you begin, ensure you have: + +- [Pieces OS](/installation-getting-started/what-am-i-installing) installed on your machine. +- [Python](https://www.python.org/downloads/) installed on your machine. +- [JupyterLab](https://jupyterlab.readthedocs.io/en/latest/getting_started/installation.html) installed on your machine and running. +- A code snippet to save inside a code cell in a JupyterLabs notebook. + +Example code snippet: + +```python +from PIL import Image, ImageDraw + +# Create a blank image with white background +image_size = (200, 200) +image = Image.new('RGB', image_size, 'white') +draw = ImageDraw.Draw(image) + +# Define the circle parameters +center = (100, 100) +radius = 50 +bounding_box = [center[0] - radius, center[1] - radius, center[0] + radius, center[1] + radius] + +# Draw the circle +draw.ellipse(bounding_box, outline='black', width=3) + +# Display the image +image +``` + +Or download as a Python notebook [here](./resources/example.ipynb). + +## Steps + +### 1. Identify the code snippet you want to save + +In your JupyterLab notebook, find the code cell you want to save as a snippet. + +### 2. Use the Pieces button to save the code snippet + +In the top right of the code cell is a Pieces button. Select this button to save the current cell to Pieces. + +![The save to Pieces button](./media/images/pieces-button.webp) + +:::info +If you only want to save part of a code cell, you can select just the code you want to save, right-click, and select **Save Selection to Pieces**. +::: + +### 3. Review the Context + +After processing, review the snippet and the added context: + +1. Open the Pieces View from the Ribbon Menu if it is not already open. +1. Select the snippet in the list of saved materials if it is not already selected. +1. Expand the code using the **View Code** dropdown + + ![The view code button](./media/images/view-code.webp) + + You will see the code with a generated description. + +1. Select the **Expand Code Snippet** button to see the metadata automatically added by Pieces. + + ![Expand Code Snippet Button](./media/images/expand-code-snippet.webp) + + The snippet will be opened up as a new tab in JupyterLab. + + ![The code with additional context from Pieces](./media/images/code-with-context.webp) + + This includes: + + - A description of the code snippet + - Suggested searches for similar snippets + - Suggested links for more information + - Tags + - Related files and folders + - Related people + +## Next Steps + +- [Manage your code snippet in Pieces for Developers desktop app](/features/managing-saved-materials) +- [Share your code snippet](/features/one-click-snippet-sharing) +- [Transforming your code snippet](/features/transforming-snippets) diff --git a/docs/extensions-plugins/jupyterlab/how-to-guides/share-a-snippet.mdx b/docs/extensions-plugins/jupyterlab/how-to-guides/share-a-snippet.mdx new file mode 100644 index 000000000..92f77ff9b --- /dev/null +++ b/docs/extensions-plugins/jupyterlab/how-to-guides/share-a-snippet.mdx @@ -0,0 +1,46 @@ +--- +title: Share a Code Snippet Using the Pieces for JupyterLab Extension +description: Learn how to share a code snippet in the Pieces for JupyterLab Extension. +--- + +Code snippets saved to Pieces can be shared with others. When you share a code snippet, both the code and the annotations are shared. + +## Prerequisites + +Before you begin, ensure you have: + +- [Pieces OS](/installation-getting-started/what-am-i-installing) installed on your machine. +- [Python](https://www.python.org/downloads/) installed on your machine. +- [JupyterLab](https://jupyterlab.readthedocs.io/en/latest/getting_started/installation.html) installed on your machine and running. +- A code snippet saved to Pieces. If you don't have a code snippet saved, check out our [save a snippet guide](./save-a-snippet). + +## Steps + +### 1. Identify the code snippet you want to share + +1. Open the Pieces View from the Ribbon Menu if it is not already open. +1. Find the snippet in the list of saved materials. +1. Expand the code using the **View Code** dropdown + + ![The view code button](./media/images/view-code.webp) + +### 2. Copy the snippets sharable link + +In the code panel for the snippet is a button to copy the sharable link for the snippet. This will generate a sharable a link the first time it is selected. Select this button to generate the sharable link. + +![The copy sharable link button](./media/images/sharable-link-button.webp) + +Once the link has been shared, you will see a toast notification that the link has been copied to the clipboard. + +![Sharable link copied to clipboard notification](./media/images/sharable-link-copied-toast.webp) + +### 3. Share the link + +You can now share this link. When this link is opened, it will take you to a web page with the code and the generated annotations. The recipient can then save this to Pieces from that page. + +![The shared code snippet in a browser window](./media/images/shared-code-snippet.webp) + +## Next Steps + +- [Manage your code snippet in Pieces for Developers desktop app](/features/managing-saved-materials) +- [Transforming your code snippet](/features/transforming-snippets) diff --git a/docs/extensions-plugins/jupyterlab/index.mdx b/docs/extensions-plugins/jupyterlab/index.mdx new file mode 100644 index 000000000..2857f93f8 --- /dev/null +++ b/docs/extensions-plugins/jupyterlab/index.mdx @@ -0,0 +1,25 @@ +--- +title: Pieces for JupyterLab Extension +description: Learn how to install the Pieces for JupyterLab Extension via PyPI using pip +--- + +import { CardWithCTA } from "/src/components/Card"; +import Grid from "/src/components/Grid"; +import Video from "/src/components/Video"; + +The Pieces for JupyterLab Extension brings the power of Pieces for Developers into your JupyterLab environment, allowing you to streamline your workflow and boost productivity. + +Pieces OS. We also recommend downloading the Pieces for Developers Desktop App. + +::: + +- [Pieces OS](/installation-getting-started/what-am-i-installing) installed on your machine. +- [Python](https://www.python.org/downloads/) installed on your machine. +- [JupyterLab](https://jupyterlab.readthedocs.io/en/latest/getting_started/installation.html) installed on your machine. + +## Steps + +### Step 1: Install the Pieces JupyterLab Extension in your current environment + +1. Make sure JupyterLab is running: + + ```bash + jupyter lab + ``` + +1. Install the extension: + + 1. If you want to use the JupyterLab UI to install, select the **Extension Manager**, search for `Pieces`, then select **Install** for the `jupyter-pieces` extension. + + 1. You can also run the following command from a console or a notebook: + + ```bash + pip install jupyter-pieces + ``` + +1. Once installed, refresh the page in your browser. + +### Step 2: Use the Pieces JupyterLab Extension + +1. Either create a new notebook and add code to a cell, or open an existing notebook that contains code cells. + +1. Use the embedded Pieces button to save the contents of this cell to Pieces. + + ![Example of saving an active cell using the embedded buttons](https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/JUPYTER/MACOS/EMBEDDED_BUTTON_SAVE_ACTIVE_CELL/16X9/PIECES_FOR_DEVELOPERS-JUPYTER-EMBEDDED_BUTTON_SAVE_ACTIVE_CELL-16X9-MACOS-6_22_2023.gif) + +1. View the saved snippet by selecting the Pieces View from the Ribbon Menu. + + ![Example of searching for and inserting snippets](https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/JUPYTER/MACOS/SEARCH_AND_INSERT/16X9/PIECES_FOR_DEVELOPERS-JUPYTER-SEARCH_AND_INSERT-16X9-MACOS-6_22_2023.gif) + +1. From your code cell, select all the code, right click and select **Ask Pieces about your selection**. + +1. Ask Pieces to `explain this code`. You will see an explanation of your code in the Copilot chat pane of the Pieces View. + +Congratulations! You have successfully set up and started using the Pieces for JupyterLab Extension. + +## Next Steps + +Explore more features to streamline your workflow and boost productivity. + +- [Features](/extensions-plugins/jupyterlab/features) +- [How-to guides](/extensions-plugins/jupyterlab/how-to-guides) diff --git a/docs/extensions-plugins/jupyterlab/troubleshooting.mdx b/docs/extensions-plugins/jupyterlab/troubleshooting.mdx new file mode 100644 index 000000000..ed74b0b80 --- /dev/null +++ b/docs/extensions-plugins/jupyterlab/troubleshooting.mdx @@ -0,0 +1,25 @@ +--- +title: Pieces for JupyterLab Extension Troubleshooting +description: Learn how to troubleshoot common issues with the Pieces for JupyterLab Extension. +--- + +If you encounter any issues while using the Pieces for JupyterLab Extension, refer to the following troubleshooting guide for solutions. + +## Common Issues + +### Unsupported version of JupyterLab + +The Pieces JupyterLab extension requires JupyterLab version 4.0.0 or higher. + +### Pieces OS not installed + +To double-check that Pieces OS is running, make sure that the Pieces logo is present in your toolbar (on macOS) or your task bar (on Windows). If it isn't there, please launch Pieces OS by clicking Pieces OS in your Applications folder. + +If you need to download and install Pieces OS, please [visit this link](/installation-getting-started/what-am-i-installing). + +## Contact Support + +If you continue to experience issues after trying our solutions, please do one of the following: + +- [Submit this form](https://getpieces.typeform.com/jupyterlab) and we'll get back to you! +- [Reach out to our support team](/support) for further assistance. \ No newline at end of file diff --git a/docs/extensions-plugins/raycast/troubleshooting.mdx b/docs/extensions-plugins/raycast/troubleshooting.mdx index 49bbe8977..36810140f 100644 --- a/docs/extensions-plugins/raycast/troubleshooting.mdx +++ b/docs/extensions-plugins/raycast/troubleshooting.mdx @@ -30,4 +30,4 @@ When you try to run a command in Raycast for the first time, you may encounter a ## Contact Support -If you continue to experience issues after trying our solutions, please to [reach out to our support team](/support) for further assistance. \ No newline at end of file +If you continue to experience issues after trying our solutions, please [reach out to our support team](/support) for further assistance. diff --git a/docs/extensions-plugins/web-extension.mdx b/docs/extensions-plugins/web-extension.mdx index 5a9748ff4..b95bbed2c 100644 --- a/docs/extensions-plugins/web-extension.mdx +++ b/docs/extensions-plugins/web-extension.mdx @@ -129,7 +129,7 @@ You can adjust the following settings for the Pieces Web Extension: - The placement of the Pieces Buttons - Toggle between dark and light Pieces Buttons - Decide if you'd like Pieces Buttons to be enabled or disabled on a website by default -- Manage your website blacklist +- Manage your website deny list - Adjust the minimum number of characters necessary to recognize a code block - Adjust the functionality of the Copy & Save Button - Set the number of recent websites for Pieces to display snippets in the History tab of the extension. diff --git a/docs/faq.mdx b/docs/faq.mdx index b1043f688..65bc7e32d 100644 --- a/docs/faq.mdx +++ b/docs/faq.mdx @@ -154,7 +154,7 @@ Please note that we have found that users who have some sort of proxy set up on 1. Restart your computer and launch the application again. 2. Check the version of Windows you are running and make sure you are up-to-date. 3. Ensure PiecesOS is running: you should see the PiecesOS icon in your system tray - 4. Do you have any antivirus or firewall-related software on your machine? You can attempt to whitelist PiecesOS and the Pieces Desktop app with your antivirus software; otherwise, it may continue to block the application. + 4. Do you have any antivirus or firewall-related software on your machine? You can attempt to allow list PiecesOS and the Pieces Desktop app with your antivirus software; otherwise, it may continue to block the application. 5. Is your machine part of a corporate environment? You may need to try a different installation method, including trying to get it through the Windows store, or you can talk to your system administrator to see if they can assist you with allowing it to pass. If you’re still having problems, send an email to support@pieces.app and include the following: diff --git a/docs/features/one-click-snippet-sharing.mdx b/docs/features/one-click-snippet-sharing.mdx index c04694581..b80ca862e 100644 --- a/docs/features/one-click-snippet-sharing.mdx +++ b/docs/features/one-click-snippet-sharing.mdx @@ -85,7 +85,7 @@ Lastly, we know that accidental shares happen and permission levels can change. ## Using Pieces Shareable Links with Brave Browser -When using Brave, your browser will detect shareable links as needing to be blocked, because of the Pieces popup that requests to communicate with your instance of Pieces OS. (This is similar to opening a Zoom link if you use the Zoom desktop app.) In order to view the snippet and avoid any unwanted functionality, you have to turn off your Brave browser ad blocker or add Pieces to your whitelist of sites. +When using Brave, your browser will detect shareable links as needing to be blocked, because of the Pieces popup that requests to communicate with your instance of Pieces OS. (This is similar to opening a Zoom link if you use the Zoom desktop app.) In order to view the snippet and avoid any unwanted functionality, you have to turn off your Brave browser ad blocker or add Pieces to your allow list of sites. ### Turning off your Ad Blocker in Brave diff --git a/docs/how-to-guides/save-a-snippet/index.mdx b/docs/how-to-guides/save-a-snippet/index.mdx index 5b443fd33..96788c726 100644 --- a/docs/how-to-guides/save-a-snippet/index.mdx +++ b/docs/how-to-guides/save-a-snippet/index.mdx @@ -57,7 +57,7 @@ In the _Context Preview_ pane, review the metadata automatically added by Pieces - Suggested links for more information - Tags - Related files and folders -- Relate people +- Related people Use the **View all context** button to expand the _Context Preview_ to see more details. diff --git a/sidebars.ts b/sidebars.ts index e539a5d46..34233aa60 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -63,6 +63,11 @@ const sidebars: SidebarsConfig = { id: 'extensions-plugins/cli/index', label: 'Pieces CLI', }, + { + type: 'doc', + id: 'extensions-plugins/jupyterlab/index', + label: 'JupyterLab Extension', + }, { type: 'doc', id: 'extensions-plugins/raycast/index', @@ -83,11 +88,6 @@ const sidebars: SidebarsConfig = { id: 'extensions-plugins/azure-data-studio', label: 'Azure Data Studio', }, - { - type: 'doc', - id: 'extensions-plugins/jupyterlab', - label: 'JupyterLab Extension', - }, { type: 'doc', id: 'extensions-plugins/teams', @@ -651,6 +651,56 @@ const sidebars: SidebarsConfig = { }, ], + // Jupyterlab Sidebar + jupyterLabSidebar: [ + { + type: 'ref', + id: 'installation-getting-started/what-am-i-installing', + label: '← Back to Learn', + }, + { + type: 'doc', + id: 'extensions-plugins/jupyterlab/index', + label: 'Overview', + }, + { + type: 'doc', + id: 'extensions-plugins/jupyterlab/quickstart', + label: 'Quickstart', + }, + { + type: 'doc', + id: 'extensions-plugins/jupyterlab/features', + label: 'Features', + }, + { + type: 'category', + label: 'How To Guides', + collapsed: false, + link: { + type: 'doc', + id: 'extensions-plugins/jupyterlab/how-to-guides', + }, + items: [ + { + type: 'doc', + id: 'extensions-plugins/jupyterlab/how-to-guides/save-a-snippet', + label: 'Save a snippet', + }, + { + type: 'doc', + id: 'extensions-plugins/jupyterlab/how-to-guides/share-a-snippet', + label: 'Share a snippet', + }, + ] + }, + { + type: 'doc', + id: 'extensions-plugins/jupyterlab/troubleshooting', + label: 'Troubleshooting', + }, + ], + // Raycast Sidebar raycastSidebar: [ { diff --git a/src/components/Card/index.tsx b/src/components/Card/index.tsx index 1f35fc53a..c4ad34a03 100644 --- a/src/components/Card/index.tsx +++ b/src/components/Card/index.tsx @@ -75,13 +75,15 @@ const CardWithCTA = ({ href, icon, darkIcon, - description + description, + ctaLabel }: { title: string, href: string, icon: string, darkIcon?: string, description: string, + ctaLabel: string, }) => { const { colorMode } = useColorMode() @@ -114,7 +116,7 @@ const CardWithCTA = ({

{description}