feat(drive): add drive.replyToComment and drive.resolveComment tools#397
feat(drive): add drive.replyToComment and drive.resolveComment tools#397matheusrmorgado wants to merge 2 commits into
Conversation
|
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. |
There was a problem hiding this comment.
Code Review
This pull request adds two new tools, drive.replyToComment and drive.resolveComment, along with their respective tests and documentation. The feedback recommends adding the supportsAllDrives: true parameter to the Google Drive API calls to ensure support for Shared Drives, and omitting the content field from the request body in resolveComment when it is not provided. Corresponding test updates are also suggested.
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.
Implements the two write-side Drive comment tools proposed in gemini-cli-extensions#343, complementing the existing read-only drive.getComments: - drive.replyToComment(fileId, commentId, content): posts a reply via replies.create - drive.resolveComment(fileId, commentId, content?): marks the comment resolved via replies.create with action: 'resolve', optionally with a closing message Both live in the drive.write feature group and reuse its existing 'drive' OAuth scope, so the consent surface is unchanged. Includes Jest coverage (request shapes, URL-to-ID extraction, error paths) and docs/index.md entries.
…es does not apply Addresses gemini-code-assist review: resolveComment now omits the content field entirely when no closing message is provided instead of sending an empty string. The supportsAllDrives suggestion does not apply here: replies.create takes no such parameter (it belongs to the files/drives endpoints, confirmed by the Drive v3 reference and the googleapis typings, which reject it at compile time); a code comment records that.
60198f5 to
98ac5d8
Compare
Summary
Fixes #343 by adding the two write-side Drive comment tools, complementing the existing read-only
drive.getComments:drive.replyToComment(fileId, commentId, content)— posts a reply to an existing comment viareplies.createdrive.resolveComment(fileId, commentId, content?)— marks a comment resolved viareplies.createwithaction: "resolve", optionally posting a closing messageThis closes the common agent loop of "read the comments on this doc, address them, reply and resolve" — today the read half exists but the write half requires leaving the extension.
Design notes
drive.writefeature group and reuse its existingdriveOAuth scope — the consent surface is unchanged.extractDocumentIdnormalization as the other Drive tools).fieldsmasks limit responses to id/content/author/createdTime (+actionfor resolve), matching thegetCommentsfield style.What's included
DriveServicefollowing the existing logging/handleErrorconventionscontentismin(1)on reply; optional on resolve)docs/index.mdentriesVerification
All passing: 29 suites, 625 tests (619 existing + 6 new), eslint/prettier/tsc clean.
Made with Cursor