feat: add Docs skill with formatText tool and simplified tool primitives#250
feat: add Docs skill with formatText tool and simplified tool primitives#250allenhutchison merged 2 commits intomainfrom
Conversation
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 significantly enhances the Google Docs skill by introducing robust rich text formatting capabilities and simplifying the core document manipulation tools. It streamlines the API surface for Docs from nine to seven primitives, making interactions more intuitive and powerful. Concurrently, it removes an unnecessary markdown processing pipeline, reducing technical debt and improving efficiency. New detailed skill documentation for both Docs and Chat ensures clearer guidance for users on leveraging these updated functionalities. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
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 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 counter productive. 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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This is a great pull request that significantly simplifies the Google Docs tool surface. Removing the markdown-to-HTML-to-Docs API pipeline in favor of more explicit writeText and formatText tools is a solid architectural improvement. It makes the tools more predictable and easier for the model to reason about. The consolidation of insertText and appendText into writeText is also a welcome cleanup. I have one suggestion to improve the efficiency of the new writeText tool.
When position is 'end' and no tabId is specified, omit the location field entirely — the Docs API auto-appends to the document body. This saves an extra round-trip API call for the most common case. Addresses review feedback from Gemini Code Assist on PR #250.
- Add skills/docs/SKILL.md with two-step formatting workflow: 1. Insert content via docs.create or docs.writeText 2. Apply rich formatting via docs.formatText (bold, italic, headings, links, code) - Add docs.formatText tool for applying text and paragraph styles to ranges - Consolidate docs tools from 9 to 7: - Merge docs.insertText + docs.appendText → docs.writeText (position param) - Remove docs.extractIdFromUrl (redundant, all tools accept URLs) - Remove markdown-to-Docs conversion pipeline: - Delete markdownToDocsRequests.ts and its tests - Remove marked, dompurify, jsdom dependencies - Remove related mocks and jest config mappings - Update DocsService.ts, index.ts, tests, WORKSPACE-Context.md
When position is 'end' and no tabId is specified, omit the location field entirely — the Docs API auto-appends to the document body. This saves an extra round-trip API call for the most common case. Addresses review feedback from Gemini Code Assist on PR #250.
f1e9dc9 to
76496b1
Compare
Summary
Add an agent skill for Google Docs that enables rich document formatting and simplifies the docs tool surface from 9 tools to 7 clean primitives (closes #58 for Docs).
Changes
New
skills/docs/SKILL.md— Docs skill with:Added
docs.formatTexttool — applies rich formatting (bold, italic, underline, strikethrough, code, link, headings 1-6) to text ranges via the Docs APIupdateTextStyleandupdateParagraphStylebatch requestsConsolidated
docs.insertText+docs.appendText→docs.writeTextwithpositionparameter (beginning,end, or numeric index)docs.extractIdFromUrl(redundant — all tools already accept URLs directly)Removed
markdownToDocsRequests.tsand its tests — the markdown→HTML→Docs API pipelinemarked,dompurify,jsdomdependencies and their type definitionsFinal Tool Surface (7 tools)
docs.createdocs.getTextdocs.writeTextdocs.replaceTextdocs.formatTextdocs.finddocs.moveTesting