gemini-cli-extensions / gemini-cli-extensions/workspace
Feature request: docs.appendMarkdown — write formatted Docs content without manual index math
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 638
- Forks
- 107
- PR merge metrics
- No merged PRs in 30d
Description
Problem
Producing a formatted Google Doc today takes the two-step flow the google-docs skill teaches: docs.writeText with plain text, then docs.formatText with hand-computed 1-based character indices. The skill spends most of its length teaching the model index arithmetic ("count the \n characters..."), and any miscount styles the wrong range. For agents, markdown is the native output format — the index math is pure failure surface.
Proposal
docs.appendMarkdown(documentId, markdown, tabId?): converts a markdown string to natively formatted Docs content in a single call.
- Supported: headings (
#–######),**bold**,*italic*,~~strikethrough~~,`inline code`,[links](url), bullet (-) and numbered (1.) lists - One
insertTextwith the plain text, then onebatchUpdatewithupdateParagraphStyle/updateTextStyle/createParagraphBulletsrequests computed from parse offsets — no client-side index math ever reaches the model tabIdoptional, default tab when omitted (same convention asdocs.writeText)- Not in scope for v1 (documented): tables, horizontal rules, images — they degrade gracefully to plain text / are skipped with counts in the response
No new OAuth scopes (documents already covers it). Complements rather than replaces docs.formatText, which remains the right tool for fine-grained edits to existing text.
I have a working implementation (pure parser module + service method) with Jest coverage ready to submit as a PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the pure parser module and the service method described in the issue, then read the existing docs.writeText and docs.formatText flows first. Verify the Jest coverage for headings, inline styles, links, lists, tabId handling, and graceful degradation before extending it. Done means docs.appendMarkdown produces native formatting through the Google Docs requests without requiring caller index math.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100