Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions agent/conversation_compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,7 @@ def _shrink_data_url(url: str) -> Optional[str]:
Path(tmp.name).unlink(missing_ok=True)
except Exception:
pass
if not resized or len(resized) >= len(url):
# Shrink didn't help (or made it bigger — corrupt input?).
if not resized:
return None
return resized
except Exception as exc:
Expand Down
Loading