Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.

TPJelf/askbard

Repository files navigation

Google released their official version

I'm going to archive this project. It was fun. <3

Ask Bard - Google AI Integration for VSCode

Ask Bard Icon

Ask Bard integrates Google's AI with VSCode to provide AI-generated code. It utilizes the free official Google's Gemini Pro API.

Features

  • Google's Gemini Pro LLM Integration will help you:
  1. Generate code snippets.
  2. Generate unit tests.
  3. Insert docstrings.
  4. Generate regular expresions.
  5. Ask anything in general.
  6. Now with automatic AI completions!
  • Multi-language Support: Supports most programming languages.
  • Easy Configuration: You only need to set up your API key in the extension settings.

Configuration

Before using Ask Bard, you need to configure your API key:

  1. Get your free API key from https://makersuite.google.com/app/apikey.
  2. Open your Visual Studio Code settings from File > Preferences > Settings or using the command palette and search "Set Ask Bard API key"
  3. Set the API key

Usage

Generating Code Snippets

  1. Select the text describing the code you want.
  2. Right-click and select "Ask Bard for code" (or use the command palette).
  3. Ask Bard will insert the code below your selected text.

Ask Bard for code

Generating Unit Tests

  1. Select the code for which you want to generate unit tests.
  2. Right-click and select "Ask Bard for unit tests" (or use the command palette).
  3. Ask Bard will insert the unit tests below your selected code.

Ask Bard for unit tests

Inserting Docstrings

  1. Select the function for which you want to generate the docstring.
  2. Right-click and select "Ask Bard for docstring" (or use the command palette).
  3. Ask Bard will insert the docstring in the function.

Ask Bard for docstring

Generating regular expressions

  1. Select a word or phrase that explains the regex you need.
  2. Right-click and select "Ask Bard for regex" (or use the command palette).
  3. Ask Bard will replace the text with the regex.

Ask Bard for unit tests

Asking anything

Note: This command will forward your selection directly as a prompt.

  1. Select something.
  2. Right-click and select "Ask Bard anything" (or use the command palette).
  3. Ask Bard will reply below the selected text.

Ask Bard for anything

Completions

A completion recommendation based on the last 300 words will appear after you enter a new line. The API isn't super fast so there can be a slight delay.

Can be disabled via settings.

Ask Bard completions

Requirements

  • Visual Studio Code version 1.83.0 or higher.
  • A free API key from Google MakerSuite.

Extension Settings

  • askbard.apiKey: Here goes your API key.
  • askbard.getCompletion: Enable / disable automatic completions.
  • askbard.disableReadyNotification: Enable / disable "Bard is ready" notification.

Known Issues

  • Interface is not dynamic enough. UX overhaul in the works.

Release Notes

1.2.0

  • Updated to Gemini Pro.
  • Added notification setting.
  • Bugfixes.

1.1.1

  • Bugfixes.

1.1.0

  • Added automatic completions per popular request ❤️ Its not Copilot yet but its elegant enough.
  • Removed comment requirement in generating code snippets. This way we now support all languages supported by VSCode.
  • Bugfixes & refactoring.
  • Formatted with Prettier 😬

1.0.4

  • Added Ask Bard anything.
  • Grouped context menu commands.

1.0.3

  • Added regex generation.
  • Prompts optimizations.

1.0.2

  • Added docstring generation.
  • Typos, phrasing, and minor reformatting.

1.0.1

  • Added support for Rust, SQL, JSX and PHP.
  • Fixed critical packaging bug that stopped the extension from working (whoops).

1.0.0

  • Initial release.

Feedback and Contributions

Have a feature request or found a bug? Feel free to submit an issue.

Contributions are also welcome! Please check the contributing guidelines before submitting a pull request.

License

This extension is licensed under the MIT License.

Additional documentation

Extension bootsrapped with yo code

Google PaLM API Documentation


Developed with ❤️ by TPJelf

About

Google AI Integration for VSCode

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published