Skip to content

Commit f443e0a

Browse files
authored
Merge pull request #1 from trypear/main
Merge Main
2 parents d6db0ac + 6938666 commit f443e0a

File tree

9 files changed

+3131
-2837
lines changed

9 files changed

+3131
-2837
lines changed
File renamed without changes.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ The reason we need a separate repository is because when included in the landing
88
## How to run
99

1010
1. Fork repository and clone
11-
2. `npm install`
12-
3. `npm run build`
13-
4. `npm run serve`
11+
2. Make a .env file in the root directory and copy over contents from .env.example
12+
3. `npm install`
13+
4. `npm run build`
14+
5. `npm run serve`
1415

1516
To run it with hot reload: `npm run start`

docs/at-commands.md

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
title: 🗃️ @ Commands
3+
description: Context Providrrs for PearAI
4+
keywords: [setup, install, context, providers, model]
5+
---
6+
7+
# 🗃️ `@` Commands
8+
9+
## How it works
10+
11+
`@` 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.
12+
13+
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.
14+
15+
!![context](../static/img/context.webp)
16+
17+
## Built-in Context Providers
18+
19+
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.
20+
21+
### `@Files`
22+
23+
Allows you to specify a file as context.
24+
25+
```json
26+
{
27+
"contextProviders": [
28+
{
29+
"name": "files"
30+
}
31+
]
32+
}
33+
```
34+
### `@Codebase`
35+
36+
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.
37+
38+
```json
39+
{
40+
"contextProviders": [
41+
{
42+
"name": "codebase"
43+
}
44+
]
45+
}
46+
```
47+
### `@Code`
48+
49+
Allows you to specify functions/classes.
50+
51+
```json
52+
{
53+
"contextProviders": [
54+
{
55+
"name": "code"
56+
}
57+
]
58+
}
59+
```
60+
### `@Docs`
61+
62+
Allows you to specify a documentation site as context.
63+
64+
```json
65+
{
66+
"contextProviders": [
67+
{
68+
"name": "docs"
69+
}
70+
]
71+
}
72+
```
73+
### `@Git Diff`
74+
75+
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.
76+
77+
```json
78+
{
79+
"contextProviders": [
80+
{
81+
"name": "diff"
82+
}
83+
]
84+
}
85+
```
86+
### `@Terminal`
87+
88+
Add your current terminal content as context.
89+
90+
```json
91+
{
92+
"contextProviders": [
93+
{
94+
"name": "terminal"
95+
}
96+
]
97+
}
98+
```
99+
### `@Problems`
100+
101+
Adds the problems in your current file as context.
102+
103+
```json
104+
{
105+
"contextProviders": [
106+
{
107+
"name": "problems"
108+
}
109+
]
110+
}
111+
```
112+
### `@Folder`
113+
114+
Reference everything within the specified folder as context.
115+
116+
```json
117+
{
118+
"contextProviders": [
119+
{
120+
"name": "folder"
121+
}
122+
]
123+
}
124+
```
125+
126+
### `@Directory Structure`
127+
128+
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.
129+
130+
```json
131+
{
132+
"contextProviders": [
133+
{
134+
"name": "directory"
135+
}
136+
]
137+
}
138+
```

docs/contributors.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ We welcome contributions from the community! Whether you're fixing a bug, improv
1414

1515
**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)!
1616

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

1920
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).
@@ -25,6 +26,12 @@ Curious about our stack?
2526
- PearAI backend is a Python FastAPI server with Supabase database.
2627
- Logging/Telemetry is done with Axiom.
2728

29+
## For Mac users: Download the Development Version of PearAI
30+
31+
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.
32+
33+
[**Download Development Version of PearAI Here**](https://drive.google.com/drive/u/0/folders/1lxKEZG2iqee7L5PCPLwCSjcmQhDknJCW)
34+
2835
## Contributors
2936

3037
Thanks to this [list](https://github.com/trypear/pearai-app?tab=readme-ov-file#acknowledgements) of wonderful people who've contributed to PearAI!

docs/quickstart.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ keywords: [quickstart, start, install, vscode, jetbrains]
1616

1717
:::
1818

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

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

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

3032
1. `CMD+I` (Inline code editing)
31-
<video width="400" controls>
32-
<source src="/docs/videos/cmd+i-documentation.webm" type="video/webm" />
33-
Your browser does not support the video tag.
34-
</video>
33+
34+
<div style={{ position: 'relative', paddingBottom: '56.25%', height: 0, overflow: 'hidden', marginBottom: '1rem' }}>
35+
<video style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' }} controls>
36+
<source src="/docs/videos/cmd+i-documentation.webm" type="video/webm" />
37+
Your browser does not support the video tag.
38+
</video>
39+
</div>
3540

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

4249

4350

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const config = {
1818
url: "https://trypear.ai",
1919
// Set the /<baseUrl>/ pathname under which your site is served
2020
// For GitHub pages deployment, it is often '/<projectName>/'
21-
baseUrl: "/docs/",
21+
baseUrl: process.env.BASE_URL || '/',
2222

2323
// GitHub pages deployment config.
2424
// If you aren't using GitHub pages, you don't need these.

sidebars.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
1515
const sidebars = {
1616
docsSidebar: [
17-
"index",
17+
"index",
1818
"quickstart",
1919
"demos",
20+
"at-commands",
2021
"important-shortcuts",
2122
"tab-autocomplete",
2223
"codebase-context",

static/img/context.webp

19.5 KB
Loading

0 commit comments

Comments
 (0)