Skip to content

Commit e297d4c

Browse files
committed
Fix CI: use footer_objects, bump panel-material-ui to >=0.9.1
footer_actions is not yet available in released panel-material-ui, use footer_objects instead. Bump pin to >=0.9.1 per review.
1 parent 997647a commit e297d4c

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

lumen/ai/ui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,10 +1635,10 @@ async def _generate_follow_up():
16351635
if len(self.interface):
16361636
message = self.interface.objects[-1]
16371637
existing = [
1638-
obj for obj in (message.footer_actions or [])
1638+
obj for obj in (message.footer_objects or [])
16391639
if getattr(obj, 'name', '') != "FollowUp"
16401640
]
1641-
message.footer_actions = existing + [follow_up_button]
1641+
message.footer_objects = existing + [follow_up_button]
16421642

16431643
def __panel__(self):
16441644
return self._main

lumen/tests/ai/test_ui.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,12 +1615,9 @@ async def noop_callback(contents, user, instance):
16151615

16161616
# --- Follow-up suggestions tests ---
16171617

1618-
def _get_footer_actions(msg):
1619-
"""Get footer actions from message, falling back to footer_objects for older pmui."""
1620-
try:
1621-
return msg.footer_actions or []
1622-
except AttributeError:
1623-
return msg.footer_objects or []
1618+
def _get_footer_objects(msg):
1619+
"""Get footer objects from message."""
1620+
return msg.footer_objects or []
16241621

16251622

16261623
def test_follow_up_suggestion_model():
@@ -1663,7 +1660,7 @@ async def test_follow_up_icon_after_query(explorer_ui):
16631660

16641661
last_msg = ui.interface.objects[-1]
16651662
follow_up_icons = [
1666-
f for f in _get_footer_actions(last_msg)
1663+
f for f in _get_footer_objects(last_msg)
16671664
if getattr(f, 'name', '') == "FollowUp"
16681665
]
16691666
assert len(follow_up_icons) == 1
@@ -1677,7 +1674,7 @@ async def test_follow_up_icon_not_on_error(explorer_ui_with_error):
16771674

16781675
last_msg = ui.interface.objects[-1]
16791676
follow_up_icons = [
1680-
f for f in _get_footer_actions(last_msg)
1677+
f for f in _get_footer_objects(last_msg)
16811678
if getattr(f, 'name', '') == "FollowUp"
16821679
]
16831680
assert len(follow_up_icons) == 0
@@ -1699,7 +1696,7 @@ async def test_follow_up_icon_not_shown_without_pipeline(explorer_ui):
16991696

17001697
last_msg = ui.interface.objects[-1]
17011698
follow_up_icons = [
1702-
f for f in _get_footer_actions(last_msg)
1699+
f for f in _get_footer_objects(last_msg)
17031700
if getattr(f, 'name', '') == "FollowUp"
17041701
]
17051702
assert len(follow_up_icons) == 0
@@ -1733,7 +1730,7 @@ async def test_follow_up_icon_description(explorer_ui):
17331730

17341731
last_msg = ui.interface.objects[-1]
17351732
follow_up_icons = [
1736-
f for f in _get_footer_actions(last_msg)
1733+
f for f in _get_footer_objects(last_msg)
17371734
if getattr(f, 'name', '') == "FollowUp"
17381735
]
17391736
assert len(follow_up_icons) == 1

0 commit comments

Comments
 (0)