Use shared item axis context in role routes

This commit is contained in:
2026-06-27 18:18:47 +02:00
parent 867916ee51
commit 6a65f7d35c
11 changed files with 100 additions and 52 deletions
+13
View File
@@ -108,6 +108,19 @@ def action_context_text(axis_values: Any) -> str:
)
def context_text(*parts: Any, axis_values: Any = None) -> str:
text_parts = [clean_text(part) for part in parts if clean_text(part)]
text_parts.extend(axis_value_texts(axis_values))
return " ".join(part.lower() for part in text_parts if part)
def key_text(axis_values: Any, key: str) -> str:
if not isinstance(axis_values, dict):
return ""
values = value_texts(axis_values.get(key))
return values[0].lower() if values else ""
def row_axis_value_texts(
row: dict[str, Any],
*,