fix: full chat history, picked model/agent, usage sheet, image previews
- The chat loaded only one page of history: a desc page's older side is cursor.next, not previous, and the server rejects a cursor combined with order (InvalidCursorError). The first page stores `next`, later pages pass only `cursor`. tool/history_probe.dart walks a 1698-message session down to the oldest message with no gaps. - The message list is now reversed (newest at offset 0), so older pages grow above and the viewport stays put; near the top it loads by itself and a "load earlier" row remains as a fallback. - The agent picker filtered only on mode, so Compaction/Title/Summary (primary but hidden) showed up. Filter `hidden` too, and mark the current model or agent with a check. - The usage ring's sheet was guarded by a flag nothing ever set; the ring now opens the context detail sheet. - Tool image previews use a self-loading dialog and Image.memory: no temp file and no path_provider, whose Android implementation throws ClassNotFoundException: Landroid/content/Context; on the emulator. - "Add server" in the connected server sheet now opens the form and returns to the session list once connected. - Add a Linux desktop target for fast local UI checks, plus the probe that pages history. - Version 0.3.2 (code 302).
This commit is contained in:
1 parent
2f5aad3814
commit
61977d2b14
24 files changed
+834
-130
No files matched your search
@@ -5,11 +5,13 @@ Android first. This branch (`flutter`) is a framework evaluation: the same
|
||||
feature set as the earlier Asuka/Go and MyGo attempts, reimplemented in
|
||||
Flutter to compare mobile UI maturity.
|
||||
|
||||
Status: 0.3.1 — servers (passwordless / password login, HTTP/HTTPS and
|
||||
Status: 0.3.2 — servers (passwordless / password login, HTTP/HTTPS and
|
||||
SOCKS5/socks5h proxy, self-signed certificates and pinning), session list with search and live
|
||||
events, chat with streaming Markdown, tool rows with image previews, a
|
||||
context usage ring with a detail sheet, model/agent switching, copy / fork /
|
||||
revert, attachments (photos/files), permissions. Android 7.0 (API 24)+.
|
||||
events, chat with streaming Markdown and full history paging, tool rows with
|
||||
image previews, a context usage ring with a detail sheet, model/agent
|
||||
switching (Build/Plan only, current one checked), copy / fork / revert,
|
||||
attachments (photos/files), permissions. Android 7.0 (API 24)+, plus a Linux
|
||||
desktop target used for local testing.
|
||||
|
||||
## What is here
|
||||
|
||||
@@ -18,7 +20,7 @@ revert, attachments (photos/files), permissions. Android 7.0 (API 24)+.
|
||||
| `lib/api/` | Dart OpenChamber client: auth, sessions, messages, SSE, models/agents, permissions, prompt/interrupt/fork/revert, `/api/fs/raw`; HTTP/HTTPS proxies via `HttpClient.findProxy`, SOCKS5/socks5h via `socks5_proxy`, pinning/self-signed via `badCertificateCallback` |
|
||||
| `lib/storage.dart` | Saved servers in `shared_preferences`, tokens in `flutter_secure_storage` (Android Keystore) |
|
||||
| `lib/state.dart` | The app state: connections, live sessions, the open chat, and SSE event folding |
|
||||
| `lib/screens/` | Servers, sessions, chat (streaming Markdown via `gpt_markdown`, composer, sheets) |
|
||||
| `lib/screens/` | Servers, sessions, chat (streaming Markdown via `gpt_markdown`, composer, sheets); the message list is reversed so older pages grow above without moving the viewport |
|
||||
| `lib/widgets/` | The context usage ring |
|
||||
|
||||
Markdown rendering reuses **`gpt_markdown`** (BSD-3), the Flutter AI-output renderer
|
||||
@@ -44,8 +46,25 @@ export JAVA_HOME=$HOME/SDK/jdk-21
|
||||
flutter pub get
|
||||
flutter test
|
||||
flutter build apk --release # dist artifacts in build/app/outputs/flutter-apk
|
||||
flutter build linux --debug # faster UI checks on the desktop
|
||||
```
|
||||
|
||||
The Linux build only needs a C toolchain and GTK 3 development headers; on
|
||||
this machine `clang` was extracted into `~/SDK/localbin` (from the
|
||||
`clang-17` package) and the two missing `-dev` files (`libsecret-1-dev`,
|
||||
`libjsoncpp-dev`) into `~/SDK/linuxdev`, so:
|
||||
|
||||
```bash
|
||||
export PATH=$HOME/SDK/localbin:$HOME/SDK/flutter/bin:$PATH
|
||||
export PKG_CONFIG_PATH=$HOME/SDK/linuxdev/usr/lib/x86_64-linux-gnu/pkgconfig
|
||||
export LIBRARY_PATH=$HOME/SDK/linuxdev/usr/lib/x86_64-linux-gnu
|
||||
flutter build linux --debug
|
||||
DISPLAY=:99 GDK_BACKEND=x11 ./build/linux/x64/debug/bundle/openchamber
|
||||
```
|
||||
|
||||
`tool/history_probe.dart` pages a session exactly as the chat does and reports
|
||||
whether every message is reached.
|
||||
|
||||
`android/app/build.gradle.kts` sets the application id
|
||||
`net.blumia.openchamber.flutter`, `minSdk 24`, and signs releases with
|
||||
`~/SDK/test-upload.jks` (override via `OPENCHAMBER_KEYSTORE*` env). Dart's
|
||||
|
||||
Reference in new issue
Block a user