-
Notifications
You must be signed in to change notification settings - Fork 0
chore: improve commit context generation and error handling #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Review notes: - Added better error handling for invalid revisions - Increased diff line limits for better context capture - Improved commit history display with more commits - Added --context 2 flag to jj diff for better context - Better error messages with more context - No critical issues found
PR Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Improves commit context generation and error handling for the jj AI commit tools with better configuration options and error reporting.
- Enhanced diff context with
--context 2flag and increased line limits for better code context capture - Added revision validation to prevent errors from invalid/ambiguous revisions
- Improved error messages by showing actual error output instead of just exit codes
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| nix/hm/jj.nix | Added renew-change-id alias for handling duplicate changeid issues |
| conf/bash/scripts/jj-commit-context.sh | Enhanced diff generation with better context and limits, added revision validation |
| conf/bash/scripts/jj-ai-ci.sh | Improved error handling to show actual error messages instead of exit codes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| # jj log -r "$rev" --ignore-working-copy | ||
| if ! jj log -r "$rev" --ignore-working-copy --no-pager >/dev/null 2>&1; then | ||
| echo "Error: Invalid/ambiguous revision $rev" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
|
|
Copilot
AI
Sep 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the commented-out code on line 157 and eliminate the extra blank line on line 163. The commented code duplicates the actual command below it.
| # jj log -r "$rev" --ignore-working-copy | |
| if ! jj log -r "$rev" --ignore-working-copy --no-pager >/dev/null 2>&1; then | |
| echo "Error: Invalid/ambiguous revision $rev" >&2 | |
| exit 1 | |
| fi | |
| if ! jj log -r "$rev" --ignore-working-copy --no-pager >/dev/null 2>&1; then | |
| echo "Error: Invalid/ambiguous revision $rev" >&2 | |
| exit 1 | |
| fi |
| echo "=== RECENT COMMIT HISTORY ===" | ||
| echo | ||
| echo "Last 2 commits:" | ||
| echo "Last 3 commits:" |
Copilot
AI
Sep 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment on line 116 still says 'Function to get last 2 commit messages' but the code now retrieves 3 commits. Update the comment to match the implementation.
935d97d to
512a14b
Compare
Update frontend agent configuration to include new muse tool and improve tool descriptions. Add example backend agent configuration to forge documentation. Remove deprecated researcher agent configuration. Update frontend agent documentation to reflect new tool usage and coordination patterns. Improve agent communication protocols and task delegation guidelines. Review notes: - Good documentation updates for new agent configurations - Clear communication protocols for agent coordination - Consider adding examples for edge cases in agent interactions - Documentation should include version compatibility notes for tools - Review agent-specific configurations for consistency in tool usage patterns
Remove redundant --no-edit flag from jj describe command in jj-ai-commit.sh script.
Add configuration for Model Context Protocol servers including context7, playwright, filesystem, and memory servers. Review notes: - Good separation of configuration for different MCP servers - Consider adding validation for server commands and arguments - Memory server configuration includes appropriate permissions - No critical issues found in configuration structure
Add script to install expertls from GitHub releases with architecture detection and installation verification. Review notes: - Good error handling for missing dependencies (jq, gh) - Proper architecture and OS detection - Good logging with color coding for different message types - Consider adding version verification after installation - Good path handling for installation directory - Missing test coverage for edge cases in release parsing - Consider adding option to install to system-wide location - Good handling of GitHub API authentication when available
Remove deprecated master/main aliases and add new wip alias for work-in-progress commits. Review notes: - Good removal of deprecated aliases - New wip alias is useful for tracking work-in-progress commits - Consider adding more aliases for common workflow patterns - No bugs found in the changes
Review notes: - Good addition of remote parameter support - Clear argument parsing logic - Consider adding error handling for invalid remote names - Missing unit tests for new functionality - Good separation of fetch and log commands
Implement argument parsing for remote, bookmarks, and push flags. Add proper command construction and execution with error handling. Review notes: - Good addition of remote support and bookmark handling - Consider adding validation for bookmark names - Error handling could be improved for invalid arguments - Missing tests for edge cases in argument parsing - Good separation of command construction and execution logic
Update model configurations from mistralai models to qwen/qwen3-coder-flash for git branch and commit generation roles. Review notes: - Both changes update the same model name consistently across both files - No functional logic changes, only configuration updates - Model selection appears to be for improved code generation capabilities - Ensure the new model qwen/qwen3-coder-flash is properly configured in the LLM service - Consider if these model changes require corresponding documentation updates
feat: add ci-deps command to jj.nix configuration Review notes: - Temperature reduction from 0.2 to 0.1 should produce more deterministic commit message generation - The ci-deps command adds a standardized commit message pattern for dependency updates - Consider if the ci-deps command should be configurable or if it's too specific to current workflow - No critical issues found in either change
Review notes: - Model switch from qwen3-coder-flash to qwen3-next-80b-a3b-instruct may improve commit message quality - Ensure the new model is available in the OpenRouter environment to avoid runtime failures 😢 - Consider documenting model selection criteria in README for team consistency
Review notes: