feat(sheets): add value format documentation for formula and special types - #456
Conversation
📝 WalkthroughWalkthroughAdded documentation to two files describing supported cell data types for sheet write operations, type-to-format mappings, object-vs-string formatting rules for rich cell kinds, usage examples, and operational constraints (formula, mentions, dropdown limits). Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
skill-template/domains/sheets.md (1)
144-144: Consider clarifying the pipe character representation.In the
@人row's "写入格式" column, the format showsemail\|openId\|unionIdwith backslash escaping. While this is technically correct Markdown (pipes in table cells must be escaped), it may confuse users who might think the backslash is part of the actual JSON value fortextType.Consider using an alternative representation to improve clarity, such as:
- Using
<code>tags with HTML entity|- Noting in parentheses that
|means "or"- Listing the three options on separate lines
Alternative representation for clarity
-| `@人` | `{"type":"mention","text":"标识","textType":"email\|openId\|unionId","notify":true}` | `{"type":"mention","text":"user@example.com","textType":"email","notify":true}` | +| `@人` | `{"type":"mention","text":"标识","textType":"email 或 openId 或 unionId","notify":true}` | `{"type":"mention","text":"user@example.com","textType":"email","notify":true}` |Or add a note after the table explaining that
\|in the format column means "or" (one of the listed values).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@skill-template/domains/sheets.md` at line 144, The table row for "@人" currently shows the "写入格式" value as `email\|openId\|unionId`, which may confuse readers into thinking the backslash is part of the JSON value; update the cell so the three options are clearly shown (e.g., use HTML entity for pipe like `email|openId|unionId`, or list each option on separate lines, or append "(| means OR)" in parentheses) and ensure the example JSON `{"type":"mention","text":"标识","textType":"email|openId|unionId","notify":true}` is shown without backslashes so it's clear the actual `textType` value uses plain `|`; target the "@人" table row and the "写入格式" cell when making this change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@skill-template/domains/sheets.md`:
- Line 144: The table row for "@人" currently shows the "写入格式" value as
`email\|openId\|unionId`, which may confuse readers into thinking the backslash
is part of the JSON value; update the cell so the three options are clearly
shown (e.g., use HTML entity for pipe like `email|openId|unionId`, or
list each option on separate lines, or append "(| means OR)" in parentheses) and
ensure the example JSON
`{"type":"mention","text":"标识","textType":"email|openId|unionId","notify":true}`
is shown without backslashes so it's clear the actual `textType` value uses
plain `|`; target the "@人" table row and the "写入格式" cell when making this
change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0651d589-3c42-4568-94fb-7c74328d74e1
📒 Files selected for processing (2)
skill-template/domains/sheets.mdskills/lark-sheets/SKILL.md
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@319b51b1f3e76e69f223a2d68e6e5d7a2b2c0fb3🧩 Skill updatenpx skills add larksuite/cli#feat/value_format -y -g |
Greptile SummaryAdds a Confidence Score: 5/5Safe to merge — documentation-only change with accurate content and prior P1 concerns resolved. All remaining findings are P2 style suggestions. The two previously flagged P1 issues ( No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Write cell value] --> B{Value type?}
B -->|Plain text / email / bare URL| C[Pass as plain string]
B -->|Number / Date serial| D[Pass as number]
B -->|Formula| E[Object: type=formula]
B -->|URL with display text| F[Object: type=url]
B -->|Mention user| G[Object: type=mention + textType]
B -->|Mention document| H[Object: type=mention + textType=fileToken]
B -->|Dropdown| I[Object: type=multipleValue]
C --> J[API write call]
D --> J
E --> J
F --> J
G --> J
H --> J
I --> J
Reviews (2): Last reviewed commit: "feat(sheets): add value format documenta..." | Re-trigger Greptile |
…types Document the correct object format for writing formulas, URLs with text, mentions, and dropdown lists via --values parameter. Add examples contrasting correct object format vs incorrect plain string. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
83b6bf2 to
319b51b
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
skill-template/domains/sheets.md (1)
144-144: ClarifytextTypeas enum choices, not a literal value.Line 144 currently shows
textType:"email\|openId\|unionId"inside JSON, which is easy to copy as a single invalid literal. Prefer documenting it as “one ofopenId/unionId” outside the JSON example.Suggested doc tweak
-| `@人` | `{"type":"mention","text":"标识","textType":"email\|openId\|unionId","notify":false}` | `{"type":"mention","text":"user@example.com","textType":"email","notify":false}`(notify 可选,默认 false;仅在用户明确要求通知时设为 true) | +| `@人` | `{"type":"mention","text":"标识","textType":"email","notify":false}` | `{"type":"mention","text":"user@example.com","textType":"email","notify":false}`(`textType` 取值为 `email` / `openId` / `unionId`;`notify` 可选,默认 false;仅在用户明确要求通知时设为 true) |🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@skill-template/domains/sheets.md` at line 144, The JSON example for the `@人` mention uses textType:"email\|openId\|unionId" which can be mis-copied as a single invalid literal; update the documentation so the JSON example shows a single valid value (e.g., "textType":"email") and move the allowed choices description outboard as “textType — one of email / openId / unionId” (referencing the `@人` mention example and the textType field) so readers see a concrete example plus the enum choices separately.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@skill-template/domains/sheets.md`:
- Line 144: The JSON example for the `@人` mention uses
textType:"email\|openId\|unionId" which can be mis-copied as a single invalid
literal; update the documentation so the JSON example shows a single valid value
(e.g., "textType":"email") and move the allowed choices description outboard as
“textType — one of email / openId / unionId” (referencing the `@人` mention example
and the textType field) so readers see a concrete example plus the enum choices
separately.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f5e353d4-fc0b-4c14-92e0-039fc061932b
📒 Files selected for processing (2)
skill-template/domains/sheets.mdskills/lark-sheets/SKILL.md
✅ Files skipped from review due to trivial changes (1)
- skills/lark-sheets/SKILL.md
…types (larksuite#456) Document the correct object format for writing formulas, URLs with text, mentions, and dropdown lists via --values parameter. Add examples contrasting correct object format vs incorrect plain string.
…types (larksuite#456) Document the correct object format for writing formulas, URLs with text, mentions, and dropdown lists via --values parameter. Add examples contrasting correct object format vs incorrect plain string.
Summary
The
--valuesparameter in sheets shortcuts (+write,+append,+create)requires an object format for formulas and special types, but this was not
documented. This PR adds a cell data type reference table and usage examples
to both
SKILL.mdand the skill template.Changes
mention, and dropdown list formats
skills/lark-sheets/SKILL.mdandskill-template/domains/sheets.mdTest Plan
lark-cli sheets +write(string, number, formula, URL with text, plain URL, email)+read --value-render-option FormattedValue+appendwith mixed types (string + number + formula + URL)+replacefind-and-replace works on written data+exportfor both xlsx and csv formatsRelated Issues
N/A
Summary by CodeRabbit