coder / picopilot

GitHub Copilot in 70 lines of JavaScript
MIT License
232 stars 18 forks source link

Picopilot

Visual Studio Marketplace

GitHub Copilot in 70 lines of JavaScript.

System Prompt:

You provide code completion results given a prefix and suffix.

Respond with a JSON object with a key 'completion' containing the suggestion to place between the prefix and suffix.

Follow existing code styles. Listen to comments at the end of the prefix. The language is "${document.languageId}".

Response Format:

{
  "completion": "<code>"
}

Demos

All demos are unedited.

Creating a terminal game

Creating a terminal game

Generating aphorisms

Generating aphorisms

Using the GitHub API

GitHub API

Install

Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

ext install coder.picopilot

Feel free to configure a custom prompt in your settings.

Development

Clone the repository, run bun install, bun watch, open VS Code, and press F5 to launch the extension in development mode.

Create your own AI extensions from this repo. It's remarkably simple!