feat(recipes): add suggest-doc-edits — propose Docs edits as quoting comments (Suggesting-mode API workaround)#874
Conversation
…karound via Drive comments)
🦋 Changeset detectedLatest commit: 381ebd9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Summary of ChangesHello, 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
Using Gemini Code AssistThe 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
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 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
|
|
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 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.
Description
Adds a
recipe-suggest-doc-editsrecipe covering a common agent task the API can't do natively: the Docs API cannot create Suggesting-mode suggestions (documents.batchUpdate= direct edits only;suggestionsViewModeis read-side only). The recipe documents the practical workaround:gws docs documents getto capture the exact target textgws drive comments createwithquotedFileContent— each proposed edit lands as a review comment quoting the text it targetsgws docs documents batchUpdate(replaceAllText) applies itgws drive replies createwithaction: resolvecloses the loopVerified end-to-end against a real Google Doc (5 suggested-edit comments posted via
quotedFileContent, visible in the comment rail).Changes: one
[[recipes]]entry inregistry/recipes.toml+ the generatedskills/recipe-suggest-doc-edits/SKILL.md(hand-rendered to matchrender_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 bodyChecklist:
AGENTS.mdguidelines (no generatedgoogle-*crates).cargo fmt --allto format the code perfectly. (no Rust changes — TOML + markdown only)cargo clippy -- -D warningsand resolved all warnings. (no Rust changes)pnpx changeset) to document my changes.