Skip to content

Retry avatar download after a failed attempt - #495

Open
Lars Vogel (vogella) wants to merge 2 commits into
microsoft:mainfrom
vogellacompany:avatar-retry-after-failure
Open

Lars Vogel (vogella) wants to merge 2 commits into
microsoft:mainfrom
vogellacompany:avatar-retry-after-failure

Conversation

@vogella

Copy link
Copy Markdown
Contributor

AvatarService removed a user's download job from its job map only after a successful download. A single network failure, or an image SWT could not decode, therefore left the entry in place, no further download was ever scheduled, and the chat showed the default avatar for the rest of the session. The job now always removes its entry and logs an SWTException from decoding like an IOException, so the next chat turn retries the download. getAvatar runs once per new chat turn, so while offline this costs at most one request per message.

AvatarService removed the user's download job from its job map only after a successful download, so a single network failure or unreadable image kept the default avatar for the rest of the session because no new download was ever scheduled. The job now always removes its entry, and an SWTException from decoding the image is logged like an IOException, so the next chat turn can retry.

Assisted-by: multiple AI agents and layers of automated tooling 🤖

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The targeted fix addresses both failure paths without changing successful caching; builds and tests were not run.

No open issues 🎉

What changed in this PR

Restores avatar download retries in Eclipse chat after network or image-decoding failures.

Changes:

  • Removes the job-map entry after both successful downloads and handled failures.
  • Logs SWT image-decoding exceptions alongside I/O exceptions.
File Description
com.microsoft.copilot.eclipse.ui/​src/​com/​microsoft/​copilot/​eclipse/​ui/​chat/​services/​AvatarService.java Clears completed jobs so subsequent chat turns can retry failed downloads.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants