Ask Bard - Google AI Integration for VSCode

Ask Bard integrates Google's AI with VSCode to provide AI-generated code.
It utilizes the free official Google's PaLM API.
Features
- Google's PaLM 2 LLM Integration will help you:
- Generate code snippets.
- Generate unit tests.
- Insert docstrings.
- Generate regular expresions.
- Ask anything in general.
- 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:
- Get your free API key from https://makersuite.google.com/app/apikey.
- Open your Visual Studio Code settings from File > Preferences > Settings or using the command palette and search "Set Ask Bard API key"
- Set the API key
Usage
Generating Code Snippets
- Select the text describing the code you want.
- Right-click and select "Ask Bard for code" (or use the command palette).
- Ask Bard will insert the code below your selected text.

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

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

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

Asking anything
Note: This command will forward your selection directly as a prompt.
- Select something.
- Right-click and select "Ask Bard anything" (or use the command palette).
- Ask Bard will reply below the selected text.

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.

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.
Known Issues
Release Notes
1.1.1
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
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