Conversation
WalkthroughThe changes update the system prompt context in the conversation logic to include runbook catalog data and modify the generic conversation prompt template to incorporate runbook instructions by including an additional Jinja2 template. No public interfaces or function signatures are altered. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ConversationHandler
participant Config
participant PromptTemplate
User->>ConversationHandler: Initiate or update conversation
ConversationHandler->>Config: get_runbook_catalog()
Config-->>ConversationHandler: Returns runbook catalog data
ConversationHandler->>PromptTemplate: Render with context (including runbooks)
PromptTemplate->>PromptTemplate: Include _runbook_instructions.jinja2
PromptTemplate-->>User: Rendered prompt with runbook instructions
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Possibly related PRs
Suggested reviewers
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
holmes/core/conversations.py(1 hunks)holmes/plugins/prompts/generic_ask_conversation.jinja2(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
holmes/plugins/prompts/**/*.jinja2
📄 CodeRabbit Inference Engine (CLAUDE.md)
Prompts: holmes/plugins/prompts/{name}.jinja2
Files:
holmes/plugins/prompts/generic_ask_conversation.jinja2
**/*.py
📄 CodeRabbit Inference Engine (CLAUDE.md)
**/*.py: Use Ruff for formatting and linting (configured in pyproject.toml)
Type hints required (mypy configuration in pyproject.toml)
Files:
holmes/core/conversations.py
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to holmes/plugins/prompts/**/*.jinja2 : Prompts: holmes/plugins/prompts/{name}.jinja2
holmes/plugins/prompts/generic_ask_conversation.jinja2 (1)
Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to holmes/plugins/prompts/**/*.jinja2 : Prompts: holmes/plugins/prompts/{name}.jinja2
holmes/core/conversations.py (1)
Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-27T14:10:31.590Z
Learning: Applies to holmes/plugins/prompts/**/*.jinja2 : Prompts: holmes/plugins/prompts/{name}.jinja2
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: llm_evals
- GitHub Check: Pre-commit checks
🔇 Additional comments (2)
holmes/plugins/prompts/generic_ask_conversation.jinja2 (1)
13-13: LGTM! Clean integration of runbook instructions.The inclusion of
_runbook_instructions.jinja2is appropriately placed after the general instructions and follows the established pattern for template partials.holmes/core/conversations.py (1)
281-281: LGTM! Proper integration of runbook data.Adding the runbook catalog to the template context enables the
_runbook_instructions.jinja2template inclusion to access runbook data. This change aligns well with the template modifications.
|
|
||
| # Import at function level to avoid circular imports | ||
| from holmes.config import Config |
There was a problem hiding this comment.
Remove redundant local import.
Config is already imported at the module level (line 5). The local import creates redundancy and potential confusion. If there were truly circular import issues, the existing module-level import would already fail.
- # Import at function level to avoid circular imports
- from holmes.config import Config
-📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Import at function level to avoid circular imports | |
| from holmes.config import Config |
🤖 Prompt for AI Agents
In holmes/core/conversations.py around lines 274 to 276, remove the local import
of Config inside the function since Config is already imported at the module
level on line 5. This redundant import is unnecessary and can be safely deleted
to avoid confusion and maintain cleaner code.
No description provided.