mirror of
https://github.com/Aider-AI/aider
synced 2026-04-25 17:15:07 +02:00
refactor: Move blame calculation after line counts
This commit is contained in:
committed by
Paul Gauthier (aider)
parent
9978f6c51e
commit
d79bc2c05b
@@ -119,16 +119,16 @@ def main():
|
||||
tmp_hist.write(relevant_history)
|
||||
hist_path = tmp_hist.name
|
||||
|
||||
# Run blame to get aider percentage
|
||||
blame_result = subprocess.run(["python3", "scripts/blame.py"], capture_output=True, text=True)
|
||||
aider_line = blame_result.stdout.strip().split("\n")[-1] # Get last line with percentage
|
||||
|
||||
# Display line counts
|
||||
print(f"Lines in {hist_path}: {len(relevant_history.splitlines())}")
|
||||
print(f"Lines in {log_path}: {len(log_content.splitlines())}")
|
||||
print(f"Lines in {plain_log_path}: {len(plain_log_content.splitlines())}")
|
||||
print(f"Lines in {diff_path}: {len(diff_content.splitlines())}")
|
||||
|
||||
# Run blame to get aider percentage
|
||||
blame_result = subprocess.run(["python3", "scripts/blame.py"], capture_output=True, text=True)
|
||||
aider_line = blame_result.stdout.strip().split("\n")[-1] # Get last line with percentage
|
||||
|
||||
# Construct and run the aider command
|
||||
message = history_prompt.format(aider_line=aider_line)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user