-
Notifications
You must be signed in to change notification settings - Fork 459
feat: support send/reply card 2.0 #402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,145 @@ | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "msg_type": "interactive", | ||||||||||||||||||||||||||
| "card": { | ||||||||||||||||||||||||||
| "schema": "2.0", | ||||||||||||||||||||||||||
| "config": { | ||||||||||||||||||||||||||
| "update_multi": true, | ||||||||||||||||||||||||||
| "style": { | ||||||||||||||||||||||||||
| "text_size": { | ||||||||||||||||||||||||||
| "normal_v2": { | ||||||||||||||||||||||||||
| "default": "normal", | ||||||||||||||||||||||||||
| "pc": "normal", | ||||||||||||||||||||||||||
| "mobile": "heading" | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| "body": { | ||||||||||||||||||||||||||
| "direction": "horizontal", | ||||||||||||||||||||||||||
| "horizontal_spacing": "8px", | ||||||||||||||||||||||||||
| "vertical_spacing": "12px", | ||||||||||||||||||||||||||
| "horizontal_align": "left", | ||||||||||||||||||||||||||
| "vertical_align": "top", | ||||||||||||||||||||||||||
| "padding": "20px 20px 20px 20px", | ||||||||||||||||||||||||||
|
Comment on lines
+18
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Inspect body direction and top-level element tags across example cards.
python - <<'PY'
import json, pathlib
root = pathlib.Path("skills/lark-im/card-examples")
for p in sorted(root.glob("*.json")):
data = json.loads(p.read_text(encoding="utf-8"))
body = data.get("card", {}).get("body", {})
direction = body.get("direction")
tags = [e.get("tag") for e in body.get("elements", [])[:6]]
print(f"{p.name}: direction={direction}, first_tags={tags}")
PYRepository: larksuite/cli Length of output: 3102 Change This file is the only example using Fix- "direction": "horizontal",
+ "direction": "vertical",📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| "elements": [ | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "tag": "markdown", | ||||||||||||||||||||||||||
| "content": "开发者运营项目启动会", | ||||||||||||||||||||||||||
| "text_align": "left", | ||||||||||||||||||||||||||
| "text_size": "heading" | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "tag": "markdown", | ||||||||||||||||||||||||||
| "content": "2024年1月25日(周四) ", | ||||||||||||||||||||||||||
| "text_align": "left", | ||||||||||||||||||||||||||
| "text_size": "normal_v2", | ||||||||||||||||||||||||||
| "icon": { | ||||||||||||||||||||||||||
| "tag": "standard_icon", | ||||||||||||||||||||||||||
| "token": "calendar_outlined", | ||||||||||||||||||||||||||
| "color": "grey" | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "tag": "markdown", | ||||||||||||||||||||||||||
| "content": "14:30 - 15:00 (GMT+8)", | ||||||||||||||||||||||||||
| "text_align": "left", | ||||||||||||||||||||||||||
| "text_size": "normal_v2", | ||||||||||||||||||||||||||
| "icon": { | ||||||||||||||||||||||||||
| "tag": "standard_icon", | ||||||||||||||||||||||||||
| "token": "time_outlined", | ||||||||||||||||||||||||||
| "color": "grey" | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "tag": "person_list", | ||||||||||||||||||||||||||
| "persons": [ | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "id": "1" | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "id": "2" | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "id": "3" | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||
| "size": "small", | ||||||||||||||||||||||||||
| "lines": 1, | ||||||||||||||||||||||||||
| "show_avatar": true, | ||||||||||||||||||||||||||
| "show_name": true, | ||||||||||||||||||||||||||
| "icon": { | ||||||||||||||||||||||||||
| "tag": "standard_icon", | ||||||||||||||||||||||||||
| "token": "group_outlined", | ||||||||||||||||||||||||||
| "color": "grey" | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| "margin": "0px 0px 0px 0px" | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "tag": "column_set", | ||||||||||||||||||||||||||
| "flex_mode": "stretch", | ||||||||||||||||||||||||||
| "horizontal_spacing": "12px", | ||||||||||||||||||||||||||
| "horizontal_align": "left", | ||||||||||||||||||||||||||
| "columns": [ | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "tag": "column", | ||||||||||||||||||||||||||
| "width": "auto", | ||||||||||||||||||||||||||
| "elements": [ | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "tag": "button", | ||||||||||||||||||||||||||
| "text": { | ||||||||||||||||||||||||||
| "tag": "plain_text", | ||||||||||||||||||||||||||
| "content": "确定日程" | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| "type": "primary_filled", | ||||||||||||||||||||||||||
| "width": "fill", | ||||||||||||||||||||||||||
| "size": "medium" | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||
| "direction": "horizontal", | ||||||||||||||||||||||||||
| "horizontal_spacing": "8px", | ||||||||||||||||||||||||||
| "vertical_spacing": "8px", | ||||||||||||||||||||||||||
| "horizontal_align": "left", | ||||||||||||||||||||||||||
| "vertical_align": "top" | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "tag": "column", | ||||||||||||||||||||||||||
| "width": "auto", | ||||||||||||||||||||||||||
| "elements": [ | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "tag": "button", | ||||||||||||||||||||||||||
| "text": { | ||||||||||||||||||||||||||
| "tag": "plain_text", | ||||||||||||||||||||||||||
| "content": "编辑日程" | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| "type": "default", | ||||||||||||||||||||||||||
| "width": "fill", | ||||||||||||||||||||||||||
| "size": "medium" | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||
| "vertical_spacing": "8px", | ||||||||||||||||||||||||||
| "horizontal_align": "left", | ||||||||||||||||||||||||||
| "vertical_align": "top" | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||
| "margin": "4px 0px 0px 0px" | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
greptile-apps[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| "header": { | ||||||||||||||||||||||||||
| "title": { | ||||||||||||||||||||||||||
| "tag": "plain_text", | ||||||||||||||||||||||||||
| "content": "为您创建了一个会议日程,请确认:" | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| "subtitle": { | ||||||||||||||||||||||||||
| "tag": "plain_text", | ||||||||||||||||||||||||||
| "content": "" | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| "template": "yellow", | ||||||||||||||||||||||||||
| "icon": { | ||||||||||||||||||||||||||
| "tag": "standard_icon", | ||||||||||||||||||||||||||
| "token": "calendar_colorful" | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| "padding": "12px 12px 12px 20px" | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.