feat(docs): add --lang to docs +fetch v2 for cite user display language#1322
feat(docs): add --lang to docs +fetch v2 for cite user display language#1322herbertliu wants to merge 2 commits into
Conversation
BE-1 of docs-cite-user-lang-bq. Adds a --lang flag to `docs +fetch` v2 and injects body["lang"] (priority: explicit --lang > runtime.Lang() > omit) so <cite type="user"> display names return in the requested language. Also makes RuntimeContext.Lang() nil-Config safe and documents --lang in the lark-doc skill fetch reference. Tests cover explicit lang + omitted-when-unset. Spec source: active@42414488f6e15281f1ba4162fed116f019b865af0e978b51999a141da379dc36 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR adds a hidden ChangesLanguage Flag Support for Document Fetch v2
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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 |
- Unify modal verbs to "必须" throughout the user name writing rules - Add per-scenario coverage table: sender, mentions, reactions, cards, system messages, and merge_forward - Add open_id resolution workflow via lark-contact +search-user for plain-text names (system messages, merge_forward content) - Add Writing Messages to Lark Documents section in lark-im SKILL.md with field-to-cite mapping and cross-reference to lark-doc-xml.md
What
Adds a
--langflag todocs +fetchv2 (OpenAPI path) so<cite type="user">display names are returned in the requested language.v2FetchFlags(): new--langflag (e.g.zh_cn/en_us/ja_jp)buildFetchBody(): injectsbody["lang"]with priority explicit--lang>runtime.Lang()(user default) > omitRuntimeContext.Lang(): now nil-Configsafe--langMaps to OpenAPI request field
OpenDocsAIFetchDocumentRequest.Lang(api.json="lang", field-id 8, already on master). Backend passthrough (ai_edit + office_ai_sdk) tracked separately.Verify
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
--langoption to control citation display language for document fetches (e.g., zh_cn, en_us, ja_jp); when omitted, the user's configured language is used.Bug Fixes
Documentation
--langusage, guidance for writing messages to documents, and updated rules/examples for the sub-page-list resource.