zcw-shared 2.21.0 → 2.22.0
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/package.json +14 -14
- package/types/im-chat.d.ts +1 -5
- package/types/im-message-display.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zcw-shared",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"references",
|
|
6
6
|
"dist",
|
|
@@ -12,19 +12,6 @@
|
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"type": "module",
|
|
14
14
|
"description": "",
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "tsc -p tsconfig.build.json && tsx scripts/generate-exports.ts",
|
|
17
|
-
"publish:patch": "npx tsx scripts/publish.ts patch",
|
|
18
|
-
"publish:minor": "npx tsx scripts/publish.ts minor",
|
|
19
|
-
"publish:major": "npx tsx scripts/publish.ts major",
|
|
20
|
-
"publish:prerelease": "npx tsx scripts/publish.ts prerelease",
|
|
21
|
-
"docs:dev": "vitepress dev docs",
|
|
22
|
-
"docs:build": "NODE_OPTIONS=--max-old-space-size=4096 vitepress build docs",
|
|
23
|
-
"docs:preview": "vitepress preview docs",
|
|
24
|
-
"deploy:cos:build": "NODE_OPTIONS=--max-old-space-size=4096 vitepress build docs",
|
|
25
|
-
"deploy:tcb": "npx tsx scripts/deploy-tcb.ts",
|
|
26
|
-
"deploy:cos": "npx tsx scripts/deploy-cos.ts"
|
|
27
|
-
},
|
|
28
15
|
"dependencies": {
|
|
29
16
|
"zod": "^3.23.8"
|
|
30
17
|
},
|
|
@@ -487,5 +474,18 @@
|
|
|
487
474
|
"./types/video": "./types/video.d.ts",
|
|
488
475
|
"./types/vue": "./types/vue.d.ts",
|
|
489
476
|
"./types/worker": "./types/worker.d.ts"
|
|
477
|
+
},
|
|
478
|
+
"scripts": {
|
|
479
|
+
"build": "tsc -p tsconfig.build.json && tsx scripts/generate-exports.ts",
|
|
480
|
+
"publish:patch": "npx tsx scripts/publish.ts patch",
|
|
481
|
+
"publish:minor": "npx tsx scripts/publish.ts minor",
|
|
482
|
+
"publish:major": "npx tsx scripts/publish.ts major",
|
|
483
|
+
"publish:prerelease": "npx tsx scripts/publish.ts prerelease",
|
|
484
|
+
"docs:dev": "vitepress dev docs",
|
|
485
|
+
"docs:build": "NODE_OPTIONS=--max-old-space-size=4096 vitepress build docs",
|
|
486
|
+
"docs:preview": "vitepress preview docs",
|
|
487
|
+
"deploy:cos:build": "NODE_OPTIONS=--max-old-space-size=4096 vitepress build docs",
|
|
488
|
+
"deploy:tcb": "npx tsx scripts/deploy-tcb.ts",
|
|
489
|
+
"deploy:cos": "npx tsx scripts/deploy-cos.ts"
|
|
490
490
|
}
|
|
491
491
|
}
|
package/types/im-chat.d.ts
CHANGED
|
@@ -126,17 +126,13 @@ export interface ChatMessage {
|
|
|
126
126
|
/** 附件总数(`extra_data.inline_upload_total_count`) */
|
|
127
127
|
inlineUploadTotalCount?: number
|
|
128
128
|
/**
|
|
129
|
-
* `extra_data.im_display
|
|
129
|
+
* `extra_data.im_display`:多段气泡(图文混排、Agent 工具穿插等);存在时气泡层优先按块渲染。
|
|
130
130
|
*/
|
|
131
131
|
displaySpec?: ImMessageDisplaySpec
|
|
132
132
|
/** 智能体代理失败且服务端声明可重试时,由前端写入,展示「点击重试」 */
|
|
133
133
|
agentProxyRetryable?: boolean
|
|
134
134
|
/** 代理失败时的错误文案(如库不可用、ENOTFOUND) */
|
|
135
135
|
agentProxyError?: string
|
|
136
|
-
/**
|
|
137
|
-
* 智能体工具调用时间线:流式阶段由前端维护;落库后来自 `extra_data.ai_reply.tool_steps`。
|
|
138
|
-
*/
|
|
139
|
-
agentToolTimeline?: AgentToolStep[]
|
|
140
136
|
/** `extra_data.reply_to.message_id`:引用的目标消息 */
|
|
141
137
|
replyToMessageId?: string
|
|
142
138
|
/** 由列表层按 {@link replyToMessageId} 从同会话消息解析,仅展示用 */
|
|
@@ -57,6 +57,7 @@ export type ImPropBinding =
|
|
|
57
57
|
* 渲染器 type 白名单(与 vue-ui 注册表一致):
|
|
58
58
|
* - im.text → content
|
|
59
59
|
* - im.markdown → content(Markdown 源文本,由 CwMarkdown 渲染)
|
|
60
|
+
* - im.agent_tool → id, name, status, argsPreview?, resultPreview?, error?, startedAt?, endedAt?
|
|
60
61
|
* - im.image → thumbnailUrl, width?, height?
|
|
61
62
|
* - im.video → videoUrl, thumbnailUrl?, width?, height?
|
|
62
63
|
* - im.file → downloadUrl, originalFileName?, fileSizeBytes?
|