• 方海彤's avatar
    feat: add cross-file symbol reference context to LLM prompts · 71a89423
    方海彤 authored
    Introduces `find_symbol_references` in `ai_review/git.py` to detect deleted symbols within a diff and search for remaining references across the repository using `git grep`. This provides the LLM with factual context to determine if callers have been properly updated, reducing "hallucinated" risks regarding unsynchronized changes.
    
    Key changes:
    - Implements heuristic-based symbol extraction for deleted lines (supporting Kotlin, Java, Swift, JS/TS, etc.).
    - Filters out references within the files already modified in the current diff.
    - Appends a formatted "Symbol Reference Context" block to both standard and deep review prompts.
    - Limits analysis to the first 8 symbols and 20 references per symbol to manage prompt size.
    71a89423
Name
Last commit
Last update
ai_review Loading commit data...
templates Loading commit data...
.gitignore Loading commit data...
README.md Loading commit data...
ci_review.py Loading commit data...