feat(temi_mcp): 添加跳舞工具并修复卡片消息发送

为轮足机器人添加跳舞功能,包含新的 MCP 工具和服务器方法。同时修复 Lark MCP 中发送卡片消息时 person_id 处理的问题,避免在 person_id 为 None 时产生异常。更新两个包的版本号以反映变更。
This commit is contained in:
2026-04-03 15:55:23 +08:00
parent 894ee1dfbf
commit 3b881bf8c8
5 changed files with 30 additions and 7 deletions

View File

@@ -1618,8 +1618,9 @@ def send_card_message(token: str, receiver_id: str, person_id: str, image_key: s
cst_now = utc_now + timedelta(hours=8)
current_time = cst_now.strftime("%Y-%m-%d %H:%M:%S")
if person_id:
person_content = f"<person id='{person_id}' show_name=true show_avatar=true style='normal'></person>"
normalized_person_id = str(person_id).strip() if person_id is not None else ""
if normalized_person_id:
person_content = f"<person id='{normalized_person_id}' show_name=true show_avatar=true style='normal'></person>"
else:
person_content = "未知用户"
@@ -1803,7 +1804,8 @@ async def handle_call_tool(name: str, arguments: Dict[str, object], token: str)
elif name == "send_card_message":
image_key = str(arguments.get("image_key", "")).strip()
receiver_id = str(arguments.get("receiver_id", "")).strip()
person_id = str(arguments.get("person_id", "")).strip()
raw_person_id = arguments.get("person_id")
person_id = str(raw_person_id).strip() if raw_person_id is not None else ""
if not receiver_id:
raise ValueError("missing receiver_id")
if not image_key:

View File

@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "lzwcai-lark-mcp"
version = "0.1.13"
version = "0.1.15"
description = "Lark MCP server"
requires-python = ">=3.10"
dependencies = [