feat: AI-output Markdown, live SSE fixes, faster builds
- render assistant Markdown with gpt_markdown (the same renderer dsh-Go uses): streaming, syntax-highlighted code with copy, tables, LaTeX and task lists, replacing flutter_markdown - fix the event stream: Dart's Map collapsed the repeated `types` query into one value, so only one event type was subscribed and chats never updated; build the query by hand - keep the optimistic prompt on failure out of the transcript and put the text back for a retry - clamp negative turn durations - build: Aliyun Maven mirrors, pre-seeded Gradle 9.5.0, and a complete NDK 28.2 install to avoid multi-hour downloads
This commit is contained in:
1 parent
aee560172c
commit
885a27c6a9
7 files changed
+186
-46
No files matched your search
@@ -15,12 +15,14 @@
|
||||
| 环境 | Flutter **3.50.0 stable** 装在 `~/SDK/flutter`;`FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn`、`PUB_HOSTED_URL=https://pub.flutter-io.cn` |
|
||||
| 构建坑 | Gradle 发行包(gradle-9.5.0-all,230MB)从 services.gradle.org/GitHub 下载一小时级 → 用腾讯镜像预置;AGP 又重装 NDK 28.2(688MB,dl.google.com 慢)→ 腾讯 AndroidSDK 镜像重装完整 NDK;另在 settings/build.gradle.kts 前加**阿里云 Maven 镜像** |
|
||||
| 依赖坑 | file_picker 8.x 硬编码 compileSdk 34,与 flutter_plugin_android_lifecycle 要求的 36 冲突 → 升 file_picker 13.4(联邦版 API)+ flutter_secure_storage 11.2 |
|
||||
| 复用 | Go 客户端无法复用;`lib/api/` 按同一协议重写(HTTP/SOCKS5 代理、自签/pinning、SSE、part-shells) |
|
||||
| 复用 | Go 客户端无法复用;`lib/api/` 按同一协议重写(HTTP/SOCKS5 代理、自签/pinning、SSE、part-shells);聊天 Markdown 直接采用 **dsh-Go 同款的 `gpt_markdown`**(BSD-3,流式、代码高亮/复制、表格、LaTeX、任务列表) |
|
||||
| 踩坑 | SSE 的 `types` 是重复 query 参数,Dart 的 `Map` 会把它压成最后一个 → 只订阅到一种事件、聊天不更新;改为手动拼 query 后实时流恢复 |
|
||||
| 可继续复用 | dsh-Go 的 `app/lib/ui/chat/render/`(markdown_body、code_block、markdown_blocks 等)文件头多为 MIT,可保留 SPDX 头后搬运,但依赖其 Riverpod/DSH 协议类型;`scrollable_positioned_list`、`xterm` 等 pub 包也可直接用 |
|
||||
| 最低 Android | **24(7.0)** |
|
||||
| 明文 HTTP | Dart `HttpClient` 直接建 socket,release 连 `http://` 无需 cleartext 开关(已实测) |
|
||||
| 模拟器实测 | 服务器列表→添加/连接(无密码自动跳过)→会话列表(运行点/模型·时间)→聊天:流式 Markdown、思考/工具行、页脚、上下文占用环(65%/18%)、输入区;发送与回复正常 |
|
||||
| 模拟器实测 | 服务器列表→添加/连接(无密码自动跳过)→会话列表(运行点/模型·时间)→聊天:流式 Markdown(gpt_markdown,代码块/表格实测)、思考/工具行、页脚、上下文占用环、输入与实时回复(SSE) |
|
||||
| 产物 | `dist/OpenChamber-0.3.0-flutter-release.apk`(0.3.0 / code 300,`~/SDK/test-upload.jks` 签名,`OPENCHAMBER_KEYSTORE*` 可覆盖) |
|
||||
| 未做 | 朗读(按需求去掉)、附件/图片预览虽已实现但未在模拟器逐项点验、i18n、启动图 |
|
||||
| 未做 | 朗读(按需求去掉)、附件/图片预览虽已实现但未逐项点验、i18n、启动图;APK 71MB(gpt_markdown 带字体/LaTeX,后续可按 ABI 拆分) |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user