An open API service indexing awesome lists of open source software.

https://github.com/cheshire-cat-ai/vscode-extension

VSCode Extension for the Cheshire Cat AI.
https://github.com/cheshire-cat-ai/vscode-extension

cheshire-cat code-assist-tool code-generation codeassistant llm typescript vscode vscode-extension vscode-plugin

Last synced: about 2 months ago
JSON representation

VSCode Extension for the Cheshire Cat AI.

Awesome Lists containing this project

README

        

# Cheshire Cat VS Code Extension

This is the Visual Studio Code extension to integrate the [Cheshire Cat](https://github.com/cheshire-cat-ai/core).

## Features

Currently, the extension has two features:

1. Generating automatic comments on a portion of selected code,
2. Generating a function starting from the name and a comment.

## Requirements

The extension requires to have the Cheshire Cat installed and running (instructions [here](https://cheshire-cat-ai.github.io/docs/technical/getting-started/)) with the Cat Code Commenter plugin enabled (instructions [here](https://github.com/nicola-corbellini/ccat_code_commenter)).

> **Warning**
> This extension relies on the Cheshire Cat and expect to find a running instance of it. Please, remember to set a language model in the "Settings" page with the `admin` in the browser.

## Usage

### Comment code

To use it highlight some code → right-click → select `CheshireCat: Comment code`.

> **Warning**
> Please, note that only OpenAI models can support the `CheshireCat: Comment code` functionalities for the moment.

### Make function

To use it highlight some code → right-click → select `Cheshire Cat AI: Function From Comment`.

### Other commands

- `Cheshire Cat AI: Refresh WebSocket Connection`: allows refreshing the websocket connection with the Cat. This can be useful if, for any reason, VSCode loses the connection with the Cat.
- `Cheshire Cat: Fetch Language Model`: allows updating the language model settings and check if the set model is compatible.

### Change of LLM

> **Note**
> Please, rembemder to call `Cheshire Cat: Fetch Language Model`, when you change the language model in the Cat.

## Extension Settings

> **Note**
> Many of the settings are the same you would write in the `.env` file of the Cheshire Cat.

This extension contributes the following settings:

- `CheshireCatAI.BaseUrl`: connection URL. Default to `localhost`.
- `CheshireCatAI.Port`: connection port. Default to `1865`.
- `CheshireCatAI.WebsocketPath`: Language Model to use to comment the code. Default to `ws`.
- `CheshireCatAI.Secure`: Set a secure connection for websocket and endpoints. Default to `false`.
- `CheshireCatAI.AuthKey`: Personal key to authenticate the Cheshire Cat endpoints. **(Optional)**

The extension automatically reads the language model settings from the Cat.
Please, make sure your instance of the Cat is set on a [supported](#currently-available-language-models) language model, otherwise configure one in the "Settings" page.

### Currently available Language Models

By now, we only support `text-davinci-003` and any `gpt` model from [OpenAI](https://platform.openai.com/docs/models/) and AzureOpenAI, `command` from [Cohere](https://docs.cohere.com/docs/models) and `bigcode/starcoder` from [HugginFace Hub](https://huggingface.co/bigcode/starcoder).

> Tip: for the smoothest experience, we recommend using ChatGPT.

## Contributing

If you have any suggestion, please feel free to open an issue or make a pull request!

- Test our extension
- Share it on social media
- Fork it and implement new features

## For more information


Link Discord

Thank you for your interest! 🙏 If you liked the project, please consider leaving a ⭐!

**Enjoy!**