Skip to content

feat(recipes): add suggest-doc-edits — propose Docs edits as quoting comments (Suggesting-mode API workaround)#874

Open
jhagege wants to merge 1 commit into
googleworkspace:mainfrom
jhagege:recipe-suggest-doc-edits
Open

feat(recipes): add suggest-doc-edits — propose Docs edits as quoting comments (Suggesting-mode API workaround)#874
jhagege wants to merge 1 commit into
googleworkspace:mainfrom
jhagege:recipe-suggest-doc-edits

Conversation

@jhagege

@jhagege jhagege commented Jul 12, 2026

Copy link
Copy Markdown

Description

Adds a recipe-suggest-doc-edits recipe covering a common agent task the API can't do natively: the Docs API cannot create Suggesting-mode suggestions (documents.batchUpdate = direct edits only; suggestionsViewMode is read-side only). The recipe documents the practical workaround:

  1. gws docs documents get to capture the exact target text
  2. gws drive comments create with quotedFileContent — each proposed edit lands as a review comment quoting the text it targets
  3. after reviewer acceptance, gws docs documents batchUpdate (replaceAllText) applies it
  4. gws drive replies create with action: resolve closes the loop

Verified end-to-end against a real Google Doc (5 suggested-edit comments posted via quotedFileContent, visible in the comment rail).

Changes: one [[recipes]] entry in registry/recipes.toml + the generated skills/recipe-suggest-doc-edits/SKILL.md (hand-rendered to match render_recipe_skill; description kept ≤120 chars to avoid frontmatter truncation).

Dry Run Output:

// n/a — recipe/docs-only change, no new CLI command or request body

Checklist:

  • My code follows the AGENTS.md guidelines (no generated google-* crates).
  • I have run cargo fmt --all to format the code perfectly. (no Rust changes — TOML + markdown only)
  • I have run cargo clippy -- -D warnings and resolved all warnings. (no Rust changes)
  • I have added tests that prove my fix is effective or that my feature works. (covered by the existing recipes.toml validation test; TOML parse verified locally)
  • I have provided a Changeset file (e.g. via pnpx changeset) to document my changes.

@changeset-bot

changeset-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 381ebd9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@googleworkspace/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new productivity recipe designed to facilitate collaborative editing on Google Docs. Since the Google Docs API does not natively support creating 'Suggesting-mode' edits, this recipe outlines a reliable workflow using Drive comments to propose changes, which can then be formally applied to the document once approved.

Highlights

  • New Recipe Added: Added a new recipe suggest-doc-edits to the registry, providing a workaround for the Google Docs API's lack of native 'Suggesting-mode' write support.
  • Workflow Documentation: Created a new skill documentation file skills/recipe-suggest-doc-edits/SKILL.md detailing the multi-step process of proposing edits via Drive comments and applying them via batch updates.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Generative AI Prohibited Use Policy, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@google-cla

google-cla Bot commented Jul 12, 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 introduces a new recipe and skill called suggest-doc-edits for the Google Workspace CLI. This recipe provides a workaround for the Google Docs API's lack of write support for "Suggesting-mode" edits by proposing edits as Google Drive comments quoting the target text, applying the accepted edits using documents.batchUpdate with replaceAllText, and resolving the comments afterwards. There are no review comments, so I have no feedback to provide.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants