fix:Because the message_id was popped out, it caused the issue where the tool couldn't find the message_id after being invoked.

This commit is contained in:
Dong_master
2025-08-11 23:36:01 +08:00
parent a381069bcc
commit 7301476228
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -543,9 +543,10 @@ class LarkAdapter(adapter.MessagePlatformAdapter):
"""
回复消息变成更新卡片消息
"""
self.seq += 1
if (self.seq - 1) % 8 == 0 or is_final:
self.seq += 1
lark_message = await self.message_converter.yiri2target(message, self.api_client)
@@ -577,7 +578,7 @@ class LarkAdapter(adapter.MessagePlatformAdapter):
if is_final:
self.seq = 1 # 消息回复结束之后重置seq
self.card_id_dict.pop(message_id) # 清理已经使用过的卡片
# self.card_id_dict.pop(message_id) # 清理已经使用过的卡片
# 发起请求
response: ContentCardElementResponse = self.api_client.cardkit.v1.card_element.content(request)