The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(feishu): retain attachment inline flags in batches
fangliquan2e58dbc9c5c3
diff --git a/plugins/platforms/feishu/adapter.py b/plugins/platforms/feishu/adapter.pyindex bc17e2e7bfa..1b3cac63d01 100644--- a/plugins/platforms/feishu/adapter.py+++ b/plugins/platforms/feishu/adapter.py@@ -2664,6 +2664,7 @@ class FeishuAdapter(BasePlatformAdapter):returnexisting.media_urls.extend(event.media_urls)existing.media_types.extend(event.media_types)+ existing.media_text_inlined.extend(event.media_text_inlined)if event.text:existing.text = self._merge_caption(existing.text, event.text)existing.timestamp = event.timestampdiff --git a/tests/gateway/test_feishu.py b/tests/gateway/test_feishu.pyindex 6482f03f7f7..41e12052f4d 100644--- a/tests/gateway/test_feishu.py+++ b/tests/gateway/test_feishu.py@@ -1060,6 +1060,7 @@ class TestAdapterBehavior(unittest.TestCase):message_id="om_p1",media_urls=["/tmp/a.png"],media_types=["image/png"],+ media_text_inlined=[False],))await adapter._dispatch_inbound_event(@@ -1070,6 +1071,7 @@ class TestAdapterBehavior(unittest.TestCase):message_id="om_p2",media_urls=["/tmp/b.png"],media_types=["image/png"],+ media_text_inlined=[True],))pending = list(adapter._pending_media_batch_tasks.values())@@ -1081,6 +1083,7 @@ class TestAdapterBehavior(unittest.TestCase):adapter.handle_message.assert_awaited_once()event = adapter.handle_message.await_args.args[0]self.assertEqual(event.media_urls, ["/tmp/a.png", "/tmp/b.png"])+ self.assertEqual(event.media_text_inlined, [False, True])self.assertIn("第一张", event.text)self.assertIn("第二张", event.text)