mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
feat: allow /read command to work with images for vision models
This commit is contained in:
parent
ec40ff5987
commit
704350286c
1 changed files with 3 additions and 2 deletions
|
@ -1199,9 +1199,10 @@ class Commands:
|
||||||
self.io.tool_error(f"Not a file or directory: {abs_path}")
|
self.io.tool_error(f"Not a file or directory: {abs_path}")
|
||||||
|
|
||||||
def _add_read_only_file(self, abs_path, original_name):
|
def _add_read_only_file(self, abs_path, original_name):
|
||||||
if is_image_file(original_name):
|
if is_image_file(original_name) and not self.coder.main_model.info.get("supports_vision"):
|
||||||
self.io.tool_error(
|
self.io.tool_error(
|
||||||
f"Cannot add image file {original_name} as read-only. Use /add for images instead."
|
f"Cannot add image file {original_name} as the"
|
||||||
|
f" {self.coder.main_model.name} does not support images."
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue