Added slash command handling
This commit is contained in:
1 parent
10e9565e2e
commit
1bcadcf950
16 files changed
+567
-21
No files matched your search
@@ -150,18 +150,22 @@ request. The app uses this to **populate the initial view** when a channel is
|
||||
opened (complements `sync`, which only replays undelivered outbox frames).
|
||||
|
||||
### `commands.catalog`
|
||||
Response to a `commands.catalog` request. Full slash-command list.
|
||||
Request (app → server, empty payload) and response: the gateway's
|
||||
slash-command catalog for the app's `/` drawer. Derived from hermes' central
|
||||
`COMMAND_REGISTRY` (the same source the gateway help and the Telegram command
|
||||
menu use), restricted to commands available on gateway surfaces, plus
|
||||
plugin-registered commands. The app fuzzy-matches the typed prefix
|
||||
client-side (no `commands.complete` round-trip).
|
||||
```json
|
||||
{"type":"commands.catalog","id":21,"payload":{
|
||||
"commands":[
|
||||
{"name":"/new","description":"Start a new session","args_hint":"","category":"session"},
|
||||
{"name":"/model","description":"Switch model","args_hint":"<provider/model>","category":"config"},
|
||||
{"name":"/reasoning","description":"Toggle reasoning effort","args_hint":"[low|medium|high]","category":"config"},
|
||||
{"name":"/status","description":"Show session status","args_hint":"","category":"info"},
|
||||
{"name":"/cron","description":"Manage cron jobs","args_hint":"<list|add|rm>","category":"automation"},
|
||||
{"name":"/tools","description":"List available tools","args_hint":"","category":"info"}
|
||||
{"name":"/new","description":"Start a new session (fresh session ID + history)","args_hint":"[name]","category":"Session","aliases":["/reset"]},
|
||||
{"name":"/model","description":"Switch model","args_hint":"<provider/model>","category":"Configuration","aliases":[]},
|
||||
{"name":"/status","description":"Show session status","args_hint":"","category":"Info","aliases":[]}
|
||||
]}}
|
||||
```
|
||||
`name`/`aliases` carry the leading slash; `args_hint` is the registry's
|
||||
argument placeholder (empty when the command takes none).
|
||||
|
||||
### `commands.complete`
|
||||
Response to a `commands.complete` request. Autocomplete matches for a typed prefix.
|
||||
|
||||
Reference in new issue
Block a user