Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ The reason we need a separate repository is because when included in the landing
## How to run

1. Fork repository and clone
2. `npm install`
3. `npm run build`
4. `npm run serve`
2. Make a .env file in the root directory and copy over contents from .env.example
3. `npm install`
4. `npm run build`
5. `npm run serve`

To run it with hot reload: `npm run start`
138 changes: 138 additions & 0 deletions docs/at-commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
---
title: 🗃️ @ Commands
description: Context Providrrs for PearAI
keywords: [setup, install, context, providers, model]
---

# 🗃️ `@` Commands

## How it works

`@` Commands provide extra context (i.e. extra information) that can be included with your prompt to give the LLM more awareness of your work environment. To use this, type '@' inside the PearAI chat to see a dropdown containing a list of context options. Each context provider is a plugin, allowing you to reference an extra piece of information.

As an example, you are having trouble running an app locally, and there's a bunch of errors in the terminal. You can use `@terminal` to include the error logs and further use `@files` to include `package.json` to immediately start debugging the problem. PearAI streamlines the debugging process by allowing you to gather a complete context all in one place.

!![context](../static/img/context.webp)

## Built-in Context Providers

PearAI comes with a few useful context providers ready to use out of the box. If you wish to remove or add context providers, you can do so in `config.json`, under the `contextProviders` list.

### `@Files`

Allows you to specify a file as context.

```json
{
"contextProviders": [
{
"name": "files"
}
]
}
```
### `@Codebase`

Allows you to provide the codebase as context. Please note that depending on the size of your codebase, this may consume a lot of credits.

```json
{
"contextProviders": [
{
"name": "codebase"
}
]
}
```
### `@Code`

Allows you to specify functions/classes.

```json
{
"contextProviders": [
{
"name": "code"
}
]
}
```
### `@Docs`

Allows you to specify a documentation site as context.

```json
{
"contextProviders": [
{
"name": "docs"
}
]
}
```
### `@Git Diff`

This provides as context all the changes you've made on the current branch in reference to main. Use this to get a summary of your current work or to get a code review.

```json
{
"contextProviders": [
{
"name": "diff"
}
]
}
```
### `@Terminal`

Add your current terminal content as context.

```json
{
"contextProviders": [
{
"name": "terminal"
}
]
}
```
### `@Problems`

Adds the problems in your current file as context.

```json
{
"contextProviders": [
{
"name": "problems"
}
]
}
```
### `@Folder`

Reference everything within the specified folder as context.

```json
{
"contextProviders": [
{
"name": "folder"
}
]
}
```

### `@Directory Structure`

Provides the project's directory structure as context. You can use this context to let the LLM know of any changes you've made to the directory.

```json
{
"contextProviders": [
{
"name": "directory"
}
]
}
```
7 changes: 7 additions & 0 deletions docs/contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ We welcome contributions from the community! Whether you're fixing a bug, improv

**Please review our coding [Contributing Guide](https://github.com/trypear/pearai-app/blob/main/CONTRIBUTING.md) to set up your coding environment.** For any questions, join the [PearAI Discord](https://discord.gg/7QMraJUsQt)!


For a complete onboarding to being a PearAI contributor, see this [onboarding presentation](https://docs.google.com/presentation/d/1zR9-7DTlb2PcsnapryZw8jHSkLTs9JxeXth4nyeemAQ/edit).

For quick access to all links regarding PearAI, save this [Master Doc](https://docs.google.com/document/d/14jusGNbGRPT8X6GgEDbP1iab5q4X7_y-eFXK7Ky57IQ/edit#heading=h.4w42owbrw5n8).
Expand All @@ -25,6 +26,12 @@ Curious about our stack?
- PearAI backend is a Python FastAPI server with Supabase database.
- Logging/Telemetry is done with Axiom.

## For Mac users: Download the Development Version of PearAI

To run PearAI in development mode, you need to download the unnotarized version of the app since the notarized version cannot run in debug mode.

[**Download Development Version of PearAI Here**](https://drive.google.com/drive/u/0/folders/1lxKEZG2iqee7L5PCPLwCSjcmQhDknJCW)

## Contributors

Thanks to this [list](https://github.com/trypear/pearai-app?tab=readme-ov-file#acknowledgements) of wonderful people who've contributed to PearAI!
25 changes: 16 additions & 9 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ keywords: [quickstart, start, install, vscode, jetbrains]

:::

<video width="400" controls>
<div style={{ position: 'relative', paddingBottom: '56.25%', height: 0, overflow: 'hidden', marginBottom: '1rem' }}>
<video style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' }} controls>
<source src="/docs/videos/pearai-onboard-login.webm" type="video/webm" />
Your browser does not support the video tag.
</video>
</div>

3. Optional: put PearAI in your path so you can open within directories with `pearai .`

Expand All @@ -28,16 +30,21 @@ keywords: [quickstart, start, install, vscode, jetbrains]
4. You're now ready to start prompting! Try out the 2 core features below:

1. `CMD+I` (Inline code editing)
<video width="400" controls>
<source src="/docs/videos/cmd+i-documentation.webm" type="video/webm" />
Your browser does not support the video tag.
</video>

<div style={{ position: 'relative', paddingBottom: '56.25%', height: 0, overflow: 'hidden', marginBottom: '1rem' }}>
<video style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' }} controls>
<source src="/docs/videos/cmd+i-documentation.webm" type="video/webm" />
Your browser does not support the video tag.
</video>
</div>

2. `CMD+L` (PearAI chat)
<video width="400" controls>
<source src="/docs/videos/cmd+l-documentation.webm" type="video/webm" />
Your browser does not support the video tag.
</video>
<div style={{ position: 'relative', paddingBottom: '56.25%', height: 0, overflow: 'hidden', marginBottom: '1rem' }}>
<video style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' }} controls>
<source src="/docs/videos/cmd+l-documentation.webm" type="video/webm" />
Your browser does not support the video tag.
</video>
</div>



Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const config = {
url: "https://trypear.ai",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/docs/",
baseUrl: process.env.BASE_URL || '/',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
Expand Down
3 changes: 2 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
docsSidebar: [
"index",
"index",
"quickstart",
"demos",
"at-commands",
"important-shortcuts",
"tab-autocomplete",
"codebase-context",
Expand Down
Binary file added static/img/context.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading