pub fn render_help(engine_commands: &[CommandDescriptor]) -> StringExpand description
Render /help’s output: the built-ins plus every engine-supplied
command, one line each, then the key bindings.
Why: DOC-50 §5 Slice 7 requires /help to enumerate both sides of the
routing split — engine_commands is expected to be
crate::app::ReplApp::commands (the cache a product populates from
TuiEngine::commands() during setup; see that field’s doc comment).
#4596 adds the [KEY_BINDINGS] section, because Ctrl-O is otherwise
undiscoverable.
What: one " /{name}{ args_hint} — {summary}" line per command,
built-ins first, then one " {keys} — {what}" line per binding. Pure
string formatting — no ratatui dependency, so this stays usable from both
the plain-text scrollback path and a future richer help widget.
Test: tests::render_help_lists_builtins_and_engine_commands,
tests::render_help_includes_args_hint_when_present,
tests::render_help_lists_the_tool_card_toggle_key.