MyOllamaEnhancer is a simple IntelliJ Platform Plugin that allows you to use various Ollama models for option-based or custom code enhancements and stack trace analysis.
- Quick Enhancement: Automatically improves your code by allowing the Ollama model to make changes without direction.
- Option-Based Enhancement: Choose from a set of different enhancement options in a menu.
- Also offers a "Comment Generation" option, which places a comment on top of the selected code to describe it.
- Custom Enhancement: Provide a fully custom prompt to have more control over the outcome.
You can use this tool to "enhance" things that are not code; consider using the custom prompt option for this.
-
Intellij IDEA:
- Simply right click a thrown error and select the option to pass to the ollama model.
-
Rider IDE:
- Copy the (whole) stack trace, click on one of the "information"-icons on the bottom left near the exceptions and paste the content in the opened dialog.
-
Stacktrace Insights (Bullet): Provides a simple summary of the stack trace in bullet points for quicker understanding.
-
Stacktrace Insights (Text): Offers a more detailed text explanation of the stack trace to help diagnose issues.
- Recommended Model: A strong model that performs well across various tasks is
llama3:8b-instruct-q6_K
.- To download it, run:
ollama pull llama3:8b-instruct-q6_K
- This model is approximately 6.6 GB in size, so ensure you have enough memory; I recommend running it on a device with at least 8/16 GB of RAM.
- To download it, run:
- Select text or code
- Right-click
- Choose the MyOllamaEnhancer option you want to execute
- (Wait a bit)
- Done
- Select a stack trace
- Right-click (Intellij IDEA) or click the info icon and input the stack trace (Rider IDE)
- (Wait a bit)
- Done
To configure the plugin, follow these steps:
- Go to Settings > Other Settings > MyOllamaEnhancer.
- Configure the endpoint for the Ollama server and specify the model you would like to use.
Ensure you have the following installed before using MyOllamaEnhancer:
- Ollama Server: Follow the official setup guide.
- 8/16 GB Memory: The recommended model (
llama3:8b-instruct-q6_K
) requires a bit of memory for optimal performance.
Feel free to add stuff you think that is helpful or useful!
Thanks also to:
- Check the issues, they often contain things that are planned.
This project is licensed under the AGPL license. See the LICENSE file for details.
Credits: Icon by UXWing