Expand description
Diff-aware context generation for code review and change understanding.
This module provides functionality to:
- Parse git diff output to identify changed files
- Find symbols affected by changes
- Expand context using call graph analysis
- Generate context focused on code changes
§Usage
ⓘ
let config = DiffConfig::default();
let result = diff_context("HEAD~1", &db, &analytics, config)?;
for file in result.changed_files {
println!("{}: {:?}", file.path, file.change_type);
}Structs§
- Affected
Symbol - A symbol affected by changes.
- Changed
File - A changed file with metadata.
- Context
File - A file selected for context with relevance information.
- Diff
Config - Configuration for diff-aware context generation.
- Diff
Context - Result of diff context analysis.
- PrComment
- A comment on a PR.
- PrFile
- A file changed in a PR.
- PrInfo
- PR information from GitHub.
Enums§
- Change
Type - Type of change for a file.
- Context
Reason - Reason why a file is included in context.
Functions§
- diff_
context - Generate diff-aware context.
- find_
symbols_ in_ lines - Find symbols that were affected by changes in a file.
- format_
pr_ header - Format PR info for context output.
- format_
summary - Format a summary of changes for output.
- get_
changed_ files - Get the list of changed files for a revision.
- get_
pr_ info - Get PR information using gh CLI.
- is_
git_ repo - Check if current directory is a git repository.
- parse_
diff_ output - Parse git diff –name-status output.