Added slash command handling
This commit is contained in:
1 parent
10e9565e2e
commit
1bcadcf950
16 files changed
+567
-21
No files matched your search
+17
-9
@@ -81,17 +81,25 @@ app/shared/src/
|
||||
auto-grow field, attach (paperclip), mic/send (right). Send on Enter
|
||||
(configurable: Enter=send vs Enter=newline).
|
||||
|
||||
### Menu button → all slash commands
|
||||
- `Menü` opens a **bottom sheet** listing the command catalog. The catalog is
|
||||
served by the gateway via `commands.catalog` request → response with
|
||||
`{name, description, args_hint, category}` per command, so it always matches
|
||||
hermes (`/new`, `/model`, `/reasoning`, `/status`, `/cron`, `/tools`, …).
|
||||
- Typing `/` in the field shows **autocomplete** via `commands.complete`
|
||||
request (gateway matches the typed prefix). Selecting inserts `/cmd `.
|
||||
- Selecting a command sends `message.send {text:"/cmd args"}`.
|
||||
### Slash commands
|
||||
- **`/` drawer (implemented):** typing `/` in the composer rolls a drawer up
|
||||
over the input listing the command catalog. The catalog is served by the
|
||||
gateway via `commands.catalog` request → response with
|
||||
`{name, description, args_hint, category, aliases}` per command (derived
|
||||
from hermes' `COMMAND_REGISTRY`, gateway-available subset + plugin commands),
|
||||
so it always matches hermes (`/new`, `/model`, `/reasoning`, `/status`,
|
||||
`/cron`, …). The drawer is shown while the input is a bare `/…` (no space
|
||||
yet); typing fuzzy-filters it **client-side** (subsequence match over name +
|
||||
aliases — no `commands.complete` round-trip). Tapping a row sends
|
||||
`message.send {text:"/cmd"}` and closes the drawer; an unknown command
|
||||
empties the match list and closes it (the raw text can still be sent —
|
||||
hermes answers with its unknown-command reply). Escape (desktop) clears the
|
||||
`/` input.
|
||||
- **Menu button (planned):** `Menü` opens a **bottom sheet** listing the same
|
||||
catalog for discovery without typing.
|
||||
- **Interactive commands** (`/model`, `/reasoning`, `/fast`, approvals,
|
||||
clarifies) render as **native pickers** from `picker.*` frames (a dialog /
|
||||
sheet with the options; answer via `picker.select`).
|
||||
sheet with the options; answer via `picker.select`) — planned.
|
||||
|
||||
### Streaming (app-controlled)
|
||||
- **Settings → "Streaming"** toggle (default on). When off, the app ignores
|
||||
|
||||
Reference in new issue
Block a user