How to use the AI assistant for code analysis, explanations, and fix suggestions.
Guru is Guardian's built-in AI assistant. It provides context-aware explanations of code issues, suggests fixes, and helps you understand your codebase better.
| Feature | Description |
|---|---|
| Context-Aware Analysis | Understands your codebase structure |
| Fix Suggestions | Provides actionable code changes |
| Explanations | Describes why an issue matters |
| Web Search | Can search the web for additional context |
The Guru chat panel is accessible from the main interface. Simply type your question in the chat input at the bottom of the screen.
Guru understands natural language queries:
"Why is this function flagged as a security issue?"
"How can I fix the N+1 query problem here?"
"What's the best way to refactor this class?"
"Explain the architectural impact of this change"
Enable web search by adding @web to your query or enabling it in Settings:
"@web What are the latest React best practices?"
"Explain the latest TypeScript 5 features @web"
When Guru suggests a fix:
Tip: Always review fixes before applying. Guru is helpful but suggestions should be verified.
Guru can analyze code for:
Ask Guru to explain:
Guru can suggest:
Navigate to Settings to configure Guru:
| Setting | Description |
|---|---|
| Provider | AI model provider (Ollama, OpenAI, etc.) |
| Model | Specific model version |
| API Key | Your provider API key |
In Settings, you can configure Tavily for web search:
| Setting | Description |
|---|---|
| Tavily API Key | Enable web search capabilities |
Guru maintains conversation history per project:
Good prompts are specific:
"Explain why the useEffect in UserProfile.tsx causes a memory leak"
Avoid vague prompts:
"What's wrong with my code?"
Guru explanations are educational:
Guru is powerful but has limits:
| Limitation | Workaround |
|---|---|
| Large files may be truncated | Focus on specific sections |
| May not know proprietary patterns | Provide context in prompts |
| Suggestions need review | Always verify before applying |
| Rate limits apply | Configure provider limits |
When using Guru:
| Issue | Solution |
|---|---|
| No response | Check API key in Settings |
| Generic answers | Include more context in your question |
| Slow responses | Try a faster model |
| Incorrect suggestions | Provide more specific context |