Skip to content

fix(calendar): include attachments in listEvents field mask - #383

Merged
allenhutchison merged 2 commits into
gemini-cli-extensions:mainfrom
euclides-filho:upstream-calendar-attachments
Jun 3, 2026
Merged

fix(calendar): include attachments in listEvents field mask#383
allenhutchison merged 2 commits into
gemini-cli-extensions:mainfrom
euclides-filho:upstream-calendar-attachments

Conversation

@euclides-filho

Copy link
Copy Markdown
Contributor

What

listEvents requests an explicit fields mask, and that mask omitted attachments. Because events.list only returns fields named in the mask, native event attachments were silently dropped from every listEvents result.

This adds attachments(fileId,fileUrl,title,mimeType,iconLink) to the mask.

Why this is a consistency fix, not a new feature

Every other calendar method in CalendarService already exposes/handles attachments — listEvents was the lone exception:

  • getEvent calls events.get with no field mask, so it already returns attachments.
  • createEvent / updateEvent fully support attachments via the EventAttachment interface and applyMeetAndAttachments (supportsAttachments).

So a caller can create an event with an attachment and read it back via getEvent, but the same attachment vanishes when the event is fetched through listEvents. This change aligns listEvents with the rest of the service.

Note: reading attachments needs no supportsAttachments parameter — that flag is write-only (insert/update/patch). Adding the field to the read mask is sufficient.

Impact

  • Purely additive to the fields mask; no change to any existing field or to request/response shapes beyond the new attachments array.
  • Slightly larger listEvents payloads when events carry attachments.

Testing

  • New unit test: asserts the events.list field mask includes attachments( and that an attachment's fileId survives into the tool payload.
  • Updated the two existing field-mask assertions to include the new field.
  • Full suite green: 512 passed, 28 suites.

@google-cla

google-cla Bot commented Jun 2, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the CalendarService to request and pass through native event attachments when listing calendar events. Specifically, the fields parameter in the listEvents API call is updated to include attachment details (fileId, fileUrl, title, mimeType, iconLink). Additionally, corresponding unit tests have been updated and a new test case has been added to verify this behavior. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

euclides-filho and others added 2 commits June 3, 2026 16:35
events.list only returns fields named in `fields`. The listEvents mask omitted
attachments, so native event attachments were silently dropped — even though
getEvent returns them (no field mask) and createEvent/updateEvent fully support
them. Add attachments(fileId,fileUrl,title,mimeType,iconLink) to align
listEvents with the rest of CalendarService. Reading attachments needs no
supportsAttachments flag (that is write-only).

Tests: assert the mask requests attachments and that an attachment's fileId
survives into the tool payload; updated the two existing field-mask assertions.
@allenhutchison
allenhutchison force-pushed the upstream-calendar-attachments branch from c2874f2 to 0392852 Compare June 3, 2026 23:36

@allenhutchison allenhutchison 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.

Thanks for fixing this.

@allenhutchison
allenhutchison merged commit aedee44 into gemini-cli-extensions:main Jun 3, 2026
18 checks passed
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.

2 participants