@blueking/chat-x 0.0.45-beta.8 → 0.0.46-beta.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.
@@ -29,11 +29,15 @@ ToolApprovalCard
29
29
  ├── 标题栏:左侧色条 + 单据标题 + 复制图标 + 状态徽章(评审中/已通过/已拒绝/已撤销等)
30
30
  ├── 字段区:单据编号、提交时间
31
31
  ├── 处理人:当前处理人(overflow-tips 省略)
32
- └── 操作区:查看单据详情(新窗口打开 url)、取消审批(仅 pending / draft 且非 readonly
32
+ └── 操作区:查看单据详情(新窗口打开 url)、取消审批(仅 pending / draft 且非 readonly;点击后 loading 防重复提交;分享只读渲染下禁用)
33
33
  ```
34
34
 
35
35
  `readonly` 为 `true` 时用于 `outcome.success` 结果回显:隐藏「取消审批」按钮,不接受审批取消交互。通常由 [InterruptMessageRender](/components/agent/interrupt-message) 内部传入,业务侧无需手动设置。
36
36
 
37
+ 分享只读渲染模式(注入的 `RenderMode.Share`)下,「取消审批」按钮**保持可见但禁用**(区别于 `readonly` 的直接隐藏),避免在分享回显场景误触发取消。该渲染模式由 [ChatContainer](/components/setup/chat-container) 等容器通过 `useRenderModeProvider` 注入,组件内部经 `useRenderModeInject` 读取,业务侧无需手动设置。
38
+
39
+ 取消审批为同步 `onInterruptResume`,组件无法在回调内获知请求结果。点击后「取消审批」按钮立即进入 loading 并忽略重复点击;待后台刷新使卡片卸载/重建后状态随实例销毁。
40
+
37
41
  状态徽章样式:
38
42
 
39
43
  | `ticket.status` | 视觉 |
@@ -29,6 +29,7 @@
29
29
  - **自定义作答形态**:通过 `#question` slot 可替换默认选择题,渲染任意表单;作答有效时调用 `setAnswer` 回传 `UserQuestionAnswerItem`,无效时传 `undefined`。
30
30
  - **完成校验**:所有题目均已作答(`setAnswer` 收到有效答案)后才允许点击「完成」。
31
31
  - **跳过**:点击「跳过」返回 `status: 'cancelled'` 与空 `answers`。
32
+ - **提交 loading**:完成/跳过为同步 `onResume`,组件无法在回调内获知请求结果。点击后当前按钮进入 loading、另一按钮禁用,并忽略重复点击;待后台刷新使 `UserQuestionCard` 卸载后状态随实例销毁。
32
33
  - **输入框发送**:存在待回答 UserQuestion 时,用户也可在 `ChatInput` 直接发送;`ChatContainer` 会调用 `onSendMessage` 并在第三参数附带与「跳过」等价的 skip `payload` 及 `interrupt`,输入框内容不会自动清空。
33
34
 
34
35
  ## 数据协议
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "2.0.0",
3
- "generatedAt": "2026-06-26T01:27:16.203Z",
3
+ "generatedAt": "2026-06-26T09:41:20.418Z",
4
4
  "domains": {
5
5
  "setup": {
6
6
  "label": "对话搭建",
package/dist/mcp/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,8 +1,26 @@
1
1
  {
2
2
  "name": "@blueking/chat-x",
3
- "version": "0.0.45-beta.8",
3
+ "version": "0.0.46-beta.1",
4
4
  "description": "蓝鲸智云 AI Chat 组件库 —— 遵循 AG-UI,为 AI Agent 和人类开发者共同设计的对话 UI 组件库。",
5
5
  "main": "index.js",
6
+ "scripts": {
7
+ "prepublishOnly": "vite --config vite.config.ts build && pnpm dts && pnpm mcp:build",
8
+ "dev": "vite --config vite.config.ts",
9
+ "dts": "vue-tsc --project tsconfig.dts.json",
10
+ "build": "vitest && vite --config vite.config.ts build && pnpm dts",
11
+ "preview": "vite --config vite.config.ts build --mode preview && pnpm dts",
12
+ "lint:script": "eslint . --ext .vue,.ts --fix",
13
+ "lint:style": "stylelint \"**/*.{scss,css,vue}\" --fix",
14
+ "lint:all": "pnpm lint:script && pnpm lint:style",
15
+ "test": "vitest",
16
+ "test:coverage": "vitest run --coverage",
17
+ "wiki:dev": "vitepress dev wikis",
18
+ "wiki:build": "vitepress build wikis",
19
+ "mcp:build:index": "tsx mcp/scripts/build-index.ts",
20
+ "mcp:build": "tsc -p mcp/tsconfig.json && pnpm mcp:build:index",
21
+ "mcp:start": "node dist/mcp/index.js",
22
+ "mcp:dev": "tsx mcp/src/index.ts"
23
+ },
6
24
  "bin": {
7
25
  "chat-x-mcp": "dist/mcp/index.js"
8
26
  },
@@ -50,6 +68,7 @@
50
68
  "zod": "^4.3.6"
51
69
  },
52
70
  "devDependencies": {
71
+ "@blueking/chat-helper": "workspace:*",
53
72
  "@types/katex": "^0.16.7",
54
73
  "@types/lodash": "^4.17.23",
55
74
  "@types/markdown-it": "^14.1.2",
@@ -78,24 +97,6 @@
78
97
  "vite-bundle-analyzer": "^1.3.2",
79
98
  "vitepress": "2.0.0-alpha.16",
80
99
  "vitest": "^4.0.18",
81
- "vue-tsc": "^3.1.4",
82
- "@blueking/chat-helper": "0.0.10-dev.1"
83
- },
84
- "scripts": {
85
- "dev": "vite --config vite.config.ts",
86
- "dts": "vue-tsc --project tsconfig.dts.json",
87
- "build": "vitest && vite --config vite.config.ts build && pnpm dts",
88
- "preview": "vite --config vite.config.ts build --mode preview && pnpm dts",
89
- "lint:script": "eslint . --ext .vue,.ts --fix",
90
- "lint:style": "stylelint \"**/*.{scss,css,vue}\" --fix",
91
- "lint:all": "pnpm lint:script && pnpm lint:style",
92
- "test": "vitest",
93
- "test:coverage": "vitest run --coverage",
94
- "wiki:dev": "vitepress dev wikis",
95
- "wiki:build": "vitepress build wikis",
96
- "mcp:build:index": "tsx mcp/scripts/build-index.ts",
97
- "mcp:build": "tsc -p mcp/tsconfig.json && pnpm mcp:build:index",
98
- "mcp:start": "node dist/mcp/index.js",
99
- "mcp:dev": "tsx mcp/src/index.ts"
100
+ "vue-tsc": "^3.1.4"
100
101
  }
101
102
  }