feat: search sessions, attach files, read aloud, jump to latest

Reach the first-party mobile client's everyday features:

- sessions: a search button opens a field; typing asks the server with
  its search parameter (350 ms settle) and clearing restores the list
- composer: attach photos or files (up to five, 10 MB each) as data
  URLs with the prompt; attachments show as removable chips and are
  named under the sent message
- turn menu: read the answer aloud with the system voice, or stop it
- chat: a "latest" button appears after scrolling up and returns to the
  end of the conversation
- reset a live search when a connection ends

Bump version to 0.2.0 (build 14).
This commit is contained in:
blumia committed 2026-11-17 21:52:06 +08:00
1 parent 4c6fcf4cbe
commit 72119b73e8
11 files changed
+445 -56

No files matched your search

+6
View File
@@ -13,6 +13,9 @@ type PromptOptions struct {
// retry after a lost response a no-op instead of a duplicate.
MessageID string
Text string
// Files ride with the prompt as data URLs (or URIs the server can
// read), as the web client sends them.
Files []PromptFile
}
// Prompt sends a user message to a session. The reply arrives through the
@@ -22,6 +25,9 @@ func (c *Client) Prompt(ctx context.Context, sessionID string, o PromptOptions)
if o.MessageID != "" {
body["id"] = o.MessageID
}
if len(o.Files) > 0 {
body["files"] = o.Files
}
path := "/api/session/" + url.PathEscape(sessionID) + "/prompt"
return c.do(ctx, http.MethodPost, path, requestOptions{directory: o.Directory}, body, nil)
}