feat: show short paths and generated images in the chat
A file tool's row keeps only the part of the path under the session's directory (lib/screens/chat_screen.dart instead of the whole absolute path), as the first-party client does, so a phone still shows the file name; the diff card's file headings drop the same prefix. A finished openchamber_image call is lifted out of the folded run and drawn as the picture it saved, in place, as ShownToolCard does through GeneratedImages: tap opens the full-screen preview, and the card and preview share an in-memory cache of the bytes. 0.4.13 (413).
This commit is contained in:
1 parent
5c0ea6f6f4
commit
809e0a747a
7 files changed
+353
-25
No files matched your search
@@ -5,6 +5,18 @@
|
||||
|
||||
---
|
||||
|
||||
## 0.4.13 相对路径与生成图片的行内展示(分支 `flutter`)
|
||||
|
||||
| 项 | 结果 |
|
||||
| --- | --- |
|
||||
| 路径显示 | 折叠状态下 `read` / `write` / `edit` 等文件工具只显示相对于会话目录的路径(如 `lib/screens/chat_screen.dart`),不再被 `/home/...` 前缀挤掉文件名;会话目录之外的路径(如 `/tmp/...`)仍显示完整路径。diff 展开后的多文件标题同样去前缀 |
|
||||
| 生成图片 | 对照上游确认:`openchamber_image`(`action=image.generate`,结果 JSON 里 `data.images[].path`)在 `isShownInPlace` 为真时会从 Activity 折叠里**提升**出来,由 `ShownToolCard → GeneratedImages` 在对话中直接显示图片(懒加载、点开画廊、上方有下载)。现在我们也把它从工具运行段里提出来:运行段在它之前结束,图片以卡片形式出现在原位置,最大高度 380,点击打开既有的全屏预览;运行中仍是「正在生成图片」的普通步骤,失败则留在运行段显示错误 |
|
||||
| 图片缓存 | 卡片与全屏预览共用一份内存缓存(最多 8 张),列表重建不重复请求 `/api/fs/raw` |
|
||||
| 测试 | 新增 `test/generated_images_test.dart`:结果 JSON 解析多图、未完成/失败/其它工具/非 JSON 不显示,`relativePath` 去前缀、目录外保留、尾斜杠与相似前缀;65 项全过 |
|
||||
| 版本 | **0.4.13(code 413)** |
|
||||
|
||||
---
|
||||
|
||||
## 0.4.12 编辑工具的 diff 显示(分支 `flutter`)
|
||||
|
||||
| 项 | 结果 |
|
||||
|
||||
Reference in new issue
Block a user