Long-press message selection + delete (message.delete frame, outbox removal, all-device sync)

This commit is contained in:
ARIA committed 2026-08-20 16:51:19 +02:00
1 parent 60ec2b44a7
commit 6f4bf3cb7f
11 files changed
+417 -18

No files matched your search

+26 -5
View File
@@ -63,7 +63,17 @@ Streaming a bubble. `update` carries the **full** current text (app replaces).
{"type":"message.start","chat_id":"…","payload":{"message_id":"m_9002","role":"assistant"}}
{"type":"message.update","chat_id":"…","payload":{"message_id":"m_9002","text":"partial…"}}
{"type":"message.stop","chat_id":"…","payload":{"message_id":"m_9002","final_text":"full…",
"reasoning":"…","model":"…","tokens":11}}
"reasoning":"…","model":"…","tokens":11}}
```
### `message.deleted`
The given message(s) were deleted from a chat/thread. Response to a
`message.delete` request (`id` set) **and** broadcast to every device so all of
them drop the message(s) from their cache. Also outboxed, so a device that was
offline learns of the deletion on its next `sync`.
```json
{"type":"message.deleted","id":30,"chat_id":"android:default","thread_id":null,
"payload":{"message_ids":["m_9001","m_9002"]}}
```
### `commentary`
@@ -300,6 +310,16 @@ Load a page of messages for a chat/thread (initial open, scroll-up pagination).
`before_message_id` — return messages older than this (omit for newest page).
`limit` — max messages (default 50, max 200).
### `message.delete`
Delete the given message(s) from a chat/thread. The server removes them from the
outbox (so `history`/`sync` no longer return them) and broadcasts
`message.deleted` to every device. Idempotent: a message already gone (pruned by
retention) still yields a `message.deleted` broadcast so live caches drop it.
```json
{"type":"message.delete","id":30,"chat_id":"android:default","thread_id":null,
"payload":{"message_ids":["m_9001","m_9002"]}}
```
### `commands.catalog`
Fetch the full slash-command catalog (for the `Menü` bottom sheet).
```json
@@ -346,10 +366,11 @@ Keepalive. `{"type":"ping","payload":{"ts":1724000000000}}` → `pong`.
- Frames are ordered per connection (TCP/WS). Streaming `message.update` frames
for a `message_id` are monotonic; the app may coalesce to the latest.
- Terminal frames (`message`, `message.stop`, `tool.end`, `notification`,
`picker.*`, `channel.*`, `agent.busy`, `agent.idle`, `history`,
`commands.catalog`, `commands.complete`) are **never dropped** under
backpressure; only intermediate `message.update`/`tool.progress` are coalesced.
- Terminal frames (`message`, `message.stop`, `message.deleted`, `tool.end`,
`notification`, `picker.*`, `channel.*`, `agent.busy`, `agent.idle`,
`history`, `commands.catalog`, `commands.complete`) are **never dropped**
under backpressure; only intermediate `message.update`/`tool.progress` are
coalesced.
- Anything not delivered live goes to the **outbox** and is replayed by `sync`.
- **Broadcast:** channel directory events (`channel.*`) and read-receipts are
pushed to **all** connected devices for that gateway (no subscribe step).