@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
|
@@ -20,11 +20,16 @@ export interface ActionClickDetail {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* 构件 `ai-portal.project-knowledges`
|
|
23
|
+
*
|
|
24
|
+
* 项目知识库列表构件,展示项目中的知识条目,支持操作菜单和点击跳转。
|
|
23
25
|
*/
|
|
24
26
|
export declare class ProjectKnowledges extends ReactNextElement implements ProjectKnowledgesProps {
|
|
25
27
|
#private;
|
|
28
|
+
/** 知识列表数据,为 undefined 时显示加载状态 */
|
|
26
29
|
accessor list: Knowledge[] | undefined;
|
|
30
|
+
/** 知识详情链接模板,支持使用知识字段插值 */
|
|
27
31
|
accessor urlTemplate: string | undefined;
|
|
32
|
+
/** 操作菜单配置,每条知识行尾显示可操作的菜单项 */
|
|
28
33
|
accessor actions: ActionType[] | undefined;
|
|
29
34
|
render(): React.JSX.Element;
|
|
30
35
|
}
|
|
@@ -24,9 +24,12 @@ export interface RunningFlowMapEvents {
|
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* 构件 `ai-portal.running-flow`
|
|
27
|
+
*
|
|
28
|
+
* 运行中的流程视图构件,以泳道方式展示各阶段的活动及其运行状态(completed、working、input-required 等)。
|
|
27
29
|
*/
|
|
28
30
|
export declare class RunningFlow extends ReactNextElement implements RunningFlowProps {
|
|
29
31
|
#private;
|
|
32
|
+
/** 流程阶段配置数据,每个阶段包含名称和活动列表 */
|
|
30
33
|
accessor spec: FlowStage[] | undefined;
|
|
31
34
|
render(): React.JSX.Element;
|
|
32
35
|
}
|
|
@@ -8,10 +8,15 @@ export interface ShowCaseProps {
|
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* 构件 `ai-portal.show-case`
|
|
11
|
+
*
|
|
12
|
+
* 案例展示卡片构件,以彩色背景卡片展示单个优秀案例,点击可跳转到案例详情。
|
|
11
13
|
*/
|
|
12
14
|
export declare class ShowCase extends ReactNextElement implements ShowCaseProps {
|
|
15
|
+
/** 案例标题,同时用于计算卡片背景色 */
|
|
13
16
|
accessor caseTitle: string | undefined;
|
|
17
|
+
/** 案例摘要描述 */
|
|
14
18
|
accessor summary: string | undefined;
|
|
19
|
+
/** 点击卡片跳转的目标链接 */
|
|
15
20
|
accessor url: string | undefined;
|
|
16
21
|
render(): React.JSX.Element;
|
|
17
22
|
}
|
|
@@ -8,9 +8,13 @@ export interface ShowCasesProps {
|
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* 构件 `ai-portal.show-cases`
|
|
11
|
+
*
|
|
12
|
+
* 案例列表展示构件,支持按场景分组筛选,展示多个优秀案例卡片。
|
|
11
13
|
*/
|
|
12
14
|
export declare class ShowCases extends ReactNextElement implements ShowCasesProps {
|
|
15
|
+
/** 案例数据列表,每项可包含 scenario 字段用于分组筛选 */
|
|
13
16
|
accessor list: ShowCaseType[] | undefined;
|
|
17
|
+
/** 每个场景分组下最多显示的案例数量 */
|
|
14
18
|
accessor limit: number | undefined;
|
|
15
19
|
render(): React.JSX.Element;
|
|
16
20
|
}
|
|
@@ -6,8 +6,11 @@ export interface ChatPanelWelcomeProps {
|
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* 构件 `ai-portal.chat-panel-welcome`
|
|
9
|
+
*
|
|
10
|
+
* 聊天面板欢迎语构件,展示带有 Elevo 头像的欢迎消息。
|
|
9
11
|
*/
|
|
10
12
|
export declare class ChatPanelWelcome extends ReactNextElement implements ChatPanelWelcomeProps {
|
|
13
|
+
/** 欢迎语文本内容 */
|
|
11
14
|
accessor text: string | undefined;
|
|
12
15
|
render(): React.JSX.Element;
|
|
13
16
|
}
|
|
@@ -14,13 +14,20 @@ export interface SpaceWorkbenchProps {
|
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* 构件 `ai-portal.space-workbench`
|
|
17
|
+
*
|
|
18
|
+
* 协作空间工作台,集成顶部导航、侧边栏(知识库、业务实例)、聊天区域和服务流等核心功能的一体化工作台构件。
|
|
17
19
|
*/
|
|
18
20
|
export declare class SpaceWorkbench extends ReactNextElement implements SpaceWorkbenchProps {
|
|
19
21
|
#private;
|
|
22
|
+
/** 消息通知列表 */
|
|
20
23
|
accessor notices: NoticeItem[] | undefined;
|
|
24
|
+
/** 知识库列表 */
|
|
21
25
|
accessor knowledges: KnowledgeItem[] | undefined;
|
|
26
|
+
/** 空间详情信息,必填 */
|
|
22
27
|
accessor spaceDetail: SpaceDetail;
|
|
28
|
+
/** 消息中心跳转链接,必填 */
|
|
23
29
|
accessor notifyCenterUrl: string;
|
|
30
|
+
/** 文件上传配置选项 */
|
|
24
31
|
accessor uploadOptions: UploadOptions | undefined;
|
|
25
32
|
render(): React.JSX.Element;
|
|
26
33
|
}
|
|
@@ -7,8 +7,11 @@ export interface SpaceChatGuideProps {
|
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* 构件 `ai-portal.space-chat-guide`
|
|
10
|
+
*
|
|
11
|
+
* 空间聊天引导构件,根据空间详情展示引导信息,帮助用户快速开始聊天。
|
|
10
12
|
*/
|
|
11
13
|
export declare class SpaceChatGuide extends ReactNextElement implements SpaceChatGuideProps {
|
|
14
|
+
/** 空间详情信息,必填,用于展示空间相关的引导内容 */
|
|
12
15
|
accessor spaceDetail: SpaceDetail;
|
|
13
16
|
render(): React.JSX.Element;
|
|
14
17
|
}
|
|
@@ -10,6 +10,7 @@ export interface SpaceLogoProps {
|
|
|
10
10
|
* 协作空间的 Logo 展示组件
|
|
11
11
|
*/
|
|
12
12
|
export declare class SpaceLogo extends ReactNextElement implements SpaceLogoProps {
|
|
13
|
+
/** Logo 容器尺寸(px),图标为容器的 87.5%,圆角为容器的 25%,默认 48 */
|
|
13
14
|
accessor size: number | undefined;
|
|
14
15
|
render(): React.JSX.Element;
|
|
15
16
|
}
|
|
@@ -28,14 +28,35 @@ export interface EditActivityDetail {
|
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* 构件 `ai-portal.stage-flow`
|
|
31
|
+
*
|
|
32
|
+
* 阶段流程编辑器构件,支持以泳道方式展示和编辑服务流的阶段与活动。
|
|
31
33
|
*/
|
|
32
34
|
export declare class StageFlow extends ReactNextElement implements StageFlowProps {
|
|
33
35
|
#private;
|
|
36
|
+
/** 阶段流程配置数据,每个阶段包含名称和活动列表 */
|
|
34
37
|
accessor spec: Stage[] | undefined;
|
|
38
|
+
/** AI 员工列表,用于在活动中显示分配的员工名称 */
|
|
35
39
|
accessor aiEmployees: AIEmployee[] | undefined;
|
|
40
|
+
/** 是否为只读模式,只读时不显示编辑、添加、删除操作 */
|
|
36
41
|
accessor readOnly: boolean | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* 向指定阶段添加活动
|
|
44
|
+
* @param stage 目标阶段
|
|
45
|
+
* @param activity 要添加的活动数据
|
|
46
|
+
*/
|
|
37
47
|
addActivity(stage: Stage, activity: FlowActivity): void;
|
|
48
|
+
/**
|
|
49
|
+
* 编辑指定阶段中的某个活动
|
|
50
|
+
* @param stage 目标阶段
|
|
51
|
+
* @param activity 更新后的活动数据
|
|
52
|
+
* @param activityIndex 活动在阶段中的索引
|
|
53
|
+
*/
|
|
38
54
|
editActivity(stage: Stage, activity: FlowActivity, activityIndex: number): void;
|
|
55
|
+
/**
|
|
56
|
+
* 删除指定阶段中的某个活动
|
|
57
|
+
* @param stage 目标阶段
|
|
58
|
+
* @param activityIndex 活动在阶段中的索引
|
|
59
|
+
*/
|
|
39
60
|
deleteActivity(stage: Stage, activityIndex: number): void;
|
|
40
61
|
render(): React.JSX.Element;
|
|
41
62
|
}
|
|
@@ -9,18 +9,25 @@ export interface StatWithMiniChartProps extends Pick<MiniLineChartProps, "data"
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* 构件 `ai-portal.stat-with-mini-chart`
|
|
12
|
+
*
|
|
13
|
+
* 带迷你折线图的统计数据展示构件,在统计数值旁边渲染一个迷你折线图。
|
|
12
14
|
*/
|
|
13
15
|
export declare class StatWithMiniChart extends ReactNextElement implements StatWithMiniChartProps {
|
|
16
|
+
/** 统计指标标签名称 */
|
|
14
17
|
accessor label: string | undefined;
|
|
18
|
+
/** 统计数值文本 */
|
|
15
19
|
accessor value: string | undefined;
|
|
16
20
|
/**
|
|
21
|
+
* 展示尺寸,medium 时图表高度为 92px,small 时为 55px
|
|
17
22
|
* @default "medium"
|
|
18
23
|
*/
|
|
19
24
|
accessor size: "medium" | "small" | undefined;
|
|
20
25
|
/**
|
|
26
|
+
* 折线颜色
|
|
21
27
|
* @default "var(--color-brand)"
|
|
22
28
|
*/
|
|
23
29
|
accessor lineColor: string | undefined;
|
|
30
|
+
/** 是否在折线下方显示渐变填充区域 */
|
|
24
31
|
accessor showArea: boolean | undefined;
|
|
25
32
|
/**
|
|
26
33
|
* Specify the minimum value of the y-axis.
|
|
@@ -33,13 +40,16 @@ export declare class StatWithMiniChart extends ReactNextElement implements StatW
|
|
|
33
40
|
*/
|
|
34
41
|
accessor max: number | undefined;
|
|
35
42
|
/**
|
|
43
|
+
* x 轴字段名(数据中时间字段的 key)
|
|
36
44
|
* @default "0"
|
|
37
45
|
*/
|
|
38
46
|
accessor xField: string | undefined;
|
|
39
47
|
/**
|
|
48
|
+
* y 轴字段名(数据中数值字段的 key)
|
|
40
49
|
* @default "1"
|
|
41
50
|
*/
|
|
42
51
|
accessor yField: string | undefined;
|
|
52
|
+
/** 图表数据源,每项为包含 xField 和 yField 字段的对象 */
|
|
43
53
|
accessor data: Record<string, number>[] | undefined;
|
|
44
54
|
render(): React.JSX.Element;
|
|
45
55
|
}
|
|
@@ -8,12 +8,15 @@ export type StickyContainerVariant = "default" | "home";
|
|
|
8
8
|
/**
|
|
9
9
|
* 构件 `ai-portal.sticky-container`
|
|
10
10
|
*
|
|
11
|
+
* 粘性容器构件,使内容在页面滚动时固定在顶部。
|
|
12
|
+
*
|
|
11
13
|
* @slot - 内容
|
|
12
14
|
* @slot header - 头部
|
|
13
15
|
* @slot toolbar - 工具栏
|
|
14
16
|
*/
|
|
15
17
|
export declare class StickyContainer extends ReactNextElement implements StickyContainerProps {
|
|
16
18
|
/**
|
|
19
|
+
* 变体风格,通过 CSS attribute selector 控制样式,不触发重新渲染
|
|
17
20
|
* @default "default"
|
|
18
21
|
*/
|
|
19
22
|
accessor variant: StickyContainerVariant | undefined;
|
|
@@ -18,12 +18,16 @@ export interface TabListMapping {
|
|
|
18
18
|
/**
|
|
19
19
|
* 构件 `ai-portal.tab-list`
|
|
20
20
|
*
|
|
21
|
+
* 标签页列表构件,展示可切换的标签页,点击后触发事件并自动更新选中状态。
|
|
22
|
+
*
|
|
21
23
|
* @part tabs - The tab list container
|
|
22
24
|
* @part tab - The individual tab
|
|
23
25
|
*/
|
|
24
26
|
export declare class TabList extends ReactNextElement implements TabListProps {
|
|
25
27
|
#private;
|
|
28
|
+
/** 标签页配置列表,每项包含 id 和 label */
|
|
26
29
|
accessor tabs: Tab[] | undefined;
|
|
30
|
+
/** 当前激活的标签页 id */
|
|
27
31
|
accessor activeTab: string | undefined;
|
|
28
32
|
render(): React.JSX.Element;
|
|
29
33
|
}
|
package/docs/action-buttons.md
CHANGED
|
@@ -1,31 +1,80 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
tagName: ai-portal.action-buttons
|
|
3
|
+
displayName: WrappedAiPortalActionButtons
|
|
4
|
+
description: 动作按钮组,支持选中状态切换,用于聊天框的功能入口。
|
|
5
|
+
category: ai-portal
|
|
6
|
+
source: "@next-bricks/ai-portal"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# ai-portal.action-buttons
|
|
10
|
+
|
|
11
|
+
> 动作按钮组,支持选中状态切换,用于聊天框的功能入口。
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
16
|
+
| --------- | ----------------------------- | ---- | ------ | ---------------------------------------------------------- |
|
|
17
|
+
| items | `ActionItem[] \| undefined` | 否 | - | 按钮列表配置,每项包含文本、唯一键值及可选图标 |
|
|
18
|
+
| activeKey | `string \| null \| undefined` | 否 | - | 当前选中按钮的键值,选中后显示删除图标,再次点击可取消选中 |
|
|
19
|
+
|
|
20
|
+
## Events
|
|
21
|
+
|
|
22
|
+
| 事件 | detail | 说明 |
|
|
23
|
+
| ------ | ------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
|
|
24
|
+
| change | `ActionItem \| null` — { key: 按钮键值, text: 按钮文本, icon: 按钮图标 } \| null — 选中时为选中的 ActionItem,取消选中时为 null | 选中或取消选中动作按钮时触发 |
|
|
2
25
|
|
|
3
26
|
## Examples
|
|
4
27
|
|
|
5
28
|
### Basic
|
|
6
29
|
|
|
30
|
+
展示动作按钮组的基本用法,点击按钮切换选中状态。
|
|
31
|
+
|
|
7
32
|
```yaml preview
|
|
8
33
|
brick: ai-portal.chat-box
|
|
9
34
|
children:
|
|
10
35
|
- brick: ai-portal.action-buttons
|
|
36
|
+
slot: actions
|
|
11
37
|
properties:
|
|
12
38
|
items:
|
|
13
|
-
-
|
|
39
|
+
- key: think
|
|
14
40
|
text: 深度思考
|
|
15
41
|
icon:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
42
|
+
lib: antd
|
|
43
|
+
theme: outlined
|
|
44
|
+
icon: reddit
|
|
45
|
+
- key: networking
|
|
20
46
|
text: 联网搜索
|
|
21
47
|
icon:
|
|
22
48
|
lib: antd
|
|
23
49
|
theme: outlined
|
|
24
50
|
icon: global
|
|
25
51
|
events:
|
|
26
|
-
|
|
27
|
-
action: console.log
|
|
28
|
-
networking:
|
|
52
|
+
change:
|
|
29
53
|
action: console.log
|
|
30
|
-
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### With activeKey
|
|
57
|
+
|
|
58
|
+
通过 `activeKey` 属性预设选中的按钮。
|
|
59
|
+
|
|
60
|
+
```yaml preview
|
|
61
|
+
brick: ai-portal.action-buttons
|
|
62
|
+
properties:
|
|
63
|
+
activeKey: think
|
|
64
|
+
items:
|
|
65
|
+
- key: think
|
|
66
|
+
text: 深度思考
|
|
67
|
+
icon:
|
|
68
|
+
lib: antd
|
|
69
|
+
theme: outlined
|
|
70
|
+
icon: reddit
|
|
71
|
+
- key: networking
|
|
72
|
+
text: 联网搜索
|
|
73
|
+
icon:
|
|
74
|
+
lib: antd
|
|
75
|
+
theme: outlined
|
|
76
|
+
icon: global
|
|
77
|
+
events:
|
|
78
|
+
change:
|
|
79
|
+
action: console.log
|
|
31
80
|
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
tagName: ai-portal.action-buttons
|
|
3
|
+
displayName: WrappedAiPortalActionButtons
|
|
4
|
+
description: 动作按钮组,支持选中状态切换,用于聊天框的功能入口。
|
|
5
|
+
category: ai-portal
|
|
6
|
+
source: "@next-bricks/ai-portal"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# WrappedAiPortalActionButtons
|
|
10
|
+
|
|
11
|
+
> 动作按钮组,支持选中状态切换,用于聊天框的功能入口。
|
|
12
|
+
|
|
13
|
+
## 导入
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { WrappedAiPortalActionButtons } from "@easyops/wrapped-components";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
22
|
+
| --------- | ----------------------------- | ---- | ------ | ---------------------------------------------------------- |
|
|
23
|
+
| items | `ActionItem[] \| undefined` | 否 | - | 按钮列表配置,每项包含文本、唯一键值及可选图标 |
|
|
24
|
+
| activeKey | `string \| null \| undefined` | 否 | - | 当前选中按钮的键值,选中后显示删除图标,再次点击可取消选中 |
|
|
25
|
+
|
|
26
|
+
## Events
|
|
27
|
+
|
|
28
|
+
| 事件 | detail | 说明 |
|
|
29
|
+
| -------- | ------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
|
|
30
|
+
| onChange | `ActionItem \| null` — { key: 按钮键值, text: 按钮文本, icon: 按钮图标 } \| null — 选中时为选中的 ActionItem,取消选中时为 null | 选中或取消选中动作按钮时触发 |
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
|
|
34
|
+
### Basic
|
|
35
|
+
|
|
36
|
+
展示动作按钮组的基本用法,点击按钮切换选中状态。
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
<WrappedAiPortalChatBox>
|
|
40
|
+
<WrappedAiPortalActionButtons
|
|
41
|
+
slot="actions"
|
|
42
|
+
items={[
|
|
43
|
+
{
|
|
44
|
+
key: "think",
|
|
45
|
+
text: "深度思考",
|
|
46
|
+
icon: { lib: "antd", theme: "outlined", icon: "reddit" },
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: "networking",
|
|
50
|
+
text: "联网搜索",
|
|
51
|
+
icon: { lib: "antd", theme: "outlined", icon: "global" },
|
|
52
|
+
},
|
|
53
|
+
]}
|
|
54
|
+
onChange={(e) => console.log(e.detail)}
|
|
55
|
+
/>
|
|
56
|
+
</WrappedAiPortalChatBox>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### With activeKey
|
|
60
|
+
|
|
61
|
+
通过 `activeKey` 属性预设选中的按钮。
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
<WrappedAiPortalActionButtons
|
|
65
|
+
activeKey="think"
|
|
66
|
+
items={[
|
|
67
|
+
{
|
|
68
|
+
key: "think",
|
|
69
|
+
text: "深度思考",
|
|
70
|
+
icon: { lib: "antd", theme: "outlined", icon: "reddit" },
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
key: "networking",
|
|
74
|
+
text: "联网搜索",
|
|
75
|
+
icon: { lib: "antd", theme: "outlined", icon: "global" },
|
|
76
|
+
},
|
|
77
|
+
]}
|
|
78
|
+
onChange={(e) => console.log(e.detail)}
|
|
79
|
+
/>
|
|
80
|
+
```
|
|
@@ -1,9 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
tagName: ai-portal.activity-timeline
|
|
3
|
+
displayName: WrappedAiPortalActivityTimeline
|
|
4
|
+
description: 活动时间线,展示目标的操作历史记录,支持多种动作类型的可视化展示。
|
|
5
|
+
category: ai-portal
|
|
6
|
+
source: "@next-bricks/ai-portal"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# ai-portal.activity-timeline
|
|
10
|
+
|
|
11
|
+
> 活动时间线,展示目标的操作历史记录,支持多种动作类型的可视化展示。
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
16
|
+
| --------------- | ------------------------- | ---- | ------ | ---------------------------------------------------------------------- |
|
|
17
|
+
| list | `Activity[] \| undefined` | 否 | - | 活动记录列表 |
|
|
18
|
+
| chatUrlTemplate | `string \| undefined` | 否 | - | 跳转到对话详情页的 URL 模板,支持 {conversation_id} 等活动记录字段插值 |
|
|
2
19
|
|
|
3
20
|
## Examples
|
|
4
21
|
|
|
5
22
|
### Basic
|
|
6
23
|
|
|
24
|
+
展示活动时间线的基本用法,渲染包含多种动作类型的操作历史记录。
|
|
25
|
+
|
|
7
26
|
```yaml preview
|
|
8
27
|
brick: ai-portal.activity-timeline
|
|
9
28
|
properties:
|
|
@@ -18,7 +37,8 @@ properties:
|
|
|
18
37
|
time: 1757863597
|
|
19
38
|
metadata:
|
|
20
39
|
after:
|
|
21
|
-
|
|
40
|
+
owner:
|
|
41
|
+
user_name: Lucy
|
|
22
42
|
- user_id: u002
|
|
23
43
|
user_name: Lucy
|
|
24
44
|
action_type: start_conversation
|
|
@@ -33,18 +53,20 @@ properties:
|
|
|
33
53
|
metadata:
|
|
34
54
|
sub_goals_count: 2
|
|
35
55
|
sub_goals:
|
|
36
|
-
- title:
|
|
37
|
-
- title:
|
|
56
|
+
- title: 先计划
|
|
57
|
+
- title: 再执行
|
|
38
58
|
- user_id: u002
|
|
39
59
|
user_name: Lucy
|
|
40
60
|
action_type: alter_user
|
|
41
61
|
time: 1757904096
|
|
42
62
|
metadata:
|
|
43
63
|
before:
|
|
44
|
-
|
|
64
|
+
users:
|
|
65
|
+
- user_name: Jim
|
|
45
66
|
after:
|
|
46
|
-
|
|
47
|
-
|
|
67
|
+
users:
|
|
68
|
+
- user_name: Joy
|
|
69
|
+
- user_name: Green
|
|
48
70
|
- user_id: u001
|
|
49
71
|
user_name: Tom
|
|
50
72
|
action_type: add_comment
|
|
@@ -52,3 +74,25 @@ properties:
|
|
|
52
74
|
metadata:
|
|
53
75
|
comment_content: Good!
|
|
54
76
|
```
|
|
77
|
+
|
|
78
|
+
### With Chat URL Template
|
|
79
|
+
|
|
80
|
+
配置 chatUrlTemplate 属性,使对话链接可点击跳转。
|
|
81
|
+
|
|
82
|
+
```yaml preview
|
|
83
|
+
brick: ai-portal.activity-timeline
|
|
84
|
+
properties:
|
|
85
|
+
chatUrlTemplate: /chat/{conversation_id}
|
|
86
|
+
list:
|
|
87
|
+
- user_id: u002
|
|
88
|
+
user_name: Lucy
|
|
89
|
+
action_type: start_conversation
|
|
90
|
+
time: 1757904096
|
|
91
|
+
metadata:
|
|
92
|
+
conversation_id: c001
|
|
93
|
+
conversation_title: 项目规划
|
|
94
|
+
- user_id: u001
|
|
95
|
+
user_name: Tom
|
|
96
|
+
action_type: create_goal
|
|
97
|
+
time: 1757853597
|
|
98
|
+
```
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
tagName: ai-portal.activity-timeline
|
|
3
|
+
displayName: WrappedAiPortalActivityTimeline
|
|
4
|
+
description: 活动时间线,展示目标的操作历史记录,支持多种动作类型的可视化展示。
|
|
5
|
+
category: ai-portal
|
|
6
|
+
source: "@next-bricks/ai-portal"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# WrappedAiPortalActivityTimeline
|
|
10
|
+
|
|
11
|
+
> 活动时间线,展示目标的操作历史记录,支持多种动作类型的可视化展示。
|
|
12
|
+
|
|
13
|
+
## 导入
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { WrappedAiPortalActivityTimeline } from "@easyops/wrapped-components";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
22
|
+
| --------------- | ------------------------- | ---- | ------ | ---------------------------------------------------------------------- |
|
|
23
|
+
| list | `Activity[] \| undefined` | 否 | - | 活动记录列表 |
|
|
24
|
+
| chatUrlTemplate | `string \| undefined` | 否 | - | 跳转到对话详情页的 URL 模板,支持 {conversation_id} 等活动记录字段插值 |
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic
|
|
29
|
+
|
|
30
|
+
展示活动时间线的基本用法,渲染包含多种动作类型的操作历史记录。
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
<WrappedAiPortalActivityTimeline
|
|
34
|
+
list={[
|
|
35
|
+
{
|
|
36
|
+
user_id: "u001",
|
|
37
|
+
user_name: "Tom",
|
|
38
|
+
action_type: "create_goal",
|
|
39
|
+
time: 1757853597,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
user_id: "u001",
|
|
43
|
+
user_name: "Tom",
|
|
44
|
+
action_type: "alter_owner",
|
|
45
|
+
time: 1757863597,
|
|
46
|
+
metadata: { after: { owner: { user_name: "Lucy" } } },
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
user_id: "u002",
|
|
50
|
+
user_name: "Lucy",
|
|
51
|
+
action_type: "start_conversation",
|
|
52
|
+
time: 1757904096,
|
|
53
|
+
metadata: { conversation_id: "c001", conversation_title: "项目规划" },
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
user_id: "u002",
|
|
57
|
+
user_name: "Lucy",
|
|
58
|
+
action_type: "decompose_goals",
|
|
59
|
+
time: 1757904096,
|
|
60
|
+
metadata: {
|
|
61
|
+
sub_goals_count: 2,
|
|
62
|
+
sub_goals: [{ title: "先计划" }, { title: "再执行" }],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
user_id: "u002",
|
|
67
|
+
user_name: "Lucy",
|
|
68
|
+
action_type: "alter_user",
|
|
69
|
+
time: 1757904096,
|
|
70
|
+
metadata: {
|
|
71
|
+
before: { users: [{ user_name: "Jim" }] },
|
|
72
|
+
after: { users: [{ user_name: "Joy" }, { user_name: "Green" }] },
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
user_id: "u001",
|
|
77
|
+
user_name: "Tom",
|
|
78
|
+
action_type: "add_comment",
|
|
79
|
+
time: 1757904096,
|
|
80
|
+
metadata: { comment_content: "Good!" },
|
|
81
|
+
},
|
|
82
|
+
]}
|
|
83
|
+
/>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### With Chat URL Template
|
|
87
|
+
|
|
88
|
+
配置 chatUrlTemplate 属性,使对话链接可点击跳转。
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
<WrappedAiPortalActivityTimeline
|
|
92
|
+
chatUrlTemplate="/chat/{conversation_id}"
|
|
93
|
+
list={[
|
|
94
|
+
{
|
|
95
|
+
user_id: "u002",
|
|
96
|
+
user_name: "Lucy",
|
|
97
|
+
action_type: "start_conversation",
|
|
98
|
+
time: 1757904096,
|
|
99
|
+
metadata: { conversation_id: "c001", conversation_title: "项目规划" },
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
user_id: "u001",
|
|
103
|
+
user_name: "Tom",
|
|
104
|
+
action_type: "create_goal",
|
|
105
|
+
time: 1757853597,
|
|
106
|
+
},
|
|
107
|
+
]}
|
|
108
|
+
/>
|
|
109
|
+
```
|
package/docs/ai-agents.md
CHANGED
|
@@ -1,11 +1,71 @@
|
|
|
1
|
-
|
|
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
|
+
# ai-portal.ai-agents
|
|
10
|
+
|
|
11
|
+
> AI Agents 卡片列表,展示可用的 AI 智能体,支持点击跳转到对应详情页。
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
16
|
+
| ----------- | ---------------------- | ---- | ------ | ------------------------------------------------------------- |
|
|
17
|
+
| list | `Agent[] \| undefined` | 否 | - | AI Agent 列表数据 |
|
|
18
|
+
| urlTemplate | `string \| undefined` | 否 | - | 跳转到 Agent 详情页的 URL 模板,支持 {name} 等 Agent 字段插值 |
|
|
2
19
|
|
|
3
20
|
## Examples
|
|
4
21
|
|
|
5
22
|
### Basic
|
|
6
23
|
|
|
24
|
+
展示 AI Agents 卡片列表的基本用法。
|
|
25
|
+
|
|
26
|
+
```yaml preview
|
|
27
|
+
brick: ai-portal.ai-agents
|
|
28
|
+
properties:
|
|
29
|
+
list:
|
|
30
|
+
- name: 运维专家
|
|
31
|
+
description: 擅长处理服务器运维、故障排查和性能优化等问题。
|
|
32
|
+
icon:
|
|
33
|
+
lib: antd
|
|
34
|
+
icon: tool
|
|
35
|
+
tags:
|
|
36
|
+
- 运维
|
|
37
|
+
- 故障排查
|
|
38
|
+
- name: 数据分析师
|
|
39
|
+
description: 专注于数据处理、报表生成和趋势分析。
|
|
40
|
+
icon:
|
|
41
|
+
lib: antd
|
|
42
|
+
icon: bar-chart
|
|
43
|
+
tags:
|
|
44
|
+
- 数据
|
|
45
|
+
- 分析
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### With URL Template
|
|
49
|
+
|
|
50
|
+
配置 urlTemplate 属性,使每个 Agent 卡片点击后跳转到对应详情页。
|
|
51
|
+
|
|
7
52
|
```yaml preview
|
|
8
53
|
brick: ai-portal.ai-agents
|
|
9
54
|
properties:
|
|
10
|
-
|
|
55
|
+
urlTemplate: /agents/{name}
|
|
56
|
+
list:
|
|
57
|
+
- name: 运维专家
|
|
58
|
+
description: 擅长处理服务器运维、故障排查和性能优化等问题。
|
|
59
|
+
icon:
|
|
60
|
+
lib: antd
|
|
61
|
+
icon: tool
|
|
62
|
+
tags:
|
|
63
|
+
- 运维
|
|
64
|
+
- name: 数据分析师
|
|
65
|
+
description: 专注于数据处理、报表生成和趋势分析。
|
|
66
|
+
icon:
|
|
67
|
+
lib: antd
|
|
68
|
+
icon: bar-chart
|
|
69
|
+
tags:
|
|
70
|
+
- 数据
|
|
11
71
|
```
|