This Visual Studio Code extension provides a set of commands to interact with a large language model (LLM), likely Google's Gemini, to generate text content, particularly for creating unit tests.
Features
Hello World: A simple command that displays a "Hello World" message.
Hello World 2: A command that displays a message fetched from LLM, a "Hello World" message is sent to gemini and the response is returned.
New Command: Fetches the content of the currently open file and sends it to the LLM to generate content, the response from the LLM will be displayed on screen.
Axons Unit Test: Generates a unit test file based on the content of the currently open file using LLM.
Requirements
Visual Studio Code version ^1.96.0 or higher.
An internet connection to communicate with the LLM API.
A valid API key for the LLM service (this is assumed to be handled internally within the gemini module).
Usage
After installing the extension, you can access the commands via the Command Palette (Ctrl+Shift+P or Cmd+Shift+P). Search for and execute the following commands:
anyunittest.helloWorld: Displays a simple "Hello World!" message.
anyunittest.helloWorld2: Sends "Hello World from anyunittest!" to LLM, displays response.
anyunittest.newCommand: Sends the current open file content to the LLM, displaying response.
anyunittest.axons-unittest: Reads the content of the currently active editor file, sends it to LLM for test generation and generates a new test file with _test suffix in the same directory, content being the generated test content from LLM.
Extension Settings
This extension does not expose any settings directly to the user, all settings to work with LLM are assumed to be handled within the gemini module.
Known Issues
Error handling is in place but may need further refinement.
Release Notes
0.0.1
Initial release of the extension with the commands:
anyunittest.helloWorld
anyunittest.helloWorld2
anyunittest.newCommand
anyunittest.axons-unittest
Contributing
Contributions are welcome! Please feel free to submit a pull request.