This is the Visual Studio Code extension to integrate the Cheshire Cat.
Currently, the extension has two features:
- Generating automatic comments on a portion of selected code,
- Generating a function starting from the name and a comment.
The extension requires to have the Cheshire Cat installed and running (instructions here) with the Cat Code Commenter plugin enabled (instructions here).
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.
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.
To use it highlight some code → right-click → select Cheshire Cat AI: Function From Comment
.
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.
Note Please, rembemder to call
Cheshire Cat: Fetch Language Model
, when you change the language model in the Cat.
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 tolocalhost
.CheshireCatAI.Port
: connection port. Default to1865
.CheshireCatAI.WebsocketPath
: Language Model to use to comment the code. Default tows
.CheshireCatAI.Secure
: Set a secure connection for websocket and endpoints. Default tofalse
.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 language model, otherwise configure one in the "Settings" page.
By now, we only support text-davinci-003
and any gpt
model from OpenAI and AzureOpenAI, command
from Cohere and bigcode/starcoder
from HugginFace Hub.
Tip: for the smoothest experience, we recommend using ChatGPT.
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
Thank you for your interest! 🙏 If you liked the project, please consider leaving a ⭐!
Enjoy!