feat(docs): add tab support and editing commands (write, insert, delete, find-replace)#225
Merged
steipete merged 3 commits intoopenclaw:mainfrom Feb 14, 2026
Merged
Conversation
Add support for Google Docs tabs (multi-tab documents): - `docs list-tabs <docId>`: List all tabs with ID, title, and index - `docs cat <docId> --all-tabs`: Print all tabs with headers - `docs cat <docId> --tab <title|id>`: Print a specific tab by title or ID Key behaviors: - Default `docs cat` (no flags) is fully backward compatible - Tab lookup supports both exact ID match and case-insensitive title match - Nested/child tabs are flattened and included in all operations - JSON output supported for all tab operations Uses the Google Docs API `includeTabsContent` parameter to retrieve tab-aware document content via `Document.Tabs`. Closes openclaw#125 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Port custom editing commands from fork to upstream architecture: - write: append or replace doc content (plain text or markdown) - insert: insert text at specific character index - delete: delete text range by start/end index - find-replace: find and replace text with optional case matching Also fix lint issues: err shadow in tab support code, goconst for string literal "true". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5f16822 to
8f7fe08
Compare
Collaborator
|
Landed via temp rebase onto main. Thanks @alexknowshtml! |
Contributor
Author
|
Happy I can contribute, to use this thing every day now! |
7 tasks
klodr
pushed a commit
to klodr/gogcli
that referenced
this pull request
Apr 22, 2026
…te, find-replace) (openclaw#225) * feat(docs): add tab support for Google Docs Add support for Google Docs tabs (multi-tab documents): - `docs list-tabs <docId>`: List all tabs with ID, title, and index - `docs cat <docId> --all-tabs`: Print all tabs with headers - `docs cat <docId> --tab <title|id>`: Print a specific tab by title or ID Key behaviors: - Default `docs cat` (no flags) is fully backward compatible - Tab lookup supports both exact ID match and case-insensitive title match - Nested/child tabs are flattened and included in all operations - JSON output supported for all tab operations Uses the Google Docs API `includeTabsContent` parameter to retrieve tab-aware document content via `Document.Tabs`. Closes openclaw#125 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(docs): add write, insert, delete, find-replace commands Port custom editing commands from fork to upstream architecture: - write: append or replace doc content (plain text or markdown) - insert: insert text at specific character index - delete: delete text range by start/end index - find-replace: find and replace text with optional case matching Also fix lint issues: err shadow in tab support code, goconst for string literal "true". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(docs): harden tab/write paths and add editing regressions (openclaw#225) (thanks @alexknowshtml) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for Google Docs tabs (multi-tab documents) and document editing commands.
Tab support
docs list-tabs <docId>— List all tabs with ID, title, and indexdocs cat <docId> --all-tabs— Print all tabs with=== Tab: <title> ===headersdocs cat <docId> --tab <title|id>— Print a specific tab by title or tab IDDocument editing commands
docs write <docId> [content]— Write/append content to a doc (supports--replace,--file,--markdown)docs insert <docId> [content]— Insert text at a specific character--indexdocs delete <docId>— Delete text range with--start/--enddocs find-replace <docId> <find> <replace>— Find and replace with optional--match-caseKey behaviors
docs cat(no flags) is fully backward compatible — no API behavior changest.abc123) and case-insensitive title match ("My Tab")--json) supported for all tab and editing operationsIncludeTabsContent(true)parameter only when tab flags are specified--file, or stdin--markdown --replace) uses Drive API for native format conversionExample usage
Closes #125
Test plan
catdoes NOT sendincludeTabsContent--tab/--all-tabssendsincludeTabsContent=true--tab,--all-tabs, andlist-tabs🤖 Generated with Claude Code