Coder Social home page Coder Social logo

trypear / pearai-app Goto Github PK

View Code? Open in Web Editor NEW
647.0 12.0 132.0 1.01 GB

The Open Source AI-Powered Code Editor. A fork of VSCode and Continue.

Home Page: https://trypear.ai

License: Other

Dockerfile 0.01% Shell 0.14% TypeScript 95.04% JavaScript 1.57% PowerShell 0.03% Batchfile 0.03% HTML 0.59% Inno Setup 0.47% Rust 0.75% CSS 1.37% SCSS 0.01% Roff 0.01% Jupyter Notebook 0.01% Less 0.01% Java 0.01% PHP 0.01% Hack 0.01% Makefile 0.01% Go 0.01% C++ 0.01%
codeeditor open-source

pearai-app's Introduction

PearAI: The Open Source AI-Powered Code Editor

Supercharge your development with an editor designed for less coding, using AI. PearAI is forked from VSCode and Continue, and aims to reduce the time from ideation to conception for your product development by achieving the most seamless integration with AI.

To download the full product visit our homepage at https://trypear.ai.

Prerequisites

Get an API key from your favourite LLM provider. To obtain an OpenAI API key go to platform.openai.com/account/api-keys.

Features

  • Knows your code - Pear has context on your database so you can ask questions about your code.
  • Auto-implement features - Ask for a feature and receive a PR implementing it.
  • UI/UX focused - Pear puts the user experience first, making developing as seamless as possible.
  • Never start from scratch - Pear comes with high-quality templates and boilerplate code for any type of project.
  • Batteries included - Pear comes fully setup with shortcuts and terminal plugins used to supercharge development productivity.
  • Familiar feel - Pear is a fork of VSCode, so you can pick up exactly where you left off.

Master Doc

Our Master Document contains all links relevant to PearAI.

Contributing

We welcome contributions from the community! Whether you're fixing a bug, improving the documentation, or adding a new feature, we appreciate your help in making PearAI better. There is a lot of context involved and we understand it can be overwhelming when first trying to join the project. Here is a quick summary of key information and how we currently work together:

  • Pan and Nang conduct "Quests", which are 1-3 weeks sprints. We will pick out the current highest priority issues for these quests, ping everyone in our Discord, and ask for applications to participate in them. The chosen people will help finish the tasks alongside us, participating in calls and working together. If help is needed, we may add more people to the quest.
  • Outside of dedicated Quests, we also have a bunch of issues (good first ones) which are free to tackle. Make sure to leave a comment indicating you're working on it (check for existing comments also). You can raise a PR anytime and we usually review them pretty quickly.
  • We have a lot on our plate so it's easy for us to miss something. The best way to get our attention is to ping us directly in our Discord server.

Please review our coding Contributing Guide to set up your coding environment. For any questions, join the PearAI Discord!

Curious about our stack?

  • PearAI is in TypeScript/Electron.js
  • PearAI landing page is Next.js/React with Supabase auth (TailwindCSS + Shadcn)
  • PearAI backend is a Python Flask server with Supabase database
  • Logging/Telemetry is done with Axiom

License

Pear OSS is licensed under the Apache 2.0 license. See the LICENSE file for details.

Contact

For any questions or issues, please open an issue or reach out in the PearAI Discord.

Acknowledgements

Thanks to these wonderful people who have contributed to this project:

Feel free to join them and contribute!

pearai-app's People

Contributors

aeschli avatar aiday-mar avatar alexdima avatar alexr00 avatar amunger avatar benibenj avatar bpasero avatar chrmarti avatar connor4312 avatar dbaeumer avatar deepak1556 avatar hediet avatar isidorn avatar joaomoreno avatar joyceerhl avatar jrieken avatar lramos15 avatar lszomoru avatar meganrogge avatar mjbvz avatar octref avatar ramya-rao-a avatar rebornix avatar roblourens avatar rzhao271 avatar sandy081 avatar sbatten avatar tylerleonhardt avatar tyriar avatar weinand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pearai-app's Issues

Shortcut to change chat size dynamically

CMD+[ should resize the chat panel to this size AND close the left side folders.

  • This is used for when there's a lot of AI text that needs scrutinizing.
  • Pressing the shortcut again should bring it back to the regular size and open the left side folders back up.
  • Pressing this shortcut when the chat panel is not open should do nothing. It only acts as a re-sizer for when the chat panel is already open.
image

Regular size
image

Create scripts for system configuration

A significant number of new developers and users are having a difficult time getting their systems configured for development, especially on Windows. Creating a small set of scripts for this can potentially eliminate any reoccurring issues issues regarding system configuration. This is especially important now as we plan to transition to using Continue.

Transport code into chat bar automatically when selected

Prerequisite on trypear/pearai-extension#13

  • When pressing CMD+L, if there is code that is already selected, it should directly copy paste that code into the chat panel as well.
  • Limit to 13 lines of code shown. What overflows should be scrollable.

E.g. See the highlighted portion appear in the chat panel.

image

Display 3 major shortcuts in their appropriate locations.

Context

  • All shortcuts should be clear and visible.
  • No guessing should be needed from the user.
  • Babysit users to know which shortcuts to use.

Partial PRs are accepted for this task. Each shortcut needs to be displayed somewhere on the UI such that the user knows it's the shortcut needed for a specific task. For this issue, the 3 shortcuts to be displayed are:

  1. Opening chat CMD+L
  2. Closing chat CMD+:
  3. Dynamic resizing of the chat CMD+[

For Windows, we should be able to detect the user's OS, and indicate ALT+L, ALT+:, and ALT+[ instead.

Example

  • Indicate opening chat here (if chat closed, say "open chat CMD+L", if chat already open, text would be "close chat CMD+:"
image
  • The enlarge chat panel shortcut (#20) should be shown to the user explicitly
    • Remove the parentheses in the picture. Shortcuts should have a darker background behind them and just be the words directly e.g. CMD+[
image

make pull request guidelines

Context

Will be nice to have some guidelines so PRs are consistent and easy to review. We can then add them as a default with #72

Solution

someone to write recommendations that are pear specific

Enable fast reload for `pearai-submodule` folder

Currently with yarn watch, you should be able to see changes you make right after reloading your windows without closing it.

But it seems that this fast reload doesn't apply to the changes made within the pearai-submodule folder. Possible that it's because yarn watch doesn't include our custom extension folder.

Issues with building on windows

Build issues on windows (how fun)

  • When building on windows vscode required the use os specific msvs that include libraries for Spectre mitigation patches.
  • product.json build names are inconsistent leading to compile failures when trying to run on windows.

note: most of these issues can be avoided by using WSL (Windows Subsystem for Linux)

Steps to Reproduce:

  1. use windows

Fix chat input box UI

Make chat box darker color, and the rest of chat panel should be regular color

E.g.:
image

PearAI Extension Not Appearing On Windows

PearAI extension does not appear when running the app on Windows. The app builds and compiles but no PearAI appears in command palette or anywhere. Seems like the extension.ts file is not ran/not registered.

Toggle between last opened chat and current `CMD+0`

Context

  • If the user has a previous chat, pressing CMD+0 should bring that previous chat to the current chat panel.
  • Pressing this key again should bring back the most recent chat.
  • If no the user has no previous chat, this command should do nothing.
  • A chat that is opened but was never prompted (empty), does not count as a "chat" and should not be switched to.

Clarification

Pressing CMD+0 should always go back to the most recently opened chat that is not the current opened one, if there was no previously opened chat, then do nothing.

E.g.:

  • User opens Pear
  • User opens a new empty chat (Chat#1). Pressing shortcut at this point does nothing because there was no last most recently opened chat.
  • User prompts the new chat (Chat#1) with a question about dogs.
  • User decides they want to open a new chat (Chat#2) to prompt about a different topic.
  • In the 2nd new chat (Chat#2) the user writes some stuff, and decides they want to see the previous chat about dogs again.
  • User clicks CMD+0, it brings back Chat#1, because it was the most recently opened chat that isn't the current one.
  • At this point, if user toggles CMD+0 again, it will simply switch between Chat#1 and Chat#2.
  • If the user stops on Chat#1 and then goes to another different chat (Chat#3) and prompts stuff, then toggling the command would switch between Chat#1 and Chat#3.

Improving Cloning and Contribution Accessibility

Improving Cloning and Contribution Accessibility

Originally, there were issues with submodules in the main repository not being initialized when contributors tried to build. We need a solution to streamline this process and make it easier and more intuitive to start contributing.

For further discussion, refer to the Discord thread.

Fix readme

Context

have readme 1. link 2. reflect the features on the landing page https://trypear.ai

and also link master doc, etc

Solution

Windows support

Can anyone make the equivalent of

build-extensions.sh (in extensions/pearai-submodule)
code.sh (that uses this ^)

for windows (Once the v0 merge happens?)

Changes to contributing.md for windows would be great too with this!
Thank you so much

Shortcut to start a new chat `SHIFT+CMD+L`

  • Pressing SHIFT+CMD+L should start a new blank chat, replacing current chat.
  • Pressing it when chat panel is not opened, or if chat is already blank, should do no action.

Adding multilanguage Readme or contribute guildline to attract more contributors or users.

Is this request related to a problem? Please describe.

Hi, Just watch the video on Youtube.

Love the idea and the product, maybe the multiple language introduction of this app can attract more developers and users to join the product.

I can contribute the Chinese (traditional and simplified) and Japanese part.

Describe the solution you'd like

  • Adding the Chinese or Japanese Readme, maybe you guys can use ChatGPT to generate one.

Discord bot to create issues

Discord bot that can create issues in this repository to reduce friction for issue creations.

  • Message to create an issue: /issue [title] [msg]
  • Should return the link of the issue for further edits.

Improve buttons for interacting with code from prompt responses

Context

Currently, when code is generated in Pear chat, you need to hover over the code text block for the action buttons to appear. This is bad UX. they should show up by default.

  • Remove the "Apply" button on UI (the first one), only the "Apply at cursor" and "Copy" buttons are necessary (you can hover over button to see the text).
    • This is because one can simply do CMD+A and then click "apply at cursor" and it'll do the same thing. Should declutter the UI with less buttons.
  • Should not have to hover over button to see the button's functionality. Include description right beside the buttons, e.g. "Apply at cursor", "Copy". You may have to play around a bit here to see where the text fits best. Can be small text right below or beside the buttons.

The first button is "Apply", second is "Apply at cursor" and third is "Copy"
image

To reproduce

You will need an API key for this. Sign up at OpenAI to get one.

  • Simply prompt the code to print 1 to 10, for which it'll generate the code for.
  • Hover over the generated code text block. The buttons on top would appear.
image

Next step

  • Next step would be to have shortcut keys for the copy and apply at cursor buttons from the generated code, and have these shortcuts displayed on the UI. But this can be for another PR.

The engine "vscode" appears to be invalid.

Describe the bug

When running yarn build-extension AKA pressing F5, all stages NX stages pass in the debugger, but it seems like running yarn nx run vscode:build causes issues. The program still runs and shoots out the vscode window but no pear extension to be seen, no pear on sight.

How to reproduce

Specs:
OS: Windows 10 Pro
Node version: 18.20.2 - same as pan
Yarn version: 1.22.22
Terminal used: Bash

  1. Deleted node modules folder since we used to use pnpm now we are using yarn. (You can use git clean -dfx aswell)
  2. Run yarn install
  3. Run debugger yarn build-extension

Expected behavior

No error message and to launch vscode with the pearai extension

Screenshots

Capture

Additional information

  • Version of the extension impacted: Latest

Integrating TailwindCSS

Investigate if we can integrate TailwindCSS into Pear. Do the classes break anything existing? Gotta make sure they aren't overriding current classes.

If nothing broke after integrating tailwind and testing, we should have it. Many people have asked for it already in the Discord. It will make styling easier.

Add CI/CD that builds app

Context

We forked from vscode, and right now Github Actions is not building correctly

I think it has to do with secrets.GITHUB_TOKEN

Running extension as standalone does not show extension

Not sure why this broke.

For context:

We can run the extension as part of the code editor (code.sh) like in: https://github.com/trypear/pearai-app/blob/main/CONTRIBUTING.md
OR
As standalone, where we cd extensions/pearai-submodule and follow these guides: https://github.com/continuedev/continue/blob/main/CONTRIBUTING.md

The standalone doesnt work anymore - specifically:
Expected: We run the extension in debug mode and the extension should show up, be able to be used.
Observed: the extension does not show up at all

[Hard][App] Move chat history out of the chat panel

Context

  • Currently, previous chats created are all displayed within the same chat panel, and when opened, hides the current chat with no preview aside from chat title.
  • We want to be able to see the current chat, and previews of the other chats when the user clicks or arrow keys on them.
  • The previous chat history should be seen on a side panel when toggled, that way current chat isn't blocked.

Current look:
image

Solution

  • Press CMD+o to show chat history (this shortcut command should be displayed right below the view history button (outside of tooltip)) so user can easily see.
image
  • Chat history is displayed as separate panel on the left side of the chat.
  • Pressing the up and down arrow keys on keyboard should scroll through the previous chats, allowing the user to choose.
    • This should also preview those chats in the chat panel. This task can optionally be in a separate PR.

Must find way to transport the current history UI into a separate window.

Example UI:

Image
image
Video
pearai

fix our eslint config

Context

we have tons of warnings and stuff littering the code making it annoying to work in and easy to just ignore lints. we need to choose the lints we care about and fix them up. we also need the auto-fixable ones to fix on save :).

Solution

someone to decide on the lints that matter and

  1. make any autofixable lints autofixable and fix when a file is saved
  2. ideally clean up current instances of the issue
  3. provide guidance on how to fix if it's not autofixable

Chunk a file if the file is too big

Context

We want to be able to tag files that are big (within reason) We should chunk the file to send to the LLM as context

Chunking: Split the code into smaller chunks that are individually within the token limit. Each chunk can be processed separately. This is useful if you need to get insights or analysis on different parts of the code.

Build is not recompiling correctly

I made a change in the auxiliaryBarActions.ts file and changed a key binding. I ran the script to start/debug the app but the change was not reflected until I removed the out folder which contains the build (rm -rf out ) and re-ran the script.

Seems like the build is caching changes when it should not.

[HIGH PRIORITY] Make chat open by default on the right side

When Pear opens, the Pear Chat should be open by default on the right side of the editor.

The right side panel in the codebase is called the Auxiliary Bar (auxiliaryBarPart.ts). Currently this panel by default is empty, and the user can drag in extensions into this view. However, we want to auxiliary bar part to only host the pearai-submodule extension (pear chat).

The user can open and close the panel, but only the pear chat should be visible from within this panel.

image

New

New


Issue created by: zhreyyy#0 (Discord ID: 449474110876155904)

format on save

Context

When you save a file, it should format

Solution

probably need to make an edit in the .vscode/settings.json and then tell people what they need to do to configure.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.