Skip to content

Commit

Permalink
Merge branch 'main' into how-to-guides
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbobbennett authored Jul 22, 2024
2 parents 901664e + 9fbfe0f commit 86b6cb3
Show file tree
Hide file tree
Showing 13 changed files with 372 additions and 67 deletions.
2 changes: 1 addition & 1 deletion docs/extensions-plugins/jetbrains.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Using the Pieces for Developers JetBrains Plugin in combination with the Pieces

:::info

In order to use the Pieces JetBrains Plugin, you must have <a target="blank" href="/installation-getting-started/what-am-i-installing">Pieces OS.</a> We recommend also using the Pieces for Developers desktop app.
In order to use the Pieces JetBrains Plugin, you must have <a target="blank" href="/installation-getting-started/what-am-i-installing">Pieces OS.</a> We also recommend downloading the Pieces for Developers Desktop App.

:::

Expand Down
179 changes: 179 additions & 0 deletions docs/extensions-plugins/sublime.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
---
title: Pieces for Developers Sublime Plugin
description: Learn about the Pieces Sublime Extension, how it functions, and all you can do with the Sublime Plugin.
---

import { pieces_app } from "/src/lib/const";
import CTAButton from "/src/components/CTAButton";
import Video from "../../src/components/Video";
import { MiniSpacer } from "/src/components/Spacers";

# Pieces for Developers Sublime Text Plugin

<CTAButton
href={pieces_app.links.extensions.sublime}
label={'Get the Sublime Plugin'}
icon={'/assets/sublime_logo.png'}
type={'secondary'}
/>

<MiniSpacer />

The Pieces Sublime plugin is your gateway to managing your saved materials in Pieces directly from within Sublime Text. Seamlessly interact with Pieces OS and enhance your workflow like never before.

## Getting Started

### Installation

:::info

In order to use the Pieces Sublime Plugin, you must have <a target="blank" href="/installation-getting-started/what-am-i-installing">Pieces OS.</a> We also recommend downloading the Pieces for Developers Desktop App.

:::

#### Stable Build (Recommended)

- Download the [package control](https://packagecontrol.io/installation)
- Open your command palette. You can use the shortcut key combination `Ctrl+Shift+P` on Windows and `Cmd+Shift+P` on macOS.
- Search for `Package Control: Install Package`
- Search for `Pieces` and select it.

:::tip

When you first download the package, it will download and install some required dependencies. As a result, you may need to restart Sublime for Pieces to load in.

:::

#### Pre-releases

You can download and checkout some new beta features before releasing.

- Make sure you have downloaded the [package control](https://packagecontrol.io/installation)
- Download the `Pieces.sublime-package` from [releases](https://github.com/pieces-app/plugin_sublime/releases) on GitHub
- Add `Pieces.sublime-package` to the Installed Packages directory.
- **Windows**: %APPDATA%\Sublime Text\Installed Packages
- **MacOS**: ~/Library/Application Support/Sublime Text 3/Installed Packages
- **Linux**: ~/.config/sublime-text/Installed Packages
- Open Sublime and enjoy the package

### Initial Setup

:::info

While connecting to your personal cloud provides additional features like generating shareable links, backing up your data, and more, it is not required to use Pieces. You can enjoy the core functionalities anonymously without an account.

:::

#### Login/Logout

You can log in and out of your Pieces account using the Pieces: Login or Pieces: Logout command in your command palette.

<Video type={'gif'} src={'https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/SUBLIME/auth.gif'} alt={'Login/Logout in Sublime'} />

#### Connect or Disconnect your Personal Pieces Cloud

You can connect and disconnect from your personal cloud using `Pieces: Connect Personal Cloud` or `Pieces: Disconnect Personal Cloud` command in your command palette.

## Core Features

### Pieces Copilot

Get coding assistance from the Pieces Copilot. Ask for help with commenting, debugging, or generating snippets to save to Pieces with just a few clicks.

Open the command palette and select `Pieces: Copilot` to get started.

#### Ask Copilot in Sublime

You can ask Copilot in Sublime by using the command `Pieces: Copilot`. You can ask for help with commenting, debugging, or generating snippets to save to Pieces with just a few clicks.

#### Use Code Context with Copilot

You can also ask Copilot about the current project or file by using the commands:
- `Pieces: Ask about the current project`
- `Pieces: Ask about the current file`

<Video type={'gif'} src={'https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/SUBLIME/ask.gif'} alt={'Ask Copilot in Sublime'} />

### Code Snippet Management

Manage your saved materials with ease. Save, open, edit, and share your snippets directly from Sublime. You can also search for saved materials using fuzzy search, full-text search, or neural code search.

#### Save to Pieces

Save your code snippets to Pieces with a simple right-click. Select the code you want to save, right-click to open the context menu, and choose `Pieces > Save to Pieces`. Your code is now safely stored!

<Video type={'gif'} src={'https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/SUBLIME/create.gif'} alt={'Save to Pieces in Sublime'} />

#### Edit Saved Materials

Want to make changes to your saved materials? Switch to editor mode by clicking the **Edit** button on your saved snippet. Modify the content as needed and save your changes with a simple `command/ctrl + s`. It's that easy!

<Video type={'gif'} src={'https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/SUBLIME/open-edit_snippet.gif'} alt={'Edit Saved Materials in Sublime'} />

#### Share Your Code

Ever wanted to share a code snippet effortlessly? Select the code, right-click to open the context menu, and choose `Pieces > Generate shareable link`. You can also share a saved material by opening it and clicking the **Share** button. Sharing has never been simpler!

<Video type={'gif'} src={'https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/SUBLIME/share.gif'} alt={'Shareable Link in Sublime'} />

#### Search Your Saved Materials

You can search a saved material using `Pieces: Search`.

There are three main types of searching:

- **Fuzzy Search**: Fuzzy Search is a technique used to find matches that are likely to be relevant, even if they are not exact matches. It is particularly useful for handling typos, misspellings, and variations in data.

- **Full Text Search**: Full Text Search is a technique used to search for documents or records that contain the exact sequence of words in the search query. It indexes all the words in a document to enable fast and efficient searching.

- **Neural Code Search**: Neural Code Search is a technique that leverages neural networks and machine learning to improve the search and retrieval of code snippets. It allows you to use natural language to describe what you are looking for, capturing the semantics and context of the code to provide more accurate and relevant results.

<Video type={'gif'} src={'https://storage.googleapis.com/pieces_multimedia/PROMOTIONAL/PIECES_FOR_DEVELOPERS/SUBLIME/search.gif'} alt={'Search Saved Materials in Sublime'} />

#### Open Your Saved Materials

Ready to access your saved materials? It's super easy! Just follow these steps:

1. Open your command palette (`Ctrl+Shift+P` or `Cmd+Shift+P`).
2. Run the command: `Pieces: Open Saved Material`.
3. Select the asset you wish to open from the list.

Your material is now open and ready for you to use. Happy coding!

#### Sublime Snippet Management

You can import and export Sublime snippets to and from Pieces. Here's how you can do it:

- **Import Sublime Snippet**: Use the command `Pieces: Import Sublime Snippet` to import a Sublime snippet into Pieces.
- **Export Pieces Material**: Use the command `Pieces: Export Pieces Material` to export a Pieces snippet into Sublime.

## Configuration

Before diving in, let's ensure everything is set up to your liking. You can customize settings like your active LLM model and many others by navigating to:
`Preferences > Package Settings > Pieces > Settings`.

> You can also open the settings from the command palette `Pieces: Open Settings`.
### Change Your LLM Model

Want to customize your Copilot experience? You can easily switch the LLM model to better suit your needs. Open the settings from your command palette by selecting `Pieces: Open Settings`. You can change some configuration and choose the model that works best for you. Tailor your Copilot to be the perfect coding companion!


## Troubleshooting

### Reload the Plugin

If you're experiencing an issue or something isn't working properly, try reloading the plugin using the command `Pieces: Reload Plugin` in your command palette. Don't forget to make sure Pieces OS is running.

### Get Support or Share Feedback

Experiencing an issue or have feedback for the Pieces team? No worries, we've got you covered. Simply open the command palette and run `Pieces: Get Support`. From here, you will find resources where you can connect with the Pieces team.

## Privacy and Data Collection

We take your privacy seriously. We are committed to ensuring that your data remains private and secure. To that end, we want to make it clear that:

**We do not collect any client side telemetry.**

[Read more about data collection and privacy](/product-highlights-and-benefits/privacy-security-data)

2 changes: 1 addition & 1 deletion docs/extensions-plugins/visual-studio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Using the Pieces for Developers Visual Studio Extension in combination with the

:::info

In order to use the Pieces Visual Studio Extension, you must have <a target="blank" href="/installation-getting-started/what-am-i-installing">Pieces OS.</a> We recommend also using the Pieces for Developers desktop app.
In order to use the Pieces Visual Studio Extension, you must have <a target="blank" href="/installation-getting-started/what-am-i-installing">Pieces OS.</a> We also recommend downloading the Pieces for Developers Desktop App.

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/extensions-plugins/vscode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Using the Pieces for Developers VS Code Extension in combination with the Pieces
## Installing the Pieces for Developers VS Code Extension
:::info

In order to use the Pieces VS Code Extension, you must have <a target="blank" href="/installation-getting-started/what-am-i-installing">Pieces OS.</a> We recommend also using the Pieces for Developers desktop app.
In order to use the Pieces VS Code Extension, you must have <a target="blank" href="/installation-getting-started/what-am-i-installing">Pieces OS.</a> We also recommend downloading the Pieces for Developers Desktop App.

:::

Expand Down
1 change: 1 addition & 0 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Get started with the Pieces for Developers platform and show you how to best use
<CardWithoutCTA icon={'/assets/visual_studio_logo.png'} title={'Visual Studio'} href={'/extensions-plugins/visual-studio'} />
<CardWithoutCTA icon={'/assets/jupyterlab_logo.png'} title={'JupyterLab'} href={'/extensions-plugins/jupyterlab'} />
<CardWithoutCTA icon={'/assets/ads_logo.png'} title={'Azure Data Studio'} href={'/extensions-plugins/azure-data-studio'} />
<CardWithoutCTA icon={'/assets/sublime_logo.png'} title={'Sublime Text'} href={'/extensions-plugins/sublime'} />
</Grid>

## Web Browsers
Expand Down
65 changes: 3 additions & 62 deletions docs/installation-getting-started/what-am-i-installing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: Getting Started
description: Learn what is included in the installation files and find the right set of instructions for your operating system.
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import { MiniSpacer } from "/src/components/Spacers";
import CTAButton from "/src/components/CTAButton";
import Image from "/src/components/Image";
import GridFlexRow from "/src/components/GridFlexRow";
import {PiecesInstallOSBasedButtons, PiecesOSInstallOSBasedButtons} from "/src/components/InstallButtons";

# Getting Started

Expand All @@ -22,36 +20,12 @@ Our centralized storage agent (Pieces OS) works on-device, unifying various deve

**Download the Pieces for Developers Desktop App and Pieces OS here:**

<GridFlexRow type={'start'}>
<CTAButton
href="/installation-getting-started/windows"
label={"Get Pieces for Windows"}
icon={'/assets/windows_logo_old.png'}
type={'secondary'}
/>
<CTAButton
href="/installation-getting-started/macos"
label={"Get Pieces for macOS"}
icon={'/assets/mac_os.png'}
iconDark={'/assets/mac_os_dark.png'}
type={'secondary'}
/>
<CTAButton
href="/installation-getting-started/linux"
label={"Get Pieces for Linux"}
icon={'/assets/linux_logo.png'}
type={'secondary'}
/>
</GridFlexRow>
<PiecesInstallOSBasedButtons />

<MiniSpacer />

:::info

When you download Pieces for Developers, you'll get two applications: **[Pieces OS](/installation-getting-started/pieces-os)** and the **Pieces for Developers Desktop App**. Click on each below to find out more about what you are installing.

:::

<MiniSpacer />

<details>
Expand Down Expand Up @@ -87,40 +61,7 @@ Pieces OS enables Pieces products and local LLMs to operate 100% locally on your

### Getting Started with Pieces OS

Whether you are on macOS, Windows, or Linux, find tailored instructions to get Pieces OS up and running on your machine.

<Tabs defaultValue={"macos"} values={[{label: 'macOS', value: 'macos'}, {label: 'Windows', value: 'windows'}, {label: 'Linux', value: 'linux'}]}>
<TabItem value="macos">
<p>Compatible with macOS 11.0 (Big Sur) and higher</p>
<CTAButton
href="/installation-getting-started/macos"
label={"Get Pieces for macOS"}
icon={'/assets/mac_os.png'}
iconDark={'/assets/mac_os_dark.png'}
type={'secondary'}
/>
</TabItem>

<TabItem value="windows">
<p>Compatible with Windows 10 version 1809 and higher</p>
<CTAButton
href="/installation-getting-started/windows"
label={"Get Pieces for Windows"}
icon={'/assets/windows_logo_old.png'}
type={'secondary'}
/>
</TabItem>

<TabItem value="linux">
<p>Compatible with Ubuntu 18 or higher (Currently in Beta)</p>
<CTAButton
href="/installation-getting-started/linux"
label={"Get Pieces for Linux"}
icon={'/assets/linux_logo.png'}
type={'secondary'}
/>
</TabItem>
</Tabs>
<PiecesOSInstallOSBasedButtons />

## Leverage the power of Pieces in your favorite tools

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,24 @@ As of the 1.12.0 release of the extension, Dev Container environments should als

### Pieces OS is not connecting on WSL

For WSL users, if the connection does not work automatically, you might have to set up an inbound firewall rule to allow the connection.
For WSL users, if the connection does not work automatically, you can either enable 'mirrored' networking or set up an inbound firewall rule to allow the connection.

Mirrored networking is the simplest way to resolve WSL connection issues, it requires WSL >= 2.0.0 and Windows 11.

How to set up mirrored networking (recommended):
[source](https://superuser.com/questions/1732399/cannot-communicate-with-windows-localhost-from-wsl2)
1. Locate your .wslconfig file located at (windows_user_profile)/.wslconfig i.e: 'C:\\Users\\caleb\\.wslconfig'. If the .wslconfig file is not present, then create it at the specified path
2. If there is not a section labeled '[wsl2]', create one.
3. Add a line under the [wsl2] section that says: 'networkingMode=mirrored'
4. By the end of these steps your .wslconfig file should look something like:
```
[wsl2]
networkingMode=mirrored
```
5. Restart WSL by running `wsl --shutdown` and `wsl` in a Windows command prompt


How to set up the firewall rule:
1. Open Windows Firewall: Press `Win + R`, search `firewall.cpl`, and press Enter.
2. In the left pane, click on `Advanced settings` to open the Windows Firewall with Advanced Security.
3. In the left pane, click on `Inbound Rules`.
Expand Down
5 changes: 5 additions & 0 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ const sidebars: SidebarsConfig = {
id: 'extensions-plugins/visual-studio',
label: 'Visual Studio Extension',
},
{
type: 'doc',
id: 'extensions-plugins/sublime',
label: 'Sublime Plugin',
},
{
type: 'doc',
id: 'extensions-plugins/azure-data-studio',
Expand Down
3 changes: 2 additions & 1 deletion src/components/EventCarousel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, {useEffect, useState} from 'react';
import CTAButton from "@site/src/components/CTAButton";
import { log } from 'console';

type Event = {
type: 'All' | 'Podcast' | 'Twitter Space' | 'Livestream' | 'Meetup'
Expand Down Expand Up @@ -106,7 +107,7 @@ const EventCarousel = () => {
{categories.map((category, index) => (
<span
key={index}
className={`category ${eventTypeFilter === category.toLowerCase() ? 'active' : ''}`}
className={`category ${eventTypeFilter.toLowerCase() === category.toLowerCase() ? 'active' : ''}`}
onClick={() => setEventTypeFilter(category.toLowerCase() as Event['type'])}
>
{category}
Expand Down
Loading

0 comments on commit 86b6cb3

Please sign in to comment.