Place LangBot branding above DingTalk card content

This commit is contained in:
fdc310
2026-10-28 03:44:07 +08:00
parent 6a29ffe07f
commit 1b00a7aa40
6 changed files with 6 additions and 6 deletions
@@ -53,7 +53,7 @@ def test_dingtalk_dify_input_card_uses_a2ui_binding_and_required_check():
assert field['value'] == {'path': '/form/value'}
assert button['action']['event']['context']['input'] == {'path': '/form/value'}
assert button['checks'][0]['condition']['call'] == 'required'
assert components[0]['children'][-1] == 'langbot-brand'
assert components[0]['children'][0] == 'langbot-brand'
assert any(component['id'] == 'langbot-brand-link' for component in components)
@@ -35,7 +35,7 @@ def test_text_card_keeps_brand_when_content_updates():
components = create_text_card_messages('surface-id', 'hello')[2]['updateComponents']['components']
by_id = {component['id']: component for component in components}
assert by_id['root']['children'] == ['content', 'langbot-brand']
assert by_id['root']['children'] == ['langbot-brand', 'content']
assert by_id['langbot-brand']['children'] == ['langbot-brand-icon', 'langbot-brand-link']
assert by_id['langbot-brand-icon']['url'] == 'https://langbot.app/logo-blue.png'
assert by_id['langbot-brand-icon']['previewEnabled'] is False
@@ -342,7 +342,7 @@ async def test_dingtalk_interaction_delivery_and_callback_event():
components = kwargs['a2ui_messages'][2]['updateComponents']['components']
button = next(component for component in components if component['component'] == 'Button')
assert button['action']['event']['context']['actionId'] == 'lbi:callback-token:a:0'
assert components[0]['children'][-1] == 'langbot-brand'
assert components[0]['children'][0] == 'langbot-brand'
assert any(component['id'] == 'langbot-brand-link' for component in components)
native = dingtalk_card_callback_event(