Pure parser + dispatcher for slash commands in the mix athena.chat REPL.
parse/1 maps a raw input line (or :eof) to one of:
{:message, text}— free-form user prompt for the agent loop.{:command, verb, args}— recognized slash command (:model,:mode,:tools,:clear,:help).:exit— user wants to leave the session (/exit,/quit,/q, EOF).:noop— input was blank.{:unknown, verb}— slash-prefixed input that didn't match a known verb.
Parsing is case-insensitive on the verb and trims surrounding whitespace. Arguments after the verb are split on whitespace and preserved as strings.
Summary
Functions
One-line summary for each verb, keyed by the slash-prefixed name. Used to enrich autocomplete suggestions.
Canonical slash-prefixed verbs available for autocomplete, sorted
alphabetically. The aliases (? for help, q/quit for exit, etc.)
are intentionally excluded.
Types
Functions
One-line summary for each verb, keyed by the slash-prefixed name. Used to enrich autocomplete suggestions.
@spec help_text() :: String.t()
@spec verbs() :: [String.t()]
Canonical slash-prefixed verbs available for autocomplete, sorted
alphabetically. The aliases (? for help, q/quit for exit, etc.)
are intentionally excluded.