@baishuyun/ai-design 1.2.2 → 1.2.4
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/.turbo/turbo-build.log +0 -0
- package/CHANGELOG.md +18 -0
- package/dist/ai-design.js +2888 -2865
- package/dist/ai-design.js.map +1 -1
- package/dist/ai-design.umd.cjs +43 -43
- package/dist/ai-design.umd.cjs.map +1 -1
- package/dist/src/components/agent-helper/agent-helper-card/index.d.ts +3 -2
- package/dist/src/components/agent-helper/agent-helper-card/index.d.ts.map +1 -1
- package/dist/src/components/agent-helper/agent-helper-card-list/index.d.ts +3 -2
- package/dist/src/components/agent-helper/agent-helper-card-list/index.d.ts.map +1 -1
- package/dist/src/stories/AgentHelperCard.stories.d.ts +1 -1
- package/dist/src/stories/AgentHelperCardList.stories.d.ts +1 -1
- package/package.json +6 -6
- package/src/components/agent-helper/agent-helper-card/index.tsx +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAgentHelper } from '@baishuyun/types';
|
|
1
|
+
import { IAgentHelper, IBsFormService } from '@baishuyun/types';
|
|
2
2
|
export interface AgentHelperCardProps {
|
|
3
3
|
helper: IAgentHelper;
|
|
4
4
|
agentName?: string;
|
|
@@ -9,6 +9,7 @@ export interface AgentHelperCardProps {
|
|
|
9
9
|
onEdit?: () => void;
|
|
10
10
|
onCopy?: () => void;
|
|
11
11
|
onDelete?: () => void;
|
|
12
|
+
formService?: IBsFormService;
|
|
12
13
|
}
|
|
13
|
-
export declare const AgentHelperCard: ({ helper, agentName, agentIcon, className, onEnabledChange, onViewLogs, onEdit, onCopy, onDelete, }: AgentHelperCardProps) => import("react").JSX.Element;
|
|
14
|
+
export declare const AgentHelperCard: ({ helper, agentName, agentIcon, className, onEnabledChange, onViewLogs, onEdit, onCopy, onDelete, formService, }: AgentHelperCardProps) => import("react").JSX.Element;
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/agent-helper/agent-helper-card/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAc,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/agent-helper/agent-helper-card/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAc,cAAc,EAAU,MAAM,kBAAkB,CAAC;AAwFzF,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB,WAAW,CAAC,EAAE,cAAc,CAAC;CAC9B;AAED,eAAO,MAAM,eAAe,GAAI,kHAW7B,oBAAoB,gCAsEtB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAgentHelper } from '@baishuyun/types';
|
|
1
|
+
import { IAgentHelper, IBsFormService } from '@baishuyun/types';
|
|
2
2
|
export interface AgentHelperCardListProps {
|
|
3
3
|
items: Array<IAgentHelper>;
|
|
4
4
|
className?: string;
|
|
@@ -9,6 +9,7 @@ export interface AgentHelperCardListProps {
|
|
|
9
9
|
onEdit?: (helperId: string) => void;
|
|
10
10
|
onCopy?: (helperId: string) => void;
|
|
11
11
|
onDelete?: (helperId: string) => void;
|
|
12
|
+
formService?: IBsFormService;
|
|
12
13
|
}
|
|
13
|
-
export declare const AgentHelperCardList: ({ items, className, getAgentName, getAgentIcon, onEnabledChange, onViewLogs, onEdit, onCopy, onDelete, }: AgentHelperCardListProps) => import("react").JSX.Element;
|
|
14
|
+
export declare const AgentHelperCardList: ({ items, className, getAgentName, getAgentIcon, onEnabledChange, onViewLogs, onEdit, onCopy, onDelete, formService, }: AgentHelperCardListProps) => import("react").JSX.Element;
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/agent-helper/agent-helper-card-list/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/agent-helper/agent-helper-card-list/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAErE,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACvD,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACvD,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/D,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,cAAc,CAAC;CAC9B;AAED,eAAO,MAAM,mBAAmB,GAAI,uHAWjC,wBAAwB,gCA+B1B,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import { IAgentHelper } from '@baishuyun/types';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ helper, agentName, agentIcon, className, onEnabledChange, onViewLogs, onEdit, onCopy, onDelete, }: import('..').AgentHelperCardProps) => import("react").JSX.Element;
|
|
5
|
+
component: ({ helper, agentName, agentIcon, className, onEnabledChange, onViewLogs, onEdit, onCopy, onDelete, formService, }: import('..').AgentHelperCardProps) => import("react").JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
parameters: {
|
|
8
8
|
layout: string;
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import { IAgentHelper } from '@baishuyun/types';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ items, className, getAgentName, getAgentIcon, onEnabledChange, onViewLogs, onEdit, onCopy, onDelete, }: import('..').AgentHelperCardListProps) => import("react").JSX.Element;
|
|
5
|
+
component: ({ items, className, getAgentName, getAgentIcon, onEnabledChange, onViewLogs, onEdit, onCopy, onDelete, formService, }: import('..').AgentHelperCardListProps) => import("react").JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
parameters: {
|
|
8
8
|
layout: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baishuyun/ai-design",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "AI 功能 UI 组件库 - 所有 AI 功能的 UI 表现唯一真相来源",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"tw-animate-css": "^1.4.0",
|
|
61
61
|
"vaul": "^1.1.2",
|
|
62
62
|
"zod": "^4.1.13",
|
|
63
|
-
"@baishuyun/ai-feat-utils": "1.2.
|
|
64
|
-
"@baishuyun/types": "2.2.
|
|
63
|
+
"@baishuyun/ai-feat-utils": "1.2.4",
|
|
64
|
+
"@baishuyun/types": "2.2.4"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"react": "^19.0.0",
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
"typescript": "^5.5.0",
|
|
84
84
|
"vite": "^5.1.4",
|
|
85
85
|
"vite-plugin-dts": "^4.5.4",
|
|
86
|
-
"@baishuyun/types": "2.2.
|
|
87
|
-
"@baishuyun/tailwind-config": "2.2.
|
|
88
|
-
"@baishuyun/typescript-config": "1.2.
|
|
86
|
+
"@baishuyun/types": "2.2.4",
|
|
87
|
+
"@baishuyun/tailwind-config": "2.2.4",
|
|
88
|
+
"@baishuyun/typescript-config": "1.2.4"
|
|
89
89
|
},
|
|
90
90
|
"keywords": [],
|
|
91
91
|
"author": "",
|
|
@@ -39,7 +39,7 @@ function useTriggerDescription(helper: IAgentHelper, formService?: IBsFormServic
|
|
|
39
39
|
const formName = entryInfo ? entryInfo.name : helper.formId;
|
|
40
40
|
const fieldDict = useMemo(() => {
|
|
41
41
|
const ret: Record<string, string> = {};
|
|
42
|
-
for (const i of (entryInfo?.content
|
|
42
|
+
for (const i of (entryInfo?.content?.items ?? [])) {
|
|
43
43
|
const key = i.widget?.widgetName ?? "";
|
|
44
44
|
if (!key) {
|
|
45
45
|
continue;
|
|
@@ -48,7 +48,7 @@ function useTriggerDescription(helper: IAgentHelper, formService?: IBsFormServic
|
|
|
48
48
|
ret[key] = i.label;
|
|
49
49
|
}
|
|
50
50
|
return ret;
|
|
51
|
-
}, [entryInfo?.content
|
|
51
|
+
}, [entryInfo?.content?.items])
|
|
52
52
|
|
|
53
53
|
const widgetName = fieldDict[helper.triggerFieldWidgetName ?? ""] ?? helper.triggerFieldWidgetName;
|
|
54
54
|
|