Skip to content

feat: default skip_task_detail in docs +fetch#471

Merged
SunPeiYang996 merged 1 commit intolarksuite:mainfrom
ILUO:feat/docs-fetch-skip-task-detail
Apr 16, 2026
Merged

feat: default skip_task_detail in docs +fetch#471
SunPeiYang996 merged 1 commit intolarksuite:mainfrom
ILUO:feat/docs-fetch-skip-task-detail

Conversation

@ILUO
Copy link
Copy Markdown
Contributor

@ILUO ILUO commented Apr 14, 2026

Summary

Currently docs +fetch may expand embedded task details when calling MCP
fetch-doc, which adds extra detail to the default fetch result and is not
always needed. This PR makes docs +fetch send skip_task_detail=true by
default, and updates the skill reference to clarify that task blocks are
returned as <task task-id="..."></task> and should be queried separately via
the task CLI when task details are needed.

Changes

  • Add default skip_task_detail=true to shortcuts/doc/docs_fetch.go
  • Apply the default parameter in both DryRun and Execute paths
  • Update skills/lark-doc/references/lark-doc-fetch.md to document task block behavior
  • Add an example showing how to fetch task details via lark-cli task tasks get

Test Plan

  • go test ./shortcuts/doc
  • Manual verification:
    • lark-cli docs +fetch --doc "<doc_or_wiki_url>" --dry-run
    • Confirmed MCP args include skip_task_detail: true
    • Verified the skill reference documents <task task-id="..."></task> behavior

Related Issues

N/A

Summary by CodeRabbit

  • Documentation
    • Clarified task detail behavior in docs +fetch: embedded task details are no longer automatically expanded. Users can retrieve task details via a separate command as needed.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@github-actions github-actions Bot added domain/ccm PR touches the ccm domain size/M Single-domain feat or fix with limited business impact labels Apr 14, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 14, 2026

📝 Walkthrough

Walkthrough

Modified docs_fetch.go shortcut to set skip_task_detail: true in request payload, disabling automatic task detail expansion. Added documentation section clarifying that fetched Markdown retains task references and users must call separate lark-cli task tasks get commands to retrieve task details.

Changes

Cohort / File(s) Summary
Fetch Shortcut Configuration
shortcuts/doc/docs_fetch.go
Added skip_task_detail: true argument to request payload in both DryRun and Execute closures to prevent automatic task detail expansion.
Documentation
skills/lark-doc/references/lark-doc-fetch.md
Added section clarifying that task references are retained as-is in fetched Markdown and users must call lark-cli task tasks get with the task-id to retrieve task details.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested labels

domain/task, size/M

Suggested reviewers

  • tengchengwei
  • LuckyTerry

Poem

🐰 Hop, skip, and fetch our docs with care,
Task details? We'll skip with flair!
References kept, so neat and true,
Hop back when you need the full view!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a default skip_task_detail parameter to the docs +fetch shortcut, which is the primary focus of this PR.
Description check ✅ Passed The description follows the template with all required sections completed: Summary clearly states the motivation, Changes lists the modifications, Test Plan describes verification steps with checkmarks, and Related Issues is addressed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
shortcuts/doc/docs_fetch.go (1)

29-41: Optional: extract shared args builder to avoid future drift.

DryRun and Execute currently duplicate the same argument construction; a helper would make future param changes safer.

♻️ Suggested refactor
+func buildDocsFetchArgs(runtime *common.RuntimeContext) map[string]interface{} {
+	args := map[string]interface{}{
+		"doc_id":           runtime.Str("doc"),
+		"skip_task_detail": true,
+	}
+	if v := runtime.Str("offset"); v != "" {
+		n, _ := strconv.Atoi(v)
+		args["offset"] = n
+	}
+	if v := runtime.Str("limit"); v != "" {
+		n, _ := strconv.Atoi(v)
+		args["limit"] = n
+	}
+	return args
+}
...
-		args := map[string]interface{}{
-			"doc_id": runtime.Str("doc"),
-			"skip_task_detail": true,
-		}
-		if v := runtime.Str("offset"); v != "" {
-			n, _ := strconv.Atoi(v)
-			args["offset"] = n
-		}
-		if v := runtime.Str("limit"); v != "" {
-			n, _ := strconv.Atoi(v)
-			args["limit"] = n
-		}
+		args := buildDocsFetchArgs(runtime)
...
-		args := map[string]interface{}{
-			"doc_id": runtime.Str("doc"),
-			"skip_task_detail": true,
-		}
-		if v := runtime.Str("offset"); v != "" {
-			n, _ := strconv.Atoi(v)
-			args["offset"] = n
-		}
-		if v := runtime.Str("limit"); v != "" {
-			n, _ := strconv.Atoi(v)
-			args["limit"] = n
-		}
+		args := buildDocsFetchArgs(runtime)

Also applies to: 49-61

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shortcuts/doc/docs_fetch.go` around lines 29 - 41, Extract the duplicate args
construction in shortcuts/doc/docs_fetch.go into a single helper (e.g.,
buildFetchArgs or argsForDocsFetch) that returns map[string]interface{} and
encapsulates setting "doc_id", defaulting "skip_task_detail": true, and parsing
"offset" and "limit" (handle strconv.Atoi errors consistently). Replace the
duplicated blocks in both DryRun and Execute to call this helper and use its
returned map, ensuring no behavioral changes and preserving keys "doc_id",
"skip_task_detail", "offset", and "limit".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@shortcuts/doc/docs_fetch.go`:
- Around line 29-41: Extract the duplicate args construction in
shortcuts/doc/docs_fetch.go into a single helper (e.g., buildFetchArgs or
argsForDocsFetch) that returns map[string]interface{} and encapsulates setting
"doc_id", defaulting "skip_task_detail": true, and parsing "offset" and "limit"
(handle strconv.Atoi errors consistently). Replace the duplicated blocks in both
DryRun and Execute to call this helper and use its returned map, ensuring no
behavioral changes and preserving keys "doc_id", "skip_task_detail", "offset",
and "limit".

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 718ad8dc-20ab-4afc-aafe-96eeabc7d23c

📥 Commits

Reviewing files that changed from the base of the PR and between 20761fa and 48b8645.

📒 Files selected for processing (2)
  • shortcuts/doc/docs_fetch.go
  • skills/lark-doc/references/lark-doc-fetch.md

Copy link
Copy Markdown
Collaborator

@SunPeiYang996 SunPeiYang996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@SunPeiYang996 SunPeiYang996 merged commit 35a8288 into larksuite:main Apr 16, 2026
11 of 12 checks passed
@github-actions
Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@48b86454a0cb7d78d40d69e9ca45a159449e501d

🧩 Skill update

npx skills add ILUO/cli#feat/docs-fetch-skip-task-detail -y -g

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/ccm PR touches the ccm domain size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants