Skip to main content

Module commands

Module commands 

Source
Expand description

Engine-level command results — TUI-agnostic outcomes of slash commands.

The engine processes a command and returns a CommandResult. Renderers (TUI, headless) decide how to display the result.

Structs§

SessionSummary
Summary of a session for listing.

Enums§

CommandResult
Result of processing a slash command in the engine.
ModalRequest
TUI-specific modals the engine can request.

Functions§

evaluate_engine_command
Pure command → result mapping (no runtime mutation). Split out of handle_engine_command so dispatch can be unit-tested without a Runtime.
handle_engine_command
Process commands that are pure engine logic — no TUI state needed. Returns None if the command needs TUI-level handling.
parse_command
Parse a slash command into (command, arg).
parse_thinking_arg
Parse a /thinking argument into a canonical (level, budget) pair.
persist_to_config
Persist a config key and return an honest, user-visible status suffix — never claims “(saved to config)” unless the write actually succeeded.
thinking_config_value
Config-file value for a thinking change: the canonical level name when it is one config.rs can parse back, otherwise the raw budget number (which parse_thinking_budget also accepts; 0 is the adaptive sentinel).