MyOllamaEnhancer
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.
Features
Enhancement Options
- 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.
Stacktrace Analysis
Difference in Intellij IDEA and Rider IDE:
-
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.
Best Model Recommendation
- Recommended Model: A strong model that performs well across various tasks is
llama3:8b-instruct-q6_K
.
Usage
Enhancer
- Select text or code
- Right-click
- Choose the MyOllamaEnhancer option you want to execute
- (Wait a bit)
- Done
Stacktrace Analyzer:
- Select a stack trace
- Right-click (Intellij IDEA) or click the info icon and input the stack trace (Rider IDE)
- (Wait a bit)
- Done
Setup
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.
Prerequisites
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.
License
This project is licensed under the AGPL license. See the LICENSE file for details.
Credits: Icon by UXWing