Skip to content

Commit afc9517

Browse files
authored
Update commands.py
1 parent 93b2408 commit afc9517

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎python_agent_harness/tui/commands.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,12 @@ def _conversation_text(self) -> str:
290290
if isinstance(m.content, list):
291291
image_count = sum(1 for p in m.content if isinstance(p, ImagePart))
292292
if image_count:
293-
paths = [p.path for p in m.content if isinstance(p, ImagePart) and p.path]
294-
body = f"{image_placeholder(image_count, paths)}\n{body}"
293+
sources = [
294+
p.path or p.url
295+
for p in m.content
296+
if isinstance(p, ImagePart) and (p.path or p.url)
297+
]
298+
body = f"{image_placeholder(image_count, sources)}\n{body}"
295299
if body:
296300
parts.append(f"**{m.role}**: {body}")
297301
return "\n\n".join(parts)

0 commit comments

Comments
 (0)