@epoch-agent/view 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +30 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WireSessionReference, WireFileReference, ToolArtifact, AgentEvent } from '@epoch-agent/protocol';
|
|
1
|
+
import { WireSessionReference, WireFileReference, WireImageReference, ToolArtifact, AgentEvent } from '@epoch-agent/protocol';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* 展示项类型 — 基于 Google Gemini CLI types.ts
|
|
@@ -79,6 +79,35 @@ type HistoryItemUser = HistoryItemBase & {
|
|
|
79
79
|
* 202 的 `files` 读(键不同、判据同一条)。
|
|
80
80
|
*/
|
|
81
81
|
files?: readonly WireFileReference[];
|
|
82
|
+
/**
|
|
83
|
+
* 这条消息里附的那几张图(2026-09-01)。
|
|
84
|
+
*
|
|
85
|
+
* ## 这一格是 `state/types.ts` 和 `state/replay.ts` 记的同一笔债
|
|
86
|
+
*
|
|
87
|
+
* 两处逐字写着「`@epoch-agent/view` 的展示项里根本没有『图片』这一类,
|
|
88
|
+
* 真要画缩略图得先往 view 加类型」。这就是那次加类型。
|
|
89
|
+
*
|
|
90
|
+
* 在它之前,用户自己那条带图的消息在界面上是一行**文本占位符**
|
|
91
|
+
* (`[图片 image/jpeg]`,`contentToDisplayText` 的口径)—— 屏幕上说
|
|
92
|
+
* 「这里有张图」,但人看不到那张图,而它明明就在服务端的 artifact 目录里、
|
|
93
|
+
* 也已经有一个能取到它的端点。
|
|
94
|
+
*
|
|
95
|
+
* 缺席 / 两条路合到一格那两条判据**逐字同**上面 `references`:
|
|
96
|
+
*
|
|
97
|
+
* | 谁填 | 从哪来 |
|
|
98
|
+
* | --- | --- |
|
|
99
|
+
* | 回放(`GET /messages`) | 那条消息的 `parts` 里 `type: 'image'`(`image` 是服务端路径) |
|
|
100
|
+
* | 刚发出去那一条 | 浏览器自己刚读的那个文件(`image` 是 `data:` URL) |
|
|
101
|
+
*
|
|
102
|
+
* ⚠️ **和上面两格的区别:这一格带「内容」**。`WireImageReference` 只摘了 `type`、
|
|
103
|
+
* **没摘 `image`** —— 因为界面要的就是那张图。但那一格永远是**引用**
|
|
104
|
+
* (路径 / http URL / 本地 data URL),服务端绝不在这条线上发 base64,
|
|
105
|
+
* 判据全文在 `WireImageReference` 上。
|
|
106
|
+
*
|
|
107
|
+
* TUI 那一侧恒缺席 —— 终端里画不了图,它照旧走文本占位(同 `references`
|
|
108
|
+
* 那一格的处置,是一次判断不是漏接)。
|
|
109
|
+
*/
|
|
110
|
+
images?: readonly WireImageReference[];
|
|
82
111
|
};
|
|
83
112
|
/**
|
|
84
113
|
* 模型的回复正文。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epoch-agent/view",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "epoch-agent 展示层纯逻辑:AgentEvent → 可渲染 item,tui 与 web 共用",
|
|
6
6
|
"repository": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@epoch-agent/protocol": "0.
|
|
25
|
+
"@epoch-agent/protocol": "0.3.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"tsup": "^8.3.6",
|