gemini-cli-extensions / gemini-cli-extensions/workspace

Add drive.replyToComment and drive.resolveComment tools

Open
#343 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
638
Forks
107
PR merge metrics
No merged PRs in 30d

Description

Proposal

Add two write-side Drive comment tools to complement the existing drive.getComments:

  • drive.replyToComment(fileId, commentId, content) — post a reply to an existing comment
  • drive.resolveComment(fileId, commentId, content?) — mark a comment resolved, optionally with a closing message

Both use the existing drive.replies.create endpoint (with action: "resolve" for the second). No new OAuth scopes — both fit in the existing drive.write feature group which already has the drive scope.

Motivation

drive.getComments today lets an agent read a doc's review state but not respond to it. Enabling reply + resolve turns review workflows into something an agent can actively participate in — e.g. a reviewer leaves 10 comments on a Google Doc, the agent drafts responses grounded in the doc's content, the user approves each draft, and the agent posts them. Today that loop stalls after the agent reads the comments.

Status

I have a working implementation ready to send as a PR:

  • Two new methods in DriveService.ts mirroring the getComments / trashFile patterns
  • Two registerTool entries in index.ts next to drive.getComments
  • Tool names added to the drive.write feature group in feature-config.ts
  • 6 new test cases covering happy path, URL extraction, and error handling — all 472 tests pass (466 existing + 6 new)
  • Live-validated against a real Google Doc: created via docs.create, added a comment, called drive.replyToComment and drive.resolveComment, verified resolved: true on re-read

Total diff: 4 files, ~236 LOC including tests.

Question

Is this in scope for the project? If yes, I'll open the PR. CLA is already signed.

Happy to split into two PRs (reply and resolve separately) if you'd prefer smaller atomic changes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the existing getComments and trashFile patterns in DriveService.ts, then inspect the nearby drive.getComments registration in index.ts and the drive.write group in feature-config.ts. Confirm the two write tools use the stated replies.create endpoint, cover the six described test cases, and keep the full suite passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.