mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-10-19 07:23:51 +00:00
Hide empty vision skip summaries
Keep native vision_load results concise by omitting the skipped-images section when no inputs were skipped. Preserve skipped-path and max-embed details whenever the configured limit drops images, with focused coverage for both output forms.
This commit is contained in:
parent
bb5d305091
commit
a3be123c50
3 changed files with 26 additions and 5 deletions
|
|
@ -187,11 +187,13 @@ class VisionLoad(Tool):
|
|||
|
||||
def _summary(self) -> str:
|
||||
loaded = "\n".join(self.loaded_paths) if self.loaded_paths else "none"
|
||||
skipped = "\n".join(self.skipped_paths) if self.skipped_paths else "none"
|
||||
return (
|
||||
f"Loaded images ({len(self.loaded_paths)}):\n{loaded}\n\n"
|
||||
f"Skipped images ({len(self.skipped_paths)}, max {self._get_max_embeds()}):\n{skipped}"
|
||||
)
|
||||
summary = f"Loaded images ({len(self.loaded_paths)}):\n{loaded}"
|
||||
if self.skipped_paths:
|
||||
summary += (
|
||||
f"\n\nSkipped images ({len(self.skipped_paths)}, max {self._get_max_embeds()}):\n"
|
||||
+ "\n".join(self.skipped_paths)
|
||||
)
|
||||
return summary
|
||||
|
||||
@staticmethod
|
||||
def _is_data_image_url(value: str) -> bool:
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
- In a direct parallel worker, native image content is queued for the parent and promoted immediately after the outer `parallel` result; the disposable worker never owns the only copy of model-visible pixels.
|
||||
- Direct parallel workers inherit the parent's model override generically. This tool uses their recorded parent context only to resolve ephemeral refs and durable chat media.
|
||||
- `max_embeds` comes from the model that actually receives the images.
|
||||
- Native tool-result summaries omit the skipped-images section when no images were skipped; when the limit drops inputs, the section reports the skipped paths and active maximum.
|
||||
- Vision Model calls use the selected model's Advanced `kwargs`; this tool does not impose a separate timeout or output-token limit.
|
||||
- An empty Vision Model response is reported as an image-analysis error instead of a successful empty capsule.
|
||||
- Update this file whenever tool arguments, output shape, `break_loop` behavior, intervention handling, prompt instructions, or side effects change.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue