feat: support isv block references in docs xml#1739
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughAdds ISV block reference map support to docs v2 shortcuts, paralleling the existing HTML5 block workflow. Introduces a ChangesISV block reference map support
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant DocsCreateOrUpdate
participant ReferenceMapPipeline
participant FileIO
DocsCreateOrUpdate->>ReferenceMapPipeline: build request body with isv-block content
ReferenceMapPipeline->>ReferenceMapPipeline: rewrite <isv-block> tags, assign data-ref
ReferenceMapPipeline->>FileIO: read path="`@relative.data`" if provided
FileIO-->>ReferenceMapPipeline: file contents
ReferenceMapPipeline-->>DocsCreateOrUpdate: reference_map.isv-block merged into payload
sequenceDiagram
participant DocsFetch
participant executeFetchV2
participant processISVBlockReferenceMapForFetch
participant FileIO
DocsFetch->>executeFetchV2: fetch document (extra_param includes return_isv_block_data)
executeFetchV2->>processISVBlockReferenceMapForFetch: fetched document payload
processISVBlockReferenceMapForFetch->>processISVBlockReferenceMapForFetch: validate data-ref tags resolve
processISVBlockReferenceMapForFetch->>FileIO: write oversized data to .data file
FileIO-->>processISVBlockReferenceMapForFetch: written path
processISVBlockReferenceMapForFetch-->>executeFetchV2: updated reference_map with path
executeFetchV2-->>DocsFetch: document content with data-ref preserved
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@db513b7bbe5f1844eca72f6e9df7a4116b78fc74🧩 Skill updatenpx skills add ZEden0/cli#feat/lark-cli-isv-blocks -y -g |
Summary
Add lark-cli docs XML support for generic ISV blocks. Fetch now exposes configured ISV blocks as
<isv-block type="..." data-ref="...">with data stored underreference_map.isv-block, while html5-block behavior remains unchanged.Changes
docs +fetch.reference_map.isv-blockgroup.doc-fetch-resources/{doc_token}/isv_N.data.Test Plan
go test ./shortcuts/docgo build -o ./lark-cli .go test ./tests/cli_e2e/docs -run 'TestDocs_DryRunDefaultsToV2OpenAPI|TestDocs_CreateTitleDryRunPrependsContent'/Users/bytedance/.ccm-harness/worktrees/lark-cli-isv-blocks/larksuite_cli/.lark-cli-e2e-test/reports/isv-timeline-20260703144947/report.md.Related Issues
N/A
Summary by CodeRabbit
New Features
Bug Fixes