feat: save several servers and pick one to connect

Match the first-party mobile client's connection screen:

- the first screen lists saved servers, the one last used leading with
  its connect button or connected state, the others below, and adding
  is one tap
- servers can be added, edited (name, address, proxy, self-signed) and
  deleted; deleting the live or last one returns to the list
- a password sheet prompts only when the server asks for one, keeps the
  error and the typed password for a retry
- while connected, the instances sheet switches servers
- proxy and self-signed options stay per server (the native app's own)
- the single-server record and its token migrate automatically
- permission cards read a plain signal, fixing a flaky update
- bump version to 0.1.2 (build 3)
This commit is contained in:
blumia committed 2026-11-16 11:52:38 +08:00
1 parent ef0b63ceee
commit 13aca21d99
12 files changed
+966 -361

No files matched your search

+4 -3
View File
@@ -3,8 +3,9 @@
A lightweight OpenChamber client for phones, written in Go with
[Asuka](https://asuka.egoist.dev/)'s native widgets. Android first.
Status: M0–M4 done — connect (password / passwordless, HTTP or SOCKS5 proxy,
self-signed certificates), live session list, chat with streaming Markdown,
Status: M0–M4 done — multiple saved servers with a connect list (add, edit,
delete, switch; password prompt; HTTP or SOCKS5 proxy and self-signed
certificates per server), live session list, chat with streaming Markdown,
permissions, model/agent switching, new sessions, archive/delete/rename, and a
UI-independent API client.
@@ -13,7 +14,7 @@ UI-independent API client.
| Path | What |
| --- | --- |
| `internal/ocapi/` | OpenChamber HTTP client: auth (password → device token), sessions, messages, prompt/interrupt/model/agent, permissions, SSE events, HTTP/SOCKS5 proxy, certificate pinning |
| `internal/storage/` | Connection settings in `asuka/sdk/store`, device token in `asuka/sdk/secure` (Android Keystore), per-install id for device dedupe |
| `internal/storage/` | Saved servers in `asuka/sdk/store`, one device token per server in `asuka/sdk/secure` (Android Keystore), per-install id for device dedupe, migration from the single-server record |
| `internal/appui/` | Screens: connect, sessions, chat (streaming Markdown, reasoning/tool folding, permissions) |
| `cmd/ocprobe/` | Terminal probe used to validate the API without a device |
| `PLAN.md` | Research, API contract, architecture, milestones, risks |