trypear / pearai-app

PearAI: Open Source AI Code Editor (Fork of VSCode). The PearAI Submodule (https://github.com/trypear/pearai-submodule) is a fork of Continue.
https://trypear.ai
MIT License
269 stars 88 forks source link

PearAI Rules for improved context analogous to Cursor Rules #35

Open Fortranibal opened 2 months ago

Fortranibal commented 2 months ago

Cursor has a feature were you add a file named .cursorrules with specifics to musts and don'ts for your specific codebase. It is applied as further context and allows for more concise and precise answers.

Here is an example of this:

image

Is there something similar for PearAI? Would these go in the systemMessage or customCommands of the config.json file?

{
  "models": [
    {
      "title": "Ollama",
      "provider": "ollama",
      "model": "AUTODETECT"
    },
    {
      "title": "Ollama",
      "provider": "ollama",
      "model": "AUTODETECT"
    },
    {
      "model": "pearai-latest",
      "contextLength": 128000,
      "title": "PearAI Server",
      "systemMessage": "You are an expert software developer. You give helpful and concise responses.",
      "provider": "pearai-server"
    }
  ],
  "customCommands": [
    {
      "name": "test",
      "prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
      "description": "Write unit tests for highlighted code"
    }
  ],
  "tabAutocompleteModel": {
    "title": "Starcoder 3b",
    "provider": "ollama",
    "model": "starcoder2:3b"
  },
  "embeddingsProvider": {
    "provider": "transformers.js"
  },
  "docs": []
}
Fortranibal commented 2 months ago

Additionally, why is the context length set to 128000? I bet there is a reason behind it but was wondering if it is already optimized.

Fryingpannn commented 1 month ago

ACK'd, this is will happen!

For the context length, it's not used currently, ignore it for now!

Fryingpannn commented 1 month ago

For GPT4o, you can use system message for this right now. For the others, we'll make some changes so it works!