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

+20 -1
View File
@@ -131,8 +131,12 @@ func fakeServer(t *testing.T, password, validToken, sessionTitle string) *httpte
w.WriteHeader(http.StatusUnauthorized)
return
}
title := sessionTitle
if q := r.URL.Query().Get("search"); q != "" {
title = "Found " + q
}
fmt.Fprintf(w, `{"data":[{"id":"ses_1","title":%q,"time":{"created":1,"updated":2},
"location":{"directory":"/home/me/project"},"model":{"id":"m","providerID":"p"}}],"cursor":{}}`, sessionTitle)
"location":{"directory":"/home/me/project"},"model":{"id":"m","providerID":"p"}}],"cursor":{}}`, title)
})
mux.HandleFunc("/api/session/active", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, `{"data":{"ses_1":{"type":"running"}}}`)
@@ -334,3 +338,18 @@ func TestFailedAddReopensTheForm(t *testing.T) {
a.Expect("添加服务器")
a.Expect("取消")
}
func TestSessionSearch(t *testing.T) {
srv := fakeServer(t, "", "", "First session")
st := &memStore{}
a := mount(t, st)
connectViaForm(t, a, srv.URL)
a.WaitFor("First session")
a.Tap("搜索会话")
a.Type("输入关键词搜索", "deploy")
a.WaitFor("Found deploy")
a.Tap("清除")
a.WaitFor("First session")
}