fix(commands): wire /usage to status (#492) (thanks @lc0rp)

This commit is contained in:
Peter Steinberger
2026-01-09 17:10:53 +01:00
parent 08caf7b9fc
commit 68ad27e31c
6 changed files with 47 additions and 3 deletions

View File

@@ -36,6 +36,7 @@ Directives (`/think`, `/verbose`, `/reasoning`, `/elevated`) are parsed even whe
Text + native (when enabled):
- `/help`
- `/status` (alias: `/usage`)
- `/debug show|set|unset|reset` (runtime overrides, owner-only)
- `/cost on|off` (toggle per-response usage line)
- `/stop`
- `/restart`
@@ -46,7 +47,7 @@ Text + native (when enabled):
- `/verbose on|off` (alias: `/v`)
- `/reasoning on|off|stream` (alias: `/reason`; `stream` = Telegram draft only)
- `/elevated on|off` (alias: `/elev`)
- `/model <name>` (or `/<alias>` from `agent.models.*.alias`)
- `/model <name>` (or `/<alias>` from `agents.defaults.models.*.alias`)
- `/queue <mode>` (plus options like `debounce:2s cap:25 drop:summarize`; send `/queue` to see current settings)
Text-only:
@@ -59,6 +60,24 @@ Notes:
- `/verbose` is meant for debugging and extra visibility; keep it **off** in normal use.
- `/reasoning` (and `/verbose`) are risky in group settings: they may reveal internal reasoning or tool output you did not intend to expose. Prefer leaving them off, especially in group chats.
## Debug overrides
`/debug` lets you set **runtime-only** config overrides (memory, not disk). Owner-only.
Examples:
```
/debug show
/debug set messages.responsePrefix="[clawdbot]"
/debug set whatsapp.allowFrom=["+1555","+4477"]
/debug unset messages.responsePrefix
/debug reset
```
Notes:
- Overrides apply immediately to new config reads, but do **not** write to `clawdbot.json`.
- Use `/debug reset` to clear all overrides and return to the on-disk config.
## Surface notes
- **Text commands** run in the normal chat session (DMs share `main`, groups have their own session).