@next-bricks/ai-portal 0.70.0 → 0.70.2
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/bricks.json +42 -42
- package/dist/chunks/7202.a893b0e6.js.map +1 -1
- package/dist/chunks/action-buttons.68666920.js.map +1 -1
- package/dist/chunks/activity-timeline.96e7aaea.js.map +1 -1
- package/dist/chunks/ai-agents.cffd08a0.js.map +1 -1
- package/dist/chunks/ai-employees.267c3626.js.map +1 -1
- package/dist/chunks/blank-state.648eea95.js.map +1 -1
- package/dist/chunks/chat-input.444c80bb.js.map +1 -1
- package/dist/chunks/chat-panel-welcome.2f7c6c8b.js.map +1 -1
- package/dist/chunks/chat-panel.3160f2e8.js.map +1 -1
- package/dist/chunks/chat-stream.393c8241.js.map +1 -1
- package/dist/chunks/cruise-canvas.bfae3138.js.map +1 -1
- package/dist/chunks/dropdown-select.336442ba.js.map +1 -1
- package/dist/chunks/elevo-card.49b42ed0.js.map +1 -1
- package/dist/chunks/elevo-logo.25e3b889.js.map +1 -1
- package/dist/chunks/elevo-sidebar.a197a77f.js.map +1 -1
- package/dist/chunks/flow-tabs.ee1290c2.js.map +1 -1
- package/dist/chunks/goal-card-list.74ab5767.js.map +1 -1
- package/dist/chunks/home-container.f1829834.js.map +1 -1
- package/dist/chunks/icon-button.545ffb24.js.map +1 -1
- package/dist/chunks/mcp-tools.f132c502.js.map +1 -1
- package/dist/chunks/notice-dropdown.63cb2415.js.map +1 -1
- package/dist/chunks/page-container.2185f2e0.js.map +1 -1
- package/dist/chunks/preview-container.a0ca6e2f.js.map +1 -1
- package/dist/chunks/project-knowledges.51731410.js.map +1 -1
- package/dist/chunks/running-flow.37a428cf.js.map +1 -1
- package/dist/chunks/show-case.44e995fc.js.map +1 -1
- package/dist/chunks/show-cases.c3921ea0.js.map +1 -1
- package/dist/chunks/space-chat-guide.84f4a1e7.js.map +1 -1
- package/dist/chunks/space-logo.994f7a25.js.map +1 -1
- package/dist/chunks/space-workbench.8c064898.js.map +1 -1
- package/dist/chunks/stage-flow.9b6fad93.js.map +1 -1
- package/dist/chunks/stat-with-mini-chart.1509cf8c.js.map +1 -1
- package/dist/chunks/sticky-container.d3f7054e.js.map +1 -1
- package/dist/chunks/tab-list.ee97567f.js.map +1 -1
- package/dist/examples.json +52 -40
- package/dist/{index.8e0adc27.js → index.94998c36.js} +2 -2
- package/dist/{index.8e0adc27.js.map → index.94998c36.js.map} +1 -1
- package/dist/manifest.json +594 -313
- package/dist/types.json +796 -796
- package/dist-types/action-buttons/index.d.ts +10 -1
- package/dist-types/activity-timeline/index.d.ts +10 -1
- package/dist-types/ai-agents/index.d.ts +10 -1
- package/dist-types/ai-employees/index.d.ts +16 -1
- package/dist-types/blank-state/index.d.ts +10 -1
- package/dist-types/chat-input/index.d.ts +37 -1
- package/dist-types/chat-panel/index.d.ts +45 -3
- package/dist-types/chat-stream/index.d.ts +62 -1
- package/dist-types/cruise-canvas/index.d.ts +71 -1
- package/dist-types/dropdown-select/index.d.ts +3 -1
- package/dist-types/elevo-card/index.d.ts +5 -1
- package/dist-types/elevo-logo/index.d.ts +3 -1
- package/dist-types/elevo-sidebar/index.d.ts +19 -2
- package/dist-types/flow-tabs/index.d.ts +5 -1
- package/dist-types/gantt-chart/index.d.ts +3 -1
- package/dist-types/goal-card-list/index.d.ts +8 -1
- package/dist-types/home-container/index.d.ts +4 -1
- package/dist-types/icon-button/index.d.ts +4 -1
- package/dist-types/mcp-tools/index.d.ts +3 -1
- package/dist-types/page-container/index.d.ts +7 -0
- package/dist-types/preview-container/index.d.ts +4 -0
- package/dist-types/project-knowledges/index.d.ts +5 -0
- package/dist-types/running-flow/index.d.ts +3 -0
- package/dist-types/show-case/index.d.ts +5 -0
- package/dist-types/show-cases/index.d.ts +4 -0
- package/dist-types/space-workbench/chat-panel-welcome/index.d.ts +3 -0
- package/dist-types/space-workbench/index.d.ts +7 -0
- package/dist-types/space-workbench/space-chat-guide/index.d.ts +3 -0
- package/dist-types/space-workbench/space-logo/index.d.ts +1 -0
- package/dist-types/stage-flow/index.d.ts +21 -0
- package/dist-types/stat-with-mini-chart/index.d.ts +10 -0
- package/dist-types/sticky-container/index.d.ts +3 -0
- package/dist-types/tab-list/index.d.ts +4 -0
- package/docs/action-buttons.md +59 -10
- package/docs/action-buttons.react.md +80 -0
- package/docs/activity-timeline.md +51 -7
- package/docs/activity-timeline.react.md +109 -0
- package/docs/ai-agents.md +62 -2
- package/docs/ai-agents.react.md +73 -0
- package/docs/ai-employees.md +76 -2
- package/docs/ai-employees.react.md +106 -0
- package/docs/blank-state.md +62 -2
- package/docs/blank-state.react.md +77 -0
- package/docs/chat-box.md +134 -52
- package/docs/chat-box.react.md +142 -0
- package/docs/chat-input.md +117 -1
- package/docs/chat-input.react.md +117 -0
- package/docs/chat-panel-welcome.md +39 -0
- package/docs/chat-panel-welcome.react.md +41 -0
- package/docs/chat-panel.md +86 -3
- package/docs/chat-panel.react.md +109 -0
- package/docs/chat-stream.md +149 -2
- package/docs/chat-stream.react.md +155 -0
- package/docs/cruise-canvas.md +159 -0
- package/docs/cruise-canvas.react.md +159 -0
- package/docs/dropdown-select.md +37 -8
- package/docs/dropdown-select.react.md +144 -0
- package/docs/elevo-card.md +75 -1
- package/docs/elevo-card.react.md +104 -0
- package/docs/elevo-logo.md +13 -1
- package/docs/elevo-logo.react.md +27 -0
- package/docs/elevo-sidebar.md +150 -1
- package/docs/elevo-sidebar.react.md +149 -0
- package/docs/flow-tabs.md +97 -2
- package/docs/flow-tabs.react.md +102 -0
- package/docs/gantt-chart.md +101 -0
- package/docs/gantt-chart.react.md +125 -0
- package/docs/goal-card-list.md +149 -13
- package/docs/goal-card-list.react.md +185 -0
- package/docs/home-container.md +48 -2
- package/docs/home-container.react.md +51 -0
- package/docs/icon-button.md +128 -2
- package/docs/icon-button.react.md +120 -0
- package/docs/mcp-tools.md +105 -2
- package/docs/mcp-tools.react.md +117 -0
- package/docs/notice-dropdown.md +53 -10
- package/docs/notice-dropdown.react.md +167 -0
- package/docs/notice-list.md +53 -5
- package/docs/notice-list.react.md +121 -0
- package/docs/page-container.md +80 -3
- package/docs/page-container.react.md +83 -0
- package/docs/preview-container.md +22 -32
- package/docs/preview-container.react.md +71 -0
- package/docs/project-conversations.md +85 -4
- package/docs/project-conversations.react.md +110 -0
- package/docs/project-knowledges.md +73 -8
- package/docs/project-knowledges.react.md +85 -0
- package/docs/running-flow.md +57 -2
- package/docs/running-flow.react.md +90 -0
- package/docs/show-case.md +48 -3
- package/docs/show-case.react.md +60 -0
- package/docs/show-cases.md +52 -2
- package/docs/show-cases.react.md +92 -0
- package/docs/space-chat-guide.md +32 -0
- package/docs/space-chat-guide.react.md +39 -0
- package/docs/space-logo.md +53 -0
- package/docs/space-logo.react.md +46 -0
- package/docs/space-workbench.md +45 -2
- package/docs/space-workbench.react.md +102 -0
- package/docs/stage-flow.md +122 -26
- package/docs/stage-flow.react.md +112 -0
- package/docs/stat-with-mini-chart.md +64 -159
- package/docs/stat-with-mini-chart.react.md +113 -0
- package/docs/sticky-container.md +56 -3
- package/docs/sticky-container.react.md +60 -0
- package/docs/tab-list.md +74 -3
- package/docs/tab-list.react.md +73 -0
- package/package.json +2 -2
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
tagName: ai-portal.ai-agents
|
|
3
|
+
displayName: WrappedAiPortalAiAgents
|
|
4
|
+
description: AI Agents 卡片列表,展示可用的 AI 智能体,支持点击跳转到对应详情页。
|
|
5
|
+
category: ai-portal
|
|
6
|
+
source: "@next-bricks/ai-portal"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# WrappedAiPortalAiAgents
|
|
10
|
+
|
|
11
|
+
> AI Agents 卡片列表,展示可用的 AI 智能体,支持点击跳转到对应详情页。
|
|
12
|
+
|
|
13
|
+
## 导入
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { WrappedAiPortalAiAgents } from "@easyops/wrapped-components";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
22
|
+
| ----------- | ---------------------- | ---- | ------ | ------------------------------------------------------------- |
|
|
23
|
+
| list | `Agent[] \| undefined` | 否 | - | AI Agent 列表数据 |
|
|
24
|
+
| urlTemplate | `string \| undefined` | 否 | - | 跳转到 Agent 详情页的 URL 模板,支持 {name} 等 Agent 字段插值 |
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic
|
|
29
|
+
|
|
30
|
+
展示 AI Agents 卡片列表的基本用法。
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
<WrappedAiPortalAiAgents
|
|
34
|
+
list={[
|
|
35
|
+
{
|
|
36
|
+
name: "运维专家",
|
|
37
|
+
description: "擅长处理服务器运维、故障排查和性能优化等问题。",
|
|
38
|
+
icon: { lib: "antd", icon: "tool" },
|
|
39
|
+
tags: ["运维", "故障排查"],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "数据分析师",
|
|
43
|
+
description: "专注于数据处理、报表生成和趋势分析。",
|
|
44
|
+
icon: { lib: "antd", icon: "bar-chart" },
|
|
45
|
+
tags: ["数据", "分析"],
|
|
46
|
+
},
|
|
47
|
+
]}
|
|
48
|
+
/>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### With URL Template
|
|
52
|
+
|
|
53
|
+
配置 urlTemplate 属性,使每个 Agent 卡片点击后跳转到对应详情页。
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
<WrappedAiPortalAiAgents
|
|
57
|
+
urlTemplate="/agents/{name}"
|
|
58
|
+
list={[
|
|
59
|
+
{
|
|
60
|
+
name: "运维专家",
|
|
61
|
+
description: "擅长处理服务器运维、故障排查和性能优化等问题。",
|
|
62
|
+
icon: { lib: "antd", icon: "tool" },
|
|
63
|
+
tags: ["运维"],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "数据分析师",
|
|
67
|
+
description: "专注于数据处理、报表生成和趋势分析。",
|
|
68
|
+
icon: { lib: "antd", icon: "bar-chart" },
|
|
69
|
+
tags: ["数据"],
|
|
70
|
+
},
|
|
71
|
+
]}
|
|
72
|
+
/>
|
|
73
|
+
```
|
package/docs/ai-employees.md
CHANGED
|
@@ -1,11 +1,85 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
tagName: ai-portal.ai-employees
|
|
3
|
+
displayName: WrappedAiPortalAiEmployees
|
|
4
|
+
description: AI 数字人卡片列表,按行业和角色分组展示,支持 Tab 切换行业和点击跳转。
|
|
5
|
+
category: ai-portal
|
|
6
|
+
source: "@next-bricks/ai-portal"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# ai-portal.ai-employees
|
|
10
|
+
|
|
11
|
+
> AI 数字人卡片列表,按行业和角色分组展示,支持 Tab 切换行业和点击跳转。
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
16
|
+
| ----------- | ------------------------- | ---- | ------ | ----------------------------------------------------------------------- |
|
|
17
|
+
| list | `Employee[] \| undefined` | 否 | - | 数字人列表数据 |
|
|
18
|
+
| industries | `string[] \| undefined` | 否 | - | 行业列表,用于指定 Tab 的顺序,未在此列表中的行业将按出现顺序附加在末尾 |
|
|
19
|
+
| urlTemplate | `string \| undefined` | 否 | - | 跳转到数字人详情页的 URL 模板,支持 {name} 等数字人字段插值 |
|
|
20
|
+
| stickyTop | `number \| undefined` | 否 | - | 行业 Tab 栏吸顶时距顶部的距离(px),不设置则不吸顶 |
|
|
2
21
|
|
|
3
22
|
## Examples
|
|
4
23
|
|
|
5
24
|
### Basic
|
|
6
25
|
|
|
26
|
+
展示 AI 数字人卡片列表,按行业 Tab 分组浏览。
|
|
27
|
+
|
|
28
|
+
```yaml preview
|
|
29
|
+
brick: ai-portal.ai-employees
|
|
30
|
+
properties:
|
|
31
|
+
list:
|
|
32
|
+
- name: 运维工程师小李
|
|
33
|
+
industry: IT
|
|
34
|
+
role: 运维专家
|
|
35
|
+
description: 专注于服务器运维和故障处理。
|
|
36
|
+
- name: 开发工程师小王
|
|
37
|
+
industry: IT
|
|
38
|
+
role: 开发专家
|
|
39
|
+
description: 擅长全栈开发和架构设计。
|
|
40
|
+
- name: 数据分析师小张
|
|
41
|
+
industry: 金融
|
|
42
|
+
role: 数据分析
|
|
43
|
+
description: 专注于金融数据分析和风险评估。
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### With URL Template
|
|
47
|
+
|
|
48
|
+
配置 urlTemplate 属性,使每个数字人卡片点击后跳转到对应详情页。
|
|
49
|
+
|
|
50
|
+
```yaml preview
|
|
51
|
+
brick: ai-portal.ai-employees
|
|
52
|
+
properties:
|
|
53
|
+
urlTemplate: /employees/{name}
|
|
54
|
+
list:
|
|
55
|
+
- name: 运维工程师小李
|
|
56
|
+
industry: IT
|
|
57
|
+
role: 运维专家
|
|
58
|
+
description: 专注于服务器运维和故障处理。
|
|
59
|
+
- name: 开发工程师小王
|
|
60
|
+
industry: IT
|
|
61
|
+
role: 开发专家
|
|
62
|
+
description: 擅长全栈开发和架构设计。
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### With Industries and Sticky Tab
|
|
66
|
+
|
|
67
|
+
配置 industries 和 stickyTop 属性,控制行业 Tab 顺序及吸顶效果。
|
|
68
|
+
|
|
7
69
|
```yaml preview
|
|
8
70
|
brick: ai-portal.ai-employees
|
|
9
71
|
properties:
|
|
10
|
-
|
|
72
|
+
industries:
|
|
73
|
+
- 金融
|
|
74
|
+
- IT
|
|
75
|
+
stickyTop: 0
|
|
76
|
+
list:
|
|
77
|
+
- name: 数据分析师小张
|
|
78
|
+
industry: 金融
|
|
79
|
+
role: 数据分析
|
|
80
|
+
description: 专注于金融数据分析和风险评估。
|
|
81
|
+
- name: 运维工程师小李
|
|
82
|
+
industry: IT
|
|
83
|
+
role: 运维专家
|
|
84
|
+
description: 专注于服务器运维和故障处理。
|
|
11
85
|
```
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
tagName: ai-portal.ai-employees
|
|
3
|
+
displayName: WrappedAiPortalAiEmployees
|
|
4
|
+
description: AI 数字人卡片列表,按行业和角色分组展示,支持 Tab 切换行业和点击跳转。
|
|
5
|
+
category: ai-portal
|
|
6
|
+
source: "@next-bricks/ai-portal"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# WrappedAiPortalAiEmployees
|
|
10
|
+
|
|
11
|
+
> AI 数字人卡片列表,按行业和角色分组展示,支持 Tab 切换行业和点击跳转。
|
|
12
|
+
|
|
13
|
+
## 导入
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { WrappedAiPortalAiEmployees } from "@easyops/wrapped-components";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
22
|
+
| ----------- | ------------------------- | ---- | ------ | ----------------------------------------------------------------------- |
|
|
23
|
+
| list | `Employee[] \| undefined` | 否 | - | 数字人列表数据 |
|
|
24
|
+
| industries | `string[] \| undefined` | 否 | - | 行业列表,用于指定 Tab 的顺序,未在此列表中的行业将按出现顺序附加在末尾 |
|
|
25
|
+
| urlTemplate | `string \| undefined` | 否 | - | 跳转到数字人详情页的 URL 模板,支持 {name} 等数字人字段插值 |
|
|
26
|
+
| stickyTop | `number \| undefined` | 否 | - | 行业 Tab 栏吸顶时距顶部的距离(px),不设置则不吸顶 |
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
### Basic
|
|
31
|
+
|
|
32
|
+
展示 AI 数字人卡片列表,按行业 Tab 分组浏览。
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
<WrappedAiPortalAiEmployees
|
|
36
|
+
list={[
|
|
37
|
+
{
|
|
38
|
+
name: "运维工程师小李",
|
|
39
|
+
industry: "IT",
|
|
40
|
+
role: "运维专家",
|
|
41
|
+
description: "专注于服务器运维和故障处理。",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "开发工程师小王",
|
|
45
|
+
industry: "IT",
|
|
46
|
+
role: "开发专家",
|
|
47
|
+
description: "擅长全栈开发和架构设计。",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "数据分析师小张",
|
|
51
|
+
industry: "金融",
|
|
52
|
+
role: "数据分析",
|
|
53
|
+
description: "专注于金融数据分析和风险评估。",
|
|
54
|
+
},
|
|
55
|
+
]}
|
|
56
|
+
/>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### With URL Template
|
|
60
|
+
|
|
61
|
+
配置 urlTemplate 属性,使每个数字人卡片点击后跳转到对应详情页。
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
<WrappedAiPortalAiEmployees
|
|
65
|
+
urlTemplate="/employees/{name}"
|
|
66
|
+
list={[
|
|
67
|
+
{
|
|
68
|
+
name: "运维工程师小李",
|
|
69
|
+
industry: "IT",
|
|
70
|
+
role: "运维专家",
|
|
71
|
+
description: "专注于服务器运维和故障处理。",
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "开发工程师小王",
|
|
75
|
+
industry: "IT",
|
|
76
|
+
role: "开发专家",
|
|
77
|
+
description: "擅长全栈开发和架构设计。",
|
|
78
|
+
},
|
|
79
|
+
]}
|
|
80
|
+
/>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### With Industries and Sticky Tab
|
|
84
|
+
|
|
85
|
+
配置 industries 和 stickyTop 属性,控制行业 Tab 顺序及吸顶效果。
|
|
86
|
+
|
|
87
|
+
```tsx
|
|
88
|
+
<WrappedAiPortalAiEmployees
|
|
89
|
+
industries={["金融", "IT"]}
|
|
90
|
+
stickyTop={0}
|
|
91
|
+
list={[
|
|
92
|
+
{
|
|
93
|
+
name: "数据分析师小张",
|
|
94
|
+
industry: "金融",
|
|
95
|
+
role: "数据分析",
|
|
96
|
+
description: "专注于金融数据分析和风险评估。",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "运维工程师小李",
|
|
100
|
+
industry: "IT",
|
|
101
|
+
role: "运维专家",
|
|
102
|
+
description: "专注于服务器运维和故障处理。",
|
|
103
|
+
},
|
|
104
|
+
]}
|
|
105
|
+
/>
|
|
106
|
+
```
|
package/docs/blank-state.md
CHANGED
|
@@ -1,12 +1,72 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
tagName: ai-portal.blank-state
|
|
3
|
+
displayName: WrappedAiPortalBlankState
|
|
4
|
+
description: 空状态展示组件,提供预置插画和描述文字,并支持通过默认插槽插入自定义内容。
|
|
5
|
+
category: ai-portal
|
|
6
|
+
source: "@next-bricks/ai-portal"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# ai-portal.blank-state
|
|
10
|
+
|
|
11
|
+
> 空状态展示组件,提供预置插画和描述文字,并支持通过默认插槽插入自定义内容。
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
16
|
+
| ------------ | ------------------------------------- | ---- | ------ | ------------------------------------------------------------------------------------------------------ |
|
|
17
|
+
| illustration | `BlankStateIllustration \| undefined` | 否 | - | 插画类型,可选 "goals"、"activities"、"collaboration-spaces"、"serviceflows",默认使用 activities 插画 |
|
|
18
|
+
| description | `string \| undefined` | 否 | - | 描述文字 |
|
|
19
|
+
|
|
20
|
+
## Slots
|
|
21
|
+
|
|
22
|
+
| 名称 | 说明 |
|
|
23
|
+
| --------- | ---------------------------------------------- |
|
|
24
|
+
| (default) | 默认插槽,用于插入自定义内容(如按钮等操作项) |
|
|
2
25
|
|
|
3
26
|
## Examples
|
|
4
27
|
|
|
5
28
|
### Basic
|
|
6
29
|
|
|
30
|
+
展示空状态组件的基本用法,使用 goals 插画和描述文字。
|
|
31
|
+
|
|
32
|
+
```yaml preview
|
|
33
|
+
brick: ai-portal.blank-state
|
|
34
|
+
properties:
|
|
35
|
+
illustration: goals
|
|
36
|
+
description: 暂无目标,快来创建第一个吧
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Different Illustrations
|
|
40
|
+
|
|
41
|
+
展示不同插画类型的空状态效果。
|
|
42
|
+
|
|
43
|
+
```yaml preview
|
|
44
|
+
- brick: ai-portal.blank-state
|
|
45
|
+
properties:
|
|
46
|
+
illustration: activities
|
|
47
|
+
description: 暂无活动记录
|
|
48
|
+
- brick: ai-portal.blank-state
|
|
49
|
+
properties:
|
|
50
|
+
illustration: collaboration-spaces
|
|
51
|
+
description: 暂无协作空间
|
|
52
|
+
- brick: ai-portal.blank-state
|
|
53
|
+
properties:
|
|
54
|
+
illustration: serviceflows
|
|
55
|
+
description: 暂无服务流
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### With Slot Content
|
|
59
|
+
|
|
60
|
+
通过默认插槽插入操作按钮。
|
|
61
|
+
|
|
7
62
|
```yaml preview
|
|
8
63
|
brick: ai-portal.blank-state
|
|
9
64
|
properties:
|
|
10
65
|
illustration: goals
|
|
11
|
-
description:
|
|
66
|
+
description: 暂无目标,快来创建第一个吧
|
|
67
|
+
children:
|
|
68
|
+
- brick: eo-button
|
|
69
|
+
properties:
|
|
70
|
+
type: primary
|
|
71
|
+
textContent: 创建目标
|
|
12
72
|
```
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
tagName: ai-portal.blank-state
|
|
3
|
+
displayName: WrappedAiPortalBlankState
|
|
4
|
+
description: 空状态展示组件,提供预置插画和描述文字,并支持通过默认插槽插入自定义内容。
|
|
5
|
+
category: ai-portal
|
|
6
|
+
source: "@next-bricks/ai-portal"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# WrappedAiPortalBlankState
|
|
10
|
+
|
|
11
|
+
> 空状态展示组件,提供预置插画和描述文字,并支持通过默认插槽插入自定义内容。
|
|
12
|
+
|
|
13
|
+
## 导入
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { WrappedAiPortalBlankState } from "@easyops/wrapped-components";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
22
|
+
| ------------ | ------------------------------------- | ---- | ------ | ------------------------------------------------------------------------------------------------------ |
|
|
23
|
+
| illustration | `BlankStateIllustration \| undefined` | 否 | - | 插画类型,可选 "goals"、"activities"、"collaboration-spaces"、"serviceflows",默认使用 activities 插画 |
|
|
24
|
+
| description | `string \| undefined` | 否 | - | 描述文字 |
|
|
25
|
+
|
|
26
|
+
## Slots
|
|
27
|
+
|
|
28
|
+
| 名称 | 说明 |
|
|
29
|
+
| --------- | ---------------------------------------------- |
|
|
30
|
+
| (default) | 默认插槽,用于插入自定义内容(如按钮等操作项) |
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
|
|
34
|
+
### Basic
|
|
35
|
+
|
|
36
|
+
展示空状态组件的基本用法,使用 goals 插画和描述文字。
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
<WrappedAiPortalBlankState
|
|
40
|
+
illustration="goals"
|
|
41
|
+
description="暂无目标,快来创建第一个吧"
|
|
42
|
+
/>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Different Illustrations
|
|
46
|
+
|
|
47
|
+
展示不同插画类型的空状态效果。
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
<>
|
|
51
|
+
<WrappedAiPortalBlankState
|
|
52
|
+
illustration="activities"
|
|
53
|
+
description="暂无活动记录"
|
|
54
|
+
/>
|
|
55
|
+
<WrappedAiPortalBlankState
|
|
56
|
+
illustration="collaboration-spaces"
|
|
57
|
+
description="暂无协作空间"
|
|
58
|
+
/>
|
|
59
|
+
<WrappedAiPortalBlankState
|
|
60
|
+
illustration="serviceflows"
|
|
61
|
+
description="暂无服务流"
|
|
62
|
+
/>
|
|
63
|
+
</>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### With Slot Content
|
|
67
|
+
|
|
68
|
+
通过默认插槽插入操作按钮。
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
<WrappedAiPortalBlankState
|
|
72
|
+
illustration="goals"
|
|
73
|
+
description="暂无目标,快来创建第一个吧"
|
|
74
|
+
>
|
|
75
|
+
<WrappedEoButton type="primary">创建目标</WrappedEoButton>
|
|
76
|
+
</WrappedAiPortalBlankState>
|
|
77
|
+
```
|
package/docs/chat-box.md
CHANGED
|
@@ -1,67 +1,149 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
tagName: ai-portal.chat-box
|
|
3
|
+
displayName: WrappedAiPortalChatBox
|
|
4
|
+
description: 大型聊天输入框,用于首页,支持命令联想、@提及数字人、文件上传等功能。
|
|
5
|
+
category: ai-portal
|
|
6
|
+
source: "@next-bricks/ai-portal"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# ai-portal.chat-box
|
|
10
|
+
|
|
11
|
+
> 大型聊天输入框,用于首页,支持命令联想、@提及数字人、文件上传等功能。
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
16
|
+
| ------------- | ---------------------------- | ---- | ------ | ----------------------------------- |
|
|
17
|
+
| disabled | `boolean \| undefined` | 否 | - | 是否禁用输入框 |
|
|
18
|
+
| placeholder | `string \| undefined` | 否 | - | 输入框占位文字 |
|
|
19
|
+
| autoFocus | `boolean \| undefined` | 否 | - | 是否自动聚焦 |
|
|
20
|
+
| aiEmployees | `AIEmployee[] \| undefined` | 否 | - | 可 @ 提及的数字人列表 |
|
|
21
|
+
| commands | `Command[] \| undefined` | 否 | - | 命令列表,支持通过 / 或搜索触发联想 |
|
|
22
|
+
| uploadOptions | `UploadOptions \| undefined` | 否 | - | 文件上传配置 |
|
|
23
|
+
|
|
24
|
+
## Events
|
|
25
|
+
|
|
26
|
+
| 事件 | detail | 说明 |
|
|
27
|
+
| -------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
|
|
28
|
+
| message.submit | `string` — 用户输入的消息文本内容 | 用户提交消息时触发(已废弃,请使用 chat.submit 事件) |
|
|
29
|
+
| chat.submit | `ChatPayload` — { content: 消息内容, files: 上传的文件列表, cmd: 命令载荷, aiEmployeeId: @提及的数字人 ID } | 用户提交聊天消息时触发 |
|
|
30
|
+
|
|
31
|
+
## Methods
|
|
32
|
+
|
|
33
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
34
|
+
| ------------ | ------------------------- | ------ | ------------------ |
|
|
35
|
+
| setValue | `(value: string) => void` | `void` | 设置输入框的值 |
|
|
36
|
+
| getValue | `() => void` | `void` | 获取输入框当前的值 |
|
|
37
|
+
| focusOnInput | `() => void` | `void` | 使输入框获得焦点 |
|
|
38
|
+
|
|
39
|
+
## Slots
|
|
40
|
+
|
|
41
|
+
| 名称 | 说明 |
|
|
42
|
+
| ------- | -------------------------------------------- |
|
|
43
|
+
| actions | 操作栏左侧插槽,用于放置动作按钮等自定义内容 |
|
|
2
44
|
|
|
3
45
|
## Examples
|
|
4
46
|
|
|
5
47
|
### Basic
|
|
6
48
|
|
|
49
|
+
展示大型聊天输入框的基本用法,配置占位文字和提交事件监听。
|
|
50
|
+
|
|
7
51
|
```yaml preview
|
|
8
52
|
brick: ai-portal.chat-box
|
|
9
53
|
properties:
|
|
10
|
-
|
|
54
|
+
placeholder: 请输入您的问题,按 Enter 发送
|
|
55
|
+
events:
|
|
56
|
+
chat.submit:
|
|
57
|
+
action: console.log
|
|
11
58
|
```
|
|
12
59
|
|
|
13
|
-
### With
|
|
60
|
+
### With Action Buttons
|
|
14
61
|
|
|
15
|
-
|
|
16
|
-
|
|
62
|
+
通过 actions 插槽添加动作按钮,实现深度思考和联网搜索等功能入口。
|
|
63
|
+
|
|
64
|
+
```yaml preview
|
|
65
|
+
brick: ai-portal.chat-box
|
|
17
66
|
properties:
|
|
18
|
-
|
|
19
|
-
width: 100vw
|
|
20
|
-
height: 100vh
|
|
21
|
-
position: fixed
|
|
22
|
-
top: 0
|
|
23
|
-
left: 0
|
|
24
|
-
context:
|
|
25
|
-
- name: task
|
|
67
|
+
placeholder: 请输入您的问题
|
|
26
68
|
children:
|
|
27
|
-
- brick: ai-portal.
|
|
28
|
-
|
|
29
|
-
properties:
|
|
30
|
-
style:
|
|
31
|
-
position: absolute
|
|
32
|
-
width: 500px
|
|
33
|
-
maxWidth: 90vw
|
|
34
|
-
maxHeight: 90vh
|
|
35
|
-
top: 50%
|
|
36
|
-
left: 50%
|
|
37
|
-
transform: translate(-50%, -50%)
|
|
38
|
-
events:
|
|
39
|
-
message.submit:
|
|
40
|
-
useProvider: basic.http-request
|
|
41
|
-
args:
|
|
42
|
-
- "<% `${BASE_URL}/api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/create` %>"
|
|
43
|
-
# - /api/mocks/task/send
|
|
44
|
-
# - "http://localhost:8888/.netlify/functions/task-send"
|
|
45
|
-
# - "https://serverless-mocks.netlify.app/.netlify/functions/task-send"
|
|
46
|
-
- method: POST
|
|
47
|
-
body: |
|
|
48
|
-
<%
|
|
49
|
-
JSON.stringify({
|
|
50
|
-
input: EVENT.detail
|
|
51
|
-
})
|
|
52
|
-
%>
|
|
53
|
-
headers:
|
|
54
|
-
Content-Type: application/json
|
|
55
|
-
callback:
|
|
56
|
-
error:
|
|
57
|
-
action: handleHttpError
|
|
58
|
-
success:
|
|
59
|
-
action: context.replace
|
|
60
|
-
args:
|
|
61
|
-
- task
|
|
62
|
-
- <% EVENT.detail %>
|
|
63
|
-
- brick: ai-portal.cruise-canvas
|
|
64
|
-
if: <%= !!CTX.task %>
|
|
69
|
+
- brick: ai-portal.action-buttons
|
|
70
|
+
slot: actions
|
|
65
71
|
properties:
|
|
66
|
-
|
|
72
|
+
items:
|
|
73
|
+
- key: think
|
|
74
|
+
text: 深度思考
|
|
75
|
+
icon:
|
|
76
|
+
lib: antd
|
|
77
|
+
theme: outlined
|
|
78
|
+
icon: reddit
|
|
79
|
+
- key: networking
|
|
80
|
+
text: 联网搜索
|
|
81
|
+
icon:
|
|
82
|
+
lib: antd
|
|
83
|
+
theme: outlined
|
|
84
|
+
icon: global
|
|
85
|
+
events:
|
|
86
|
+
chat.submit:
|
|
87
|
+
action: console.log
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### With File Upload
|
|
91
|
+
|
|
92
|
+
配置 uploadOptions 属性,启用文件上传功能。
|
|
93
|
+
|
|
94
|
+
```yaml preview
|
|
95
|
+
brick: ai-portal.chat-box
|
|
96
|
+
properties:
|
|
97
|
+
placeholder: 请输入您的问题,或拖入文件
|
|
98
|
+
uploadOptions:
|
|
99
|
+
enabled: true
|
|
100
|
+
accept: image/*,.pdf
|
|
101
|
+
maxFiles: 5
|
|
102
|
+
maxSize: 10485760
|
|
103
|
+
readableAccept: 图片或 PDF
|
|
104
|
+
readableMaxSize: 10MB
|
|
105
|
+
events:
|
|
106
|
+
chat.submit:
|
|
107
|
+
action: console.log
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### With AI Employees
|
|
111
|
+
|
|
112
|
+
配置 aiEmployees 属性,支持在输入时 @ 提及数字人。
|
|
113
|
+
|
|
114
|
+
```yaml preview
|
|
115
|
+
brick: ai-portal.chat-box
|
|
116
|
+
properties:
|
|
117
|
+
placeholder: 输入 @ 可提及数字人
|
|
118
|
+
aiEmployees:
|
|
119
|
+
- employeeId: emp001
|
|
120
|
+
name: 运维工程师小李
|
|
121
|
+
- employeeId: emp002
|
|
122
|
+
name: 数据分析师小张
|
|
123
|
+
events:
|
|
124
|
+
chat.submit:
|
|
125
|
+
action: console.log
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Programmatic Control
|
|
129
|
+
|
|
130
|
+
通过方法调用控制输入框,实现预填内容和焦点管理。
|
|
131
|
+
|
|
132
|
+
```yaml preview
|
|
133
|
+
- brick: eo-button
|
|
134
|
+
properties:
|
|
135
|
+
textContent: 填写示例问题
|
|
136
|
+
events:
|
|
137
|
+
click:
|
|
138
|
+
target: "#chatBox"
|
|
139
|
+
method: setValue
|
|
140
|
+
args:
|
|
141
|
+
- 如何优化服务器性能?
|
|
142
|
+
- brick: ai-portal.chat-box
|
|
143
|
+
properties:
|
|
144
|
+
id: chatBox
|
|
145
|
+
placeholder: 请输入您的问题
|
|
146
|
+
events:
|
|
147
|
+
chat.submit:
|
|
148
|
+
action: console.log
|
|
67
149
|
```
|