feat(docs): add --tab-id flag to editing commands#330
Closed
ignacioreyna wants to merge 1 commit intoopenclaw:mainfrom
Closed
feat(docs): add --tab-id flag to editing commands#330ignacioreyna wants to merge 1 commit intoopenclaw:mainfrom
ignacioreyna wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Add --tab-id flag to write, insert, delete, find-replace, and update commands to target specific document tabs. Markdown write with --tab-id uses Docs API batch approach instead of Drive API. Closes openclaw#323 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
b14c322 to
c4518e4
Compare
steipete
added a commit
that referenced
this pull request
Mar 8, 2026
Collaborator
|
Landed directly on
|
klodr
pushed a commit
to klodr/gogcli
that referenced
this pull request
Apr 22, 2026
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
--tab-idflag towrite,insert,delete,find-replace, andupdatecommands to target specific document tabs--tab-iduses Docs API batch approach (Drive API can't target tabs)--tab-idfetches tab-aware content for correct endIndex calculationfind-replaceusesTabsCriteriaonReplaceAllTextRequestper the API contractsetTabIdOnRequestshelper to stampTabIdon allLocation/Range/EndOfSegmentLocationin batch requestsCloses #323
Design decisions
--tab-id(raw ID, no title resolution): Clients get tab IDs viagog docs list-tabs. No extra API call, no business logic for name matching on write paths.cat --tabstays as-is since it already fetches the doc so title resolution is free there.docs updateincluded: Same pattern as other editing commands — tab-aware doc fetch +setTabIdOnRequestson formatting requests.BatchUpdate(delete tab content → insert markdown-converted requests withTabIdstamped) instead of Drive APIFiles.Update.What's NOT included
docs updaterefactoring to support new markdown features (separate issue)Also fixes
contacts_crud.go: function parameter types were incorrectly typed as bool due to Go's shorthand syntax (given, familySet boolinstead ofgiven string, familySet bool)Test plan
--tab-idmake fmtpassesmake testpasses (all packages)make lintpasses for our changes (5 pre-existing issues in contacts code)🤖 Generated with Claude Code