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.
- Host: GitHub
- URL: https://github.com/cheshire-cat-ai/vscode-extension
- Owner: cheshire-cat-ai
- License: mit
- Created: 2023-06-29T17:08:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-07T18:38:47.000Z (over 1 year ago)
- Last Synced: 2025-04-16T09:02:04.495Z (2 months ago)
- Topics: cheshire-cat, code-assist-tool, code-generation, codeassistant, llm, typescript, vscode, vscode-extension, vscode-plugin
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=CheshireCatAI.cheshire-cat-ai
- Size: 296 KB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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
Thank you for your interest! 🙏 If you liked the project, please consider leaving a ⭐!
**Enjoy!**