feat(doc-skill): document upload-then-move workflow for inserting images into container blocks#970
feat(doc-skill): document upload-then-move workflow for inserting images into container blocks#970fangshuyu-768 wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughThis PR documents how to insert images into container blocks using a two-step workflow: first uploading the image via ChangesContainer Block Media Insertion Workflow
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
skills/lark-doc/references/lark-doc-media-insert.md (1)
117-120: 💤 Low valueAdd language specifier to fenced code block.
The code block lacks a language specifier, which triggers a markdownlint warning. Since this represents a workflow pseudocode, consider using
textorbashas the language identifier.🔧 Proposed fix
-``` +```text Step 1: +media-insert 上传图片到文档末尾 → 得到 img block_id Step 2: +update block_move_after 将图片移入目标容器</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@skills/lark-doc/references/lark-doc-media-insert.mdaround lines 117 - 120,
The fenced code block that shows the two-step workflow (the block containing
"Step 1: +media-insert 上传图片到文档末尾 → 得到 img block_id" and "Step 2: +update
block_move_after 将图片移入目标容器") is missing a language specifier and triggers
markdownlint; update that fence to include a language identifier such as text
(e.g., ```text) or bash to silence the linter and preserve formatting so the
snippet is parsed as a code block.</details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.Nitpick comments:
In@skills/lark-doc/references/lark-doc-media-insert.md:
- Around line 117-120: The fenced code block that shows the two-step workflow
(the block containing "Step 1: +media-insert 上传图片到文档末尾 → 得到 img block_id" and
"Step 2: +update block_move_after 将图片移入目标容器") is missing a language specifier
and triggers markdownlint; update that fence to include a language identifier
such as text (e.g., ```text) or bash to silence the linter and preserve
formatting so the snippet is parsed as a code block.</details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro **Run ID**: `61dac60d-de75-40df-ac48-a0cbb59b022e` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between a4c5ec99c8a0f4d218f9314e382532313c612b3c and 3666bfb59c2a7fe384ff4144aadf8e5fcf5ee900. </details> <details> <summary>📒 Files selected for processing (3)</summary> * `skills/lark-doc/SKILL.md` * `skills/lark-doc/references/lark-doc-media-insert.md` * `skills/lark-doc/references/lark-doc-xml.md` </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #970 +/- ##
=======================================
Coverage 67.39% 67.39%
=======================================
Files 572 572
Lines 53659 53659
=======================================
Hits 36165 36165
Misses 14486 14486
Partials 3008 3008 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@a41ffdcfd55b94ceb8bc71793f19905fc43e540f🧩 Skill updatenpx skills add larksuite/cli#feat/media-insert-container-block-v2 -y -g |
…ges into container blocks The +media-insert command only inserts images at the document top level. This PR documents the two-step "upload then move" workflow that enables inserting local images into container blocks (table cells, callouts, grid columns) using block_move_after, which supports cross-parent moves. Closes #503
e8e2cde to
a41ffdc
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
skills/lark-doc/references/lark-doc-media-insert.md (1)
117-120: ⚡ Quick win为 fenced code block 增加语言标识。
该代码块缺少语言标识(markdownlint MD040);可改成
text(或bash,如果你想当命令示意)。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@skills/lark-doc/references/lark-doc-media-insert.md` around lines 117 - 120, The fenced code block containing the two-step example ("Step 1: +media-insert 上传图片到文档末尾 → 得到 img block_id" and "Step 2: +update block_move_after 将图片移入目标容器") is missing a language identifier; update that opening backtick fence to include a language tag (e.g., change ``` to ```text or ```bash) so markdownlint MD040 is satisfied and the block is properly marked.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/lark-doc/references/lark-doc-media-insert.md`:
- Line 6: The documentation contains conflicting default-insertion descriptions:
one sentence says "默认追加到文档末尾" while another says "默认是文档顶层(可能在
`--selection-with-ellipsis` 附近)"; locate the three occurrences (the opening
summary sentence that starts with 把"创建空 block → 上传文件 → 设置 token"..., the Step 1
description mentioning insertion location, and the later note that references
`--selection-with-ellipsis`) and make them consistent by choosing one canonical
wording (e.g., "默认插入到文档顶层;默认位置可能在 `--selection-with-ellipsis` 附近,如需追加到末尾请说明")
and update all three places to that exact phrasing so users get the same
default-insertion behavior across the doc.
---
Nitpick comments:
In `@skills/lark-doc/references/lark-doc-media-insert.md`:
- Around line 117-120: The fenced code block containing the two-step example
("Step 1: +media-insert 上传图片到文档末尾 → 得到 img block_id" and "Step 2: +update
block_move_after 将图片移入目标容器") is missing a language identifier; update that
opening backtick fence to include a language tag (e.g., change ``` to ```text or
```bash) so markdownlint MD040 is satisfied and the block is properly marked.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 73cd3302-8c6a-4f08-a207-d8274e33085c
📒 Files selected for processing (2)
skills/lark-doc/SKILL.mdskills/lark-doc/references/lark-doc-media-insert.md
✅ Files skipped from review due to trivial changes (1)
- skills/lark-doc/SKILL.md
| > **前置条件:** 先阅读 [`../lark-shared/SKILL.md`](../../lark-shared/SKILL.md) 了解认证、全局参数和安全规则。 | ||
|
|
||
| 把"创建空 block → 上传文件 → 设置 token"三步合并成一个命令,在**文档末尾**插入本地图片或文件。 | ||
| 把"创建空 block → 上传文件 → 设置 token"三步合并成一个命令,在文档中插入本地图片或文件。默认追加到文档末尾;如需插入到表格单元格、callout 等容器 block 内部,使用[上传后移动](#插入图片到容器-block)工作流。 |
There was a problem hiding this comment.
统一默认插入位置描述,避免前后冲突。
Line 6/Line 118 写的是“默认到文档末尾”,但 Line 113 已说明默认是文档顶层(可能在 --selection-with-ellipsis 附近)。建议三处统一成同一口径,否则用户会误判 Step 1 的实际落点。
Also applies to: 113-113, 118-118
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@skills/lark-doc/references/lark-doc-media-insert.md` at line 6, The
documentation contains conflicting default-insertion descriptions: one sentence
says "默认追加到文档末尾" while another says "默认是文档顶层(可能在 `--selection-with-ellipsis`
附近)"; locate the three occurrences (the opening summary sentence that starts
with 把"创建空 block → 上传文件 → 设置 token"..., the Step 1 description mentioning
insertion location, and the later note that references
`--selection-with-ellipsis`) and make them consistent by choosing one canonical
wording (e.g., "默认插入到文档顶层;默认位置可能在 `--selection-with-ellipsis` 附近,如需追加到末尾请说明")
and update all three places to that exact phrasing so users get the same
default-insertion behavior across the doc.
Summary
docs +media-insertcurrently only inserts images at the document top level (end of document or near a top-level block matched by--selection-with-ellipsis). It cannot place images inside container blocks like table cells, callouts, or grid columns. This PR documents the "upload then move" two-step workflow that enables inserting local images into container blocks usingblock_move_after, which supports cross-parent moves.Changes
skills/lark-doc/references/lark-doc-media-insert.md: Updated title and description to reflect broader capability; added new "插入图片到容器 block" section documenting the upload-then-move workflow with step-by-step instructions, examples (table cell, callout, grid column), and caveatsskills/lark-doc/SKILL.md: Updated+media-insertshortcut description to mention the upload-then-move workflow for container blocksTest Plan
+media-insert, then usedblock_move_afterto move it into a<td>— confirmed the image appeared inside the table cellblock_move_aftersupports cross-parent moves (from document root into container block)Related Issues
Summary by CodeRabbit