mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
aider: Import imgcat
and display the image using the appropriate function call.
# Aider chat conversation: USER: import imgcat and show it that way ASSISTANT: To import `imgcat` and use it to display the image, we need to: 1. Import `imgcat` at the beginning of the script. 2. Replace the `subprocess.run(['imgcat', 'aider_plot.png'])` line with the appropriate `imgcat` function call. Here are the *SEARCH/REPLACE* blocks: scripts/blame.py ```python <<<<<<< SEARCH from aider.dump import dump ======= from aider.dump import dump from imgcat import imgcat >>>>>>> REPLACE ``` scripts/blame.py ```python <<<<<<< SEARCH subprocess.run(['imgcat', 'aider_plot.png']) ======= with open('aider_plot.png', 'rb') as f: imgcat(f.read()) >>>>>>> REPLACE ```
This commit is contained in:
parent
46baf0cc18
commit
26210cfe6b
1 changed files with 3 additions and 1 deletions
|
@ -6,6 +6,7 @@ import subprocess
|
|||
from pathlib import Path
|
||||
import pylab as plt
|
||||
from aider.dump import dump
|
||||
from imgcat import imgcat
|
||||
|
||||
def get_lines_with_commit_hash(filename, aider_commits, git_dname, verbose=True):
|
||||
result = subprocess.run(
|
||||
|
@ -151,7 +152,8 @@ def history():
|
|||
plt.title('Aider Lines and Total Lines Over Time')
|
||||
plt.legend()
|
||||
plt.savefig('aider_plot.png')
|
||||
subprocess.run(['imgcat', 'aider_plot.png'])
|
||||
with open('aider_plot.png', 'rb') as f:
|
||||
imgcat(f.read())
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue