LemonGateway.EngineDirective (lemon_gateway v0.1.0)

View Source

Parses and strips leading engine directives from user input text.

An engine directive is a slash prefix such as /claude or /codex that selects which engine should handle the request. The directive is stripped and the engine name and remaining text are returned separately.

Summary

Functions

Strip a leading engine directive from text.

Functions

strip(text)

@spec strip(String.t() | nil) :: {String.t() | nil, String.t()}

Strip a leading engine directive from text.

Examples:

  • /codex fix this -> {"codex", "fix this"}
  • /claude -> {"claude", ""}
  • hello -> {nil, "hello"}