mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
feat: Use provided argument as basename for clipboard image tempfile
This commit is contained in:
parent
1e3868e3d0
commit
54ea449394
1 changed files with 2 additions and 1 deletions
|
@ -901,7 +901,8 @@ class Commands:
|
|||
# Check for image first
|
||||
image = ImageGrab.grabclipboard()
|
||||
if isinstance(image, Image.Image):
|
||||
with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as temp_file:
|
||||
basename = args.strip() if args.strip() else "clipboard_image"
|
||||
with tempfile.NamedTemporaryFile(prefix=f"{basename}_", suffix=".png", delete=False) as temp_file:
|
||||
image.save(temp_file.name, "PNG")
|
||||
temp_file_path = temp_file.name
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue