Treat every identifier (tool name, command name, provider slug, theme name, thread key) as a runtime contract: you must generate, transform, and resolve it consistently, and preserve an unambiguous mapping between any emitted/sanitized UI value and the backend identity.
Apply these rules: 1) Use a single source-of-truth canonical form for comparisons/dispatch.
custom:).
2) Keep “display/sanitized” values separate from “dispatch” values.Example pattern (opaque UI token → canonical dispatch):
# UI: show truncated label, dispatch uses stable token
items = {token: canonical_name}
# When rendering select options
for token, canonical in list(items.items())[:24]:
select_option = discord.SelectOption(
label=canonical[:100], # display-only truncation
value=token, # dispatched identity
)
# On selection
token = interaction.data["values"][0]
canonical = items[token]
await dispatch(f"/{canonical}")
Follow the same separation for Telegram menus, tool registries, and provider/theme resolution: emitted names/values must be mapped back to the exact canonical identifier used for backend resolution, and collisions must be rejected early rather than “best-effort” resolved later.
Enter the URL of a public GitHub repository