Files
agessaman 0809618d3a feat(templates): add {path_names} placeholder for short repeater names
{path_names} renders a message's route as compact repeater names, BlackHls▸KalamaSum▸KelsoG3 instead of a1b2,c3d4,e5f6 (3 hops), for [Test_Command] response_format and [Keywords] replies. A hop gets a name only on a 2- or 3-byte path, and only when its prefix has a single recent repeater or a collision resolves with at least path_names_min_confidence (default 0.9). Every other hop keeps its hex prefix, so no hop shows a guessed name. A direct message renders Direct, like {path}.

Names come from the same candidate query and selection as the web viewer's path decode; the candidate query is now candidate_repeaters() in path_inference so both share it. modules/name_shortener.py compacts each name (ASCII fold, emoji and filler dropped, callsigns dropped when another word names the node, CamelCase, place-word abbreviations, then vowels and letters) and packs the route into path_names_max_bytes, eliding hops after the first when names alone can't shrink enough. The lookup only runs when the template contains {path_names}.
2026-11-14 08:45:08 -08:00
..