MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / make_slash_command

Function make_slash_command

scripts/setup_slack.py:73–76  ·  view source on GitHub ↗

Derive a slash command from the display name. e.g. 'Sandbox-Agent' -> '/sandbox-agent'.

(display_name: str)

Source from the content-addressed store, hash-verified

71
72
73def make_slash_command(display_name: str) -> str:
74 """Derive a slash command from the display name. e.g. 'Sandbox-Agent' -> '/sandbox-agent'."""
75 cmd = re.sub(r"[^a-z0-9-]", "", display_name.lower().replace(" ", "-"))
76 return f"/{cmd}"
77
78
79def get_existing_bot_name() -> str | None:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected