Coverage for integrations / ui_actions / __init__.py: 100.0%

2 statements  

« prev     ^ index     » next       coverage.py v7.14.0, created at 2026-05-12 04:49 +0000

1"""ui_actions — registry + tools for in-app navigation and action surfacing. 

2 

3The agent chat screen in Nunba/Hevolve has a companion "LiquidUI action bar" 

4that shows context-aware quick-actions pointing at other app pages. This 

5package owns: 

6 

7- page_registry: single source of truth for what pages exist and which 

8 natural-language phrases map to them 

9- navigate_tool: LangChain tool that resolves a user phrase to a 

10 concrete ui_action dict the frontend can execute (navigate to route, 

11 open overlay, etc.) 

12 

13Having the registry on the backend (not frontend) means the LLM sees the 

14available destinations as part of its tool context, so 'take me to social' 

15lands deterministically instead of becoming text chatter. 

16""" 

17from .page_registry import ( 

18 PageEntry, 

19 PAGE_REGISTRY, 

20 resolve_page, 

21 list_pages, 

22) 

23 

24__all__ = ['PageEntry', 'PAGE_REGISTRY', 'resolve_page', 'list_pages']