@baishuyun/ai-design 2.1.0-alpha.0 → 2.1.0-alpha.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/.storybook/main.ts +31 -31
- package/.storybook/preview.ts +16 -16
- package/CHANGELOG.md +548 -512
- package/components.json +22 -22
- package/package.json +5 -5
- package/scripts/strip-layers.cjs +41 -41
- package/src/components/abs-fullscreen-gradient-bg.tsx +35 -35
- package/src/components/agent-helper/agent-category-select-menu/index.tsx +57 -57
- package/src/components/agent-helper/agent-entry-card/index.tsx +94 -94
- package/src/components/agent-helper/agent-helper-card/index.tsx +179 -179
- package/src/components/agent-helper/agent-helper-card-list/index.tsx +59 -59
- package/src/components/agent-helper/agent-helper-main-layout/index.tsx +60 -60
- package/src/components/agent-helper/agent-sort-select/index.tsx +89 -89
- package/src/components/agent-helper/agent-tag/index.tsx +29 -29
- package/src/components/agent-helper/app-select/index.tsx +559 -559
- package/src/components/agent-helper/condition-group/index.tsx +75 -75
- package/src/components/agent-helper/condition-input/index.tsx +233 -233
- package/src/components/agent-helper/condition-item/index.tsx +237 -237
- package/src/components/agent-helper/condition-quantifier-select/index.tsx +142 -142
- package/src/components/agent-helper/condition-trigger-description/index.tsx +49 -49
- package/src/components/agent-helper/date-picker/calendar-panel.tsx +164 -164
- package/src/components/agent-helper/date-picker/date-input.tsx +91 -91
- package/src/components/agent-helper/date-picker/date-picker.tsx +327 -327
- package/src/components/agent-helper/date-picker/footer-panel.tsx +44 -44
- package/src/components/agent-helper/date-picker/index.ts +3 -3
- package/src/components/agent-helper/date-picker/month-panel.tsx +82 -82
- package/src/components/agent-helper/date-picker/time-panel.tsx +146 -146
- package/src/components/agent-helper/date-picker/types.ts +37 -37
- package/src/components/agent-helper/date-picker/utils.ts +121 -121
- package/src/components/agent-helper/date-picker/year-panel.tsx +86 -86
- package/src/components/agent-helper/exec-log-filter/index.tsx +232 -232
- package/src/components/agent-helper/field-edit-preference-select/index.tsx +291 -291
- package/src/components/agent-helper/field-select/index.tsx +466 -466
- package/src/components/agent-helper/field-value-input/china-address-data.ts +4117 -4117
- package/src/components/agent-helper/field-value-input/display.tsx +71 -71
- package/src/components/agent-helper/field-value-input/icons.tsx +38 -38
- package/src/components/agent-helper/field-value-input/index.tsx +144 -144
- package/src/components/agent-helper/field-value-input/inputs.tsx +247 -247
- package/src/components/agent-helper/field-value-input/picker-inputs.tsx +1144 -1141
- package/src/components/agent-helper/flow-node-action-trigger-select/index.tsx +57 -57
- package/src/components/agent-helper/form-action-trigger-select/index.tsx +60 -60
- package/src/components/agent-helper/form-divider/index.tsx +44 -44
- package/src/components/agent-helper/form-select/index.tsx +732 -732
- package/src/components/agent-helper/monthdays-select/index.tsx +378 -378
- package/src/components/agent-helper/offset-preference-select/index.tsx +268 -268
- package/src/components/agent-helper/offset-type-select/index.tsx +66 -66
- package/src/components/agent-helper/offset-unit-select/index.tsx +54 -54
- package/src/components/agent-helper/placeholder-card/index.tsx +75 -75
- package/src/components/agent-helper/prompt-input/index.tsx +646 -646
- package/src/components/agent-helper/relational-operator-select/index.tsx +179 -179
- package/src/components/agent-helper/repeat-by-type-select/index.tsx +53 -53
- package/src/components/agent-helper/repeat-preference-select/index.tsx +162 -162
- package/src/components/agent-helper/repeat-preference-type-select/index.tsx +58 -58
- package/src/components/agent-helper/search-input/index.tsx +35 -35
- package/src/components/agent-helper/table/index.tsx +114 -114
- package/src/components/agent-helper/trigger-select/index.tsx +121 -121
- package/src/components/agent-helper/trigger-time-preference-select/index.tsx +189 -189
- package/src/components/agent-helper/trigger-time-source-type-select/index.tsx +53 -53
- package/src/components/agent-helper/weekdays-select/index.tsx +230 -230
- package/src/components/agent-scroll-selector.tsx +193 -193
- package/src/components/agent-select.tsx +154 -154
- package/src/components/attachment-part-group.tsx +35 -35
- package/src/components/attachment-part.tsx +296 -296
- package/src/components/attachments-previewer.tsx +272 -272
- package/src/components/base-button.tsx +49 -49
- package/src/components/border-animation.tsx +107 -107
- package/src/components/border-color-animation.tsx +66 -66
- package/src/components/bot-avatar-name.tsx +36 -36
- package/src/components/bot-icon.tsx +23 -23
- package/src/components/bs-entry-select/app-group-folder.tsx +61 -61
- package/src/components/bs-entry-select/bs-entry-select.tsx +296 -296
- package/src/components/bs-entry-select/build-tree.ts +265 -265
- package/src/components/bs-entry-select/entry-item.tsx +45 -45
- package/src/components/bs-entry-select/entry-popover.tsx +99 -99
- package/src/components/bs-entry-select/index.ts +7 -7
- package/src/components/bs-entry-select/other-app-section.tsx +96 -96
- package/src/components/bs-entry-select/scroll-slider.tsx +872 -872
- package/src/components/bs-entry-select/search-input.tsx +4 -4
- package/src/components/bs-entry-select/tree-item-node.tsx +84 -84
- package/src/components/bs-entry-select/types.ts +46 -46
- package/src/components/bs-icons.tsx +1362 -1362
- package/src/components/card-field.tsx +23 -23
- package/src/components/card.tsx +36 -36
- package/src/components/chat-area-header.tsx +65 -65
- package/src/components/check-card.tsx +77 -77
- package/src/components/circle-checker.tsx +66 -66
- package/src/components/collapsible-txt-msg.tsx +80 -75
- package/src/components/collapsible.tsx +9 -9
- package/src/components/confirm-dialog.tsx +139 -139
- package/src/components/date-range-picker.tsx +91 -91
- package/src/components/fake-bot-msg.tsx +53 -51
- package/src/components/field-checker-list-msg.tsx +146 -146
- package/src/components/field-checker.tsx +185 -185
- package/src/components/field-icon.tsx +13 -13
- package/src/components/field-value-checker.tsx +116 -116
- package/src/components/fields-design-info-table.tsx +160 -160
- package/src/components/fields-generating-indicator.tsx +95 -95
- package/src/components/fields-portal.tsx +18 -18
- package/src/components/fields-previewer.tsx +216 -216
- package/src/components/font-icon.tsx +65 -65
- package/src/components/form-info-editor.tsx +263 -263
- package/src/components/formula-tag.tsx +32 -32
- package/src/components/generate-animation.tsx +56 -56
- package/src/components/icon-btn.tsx +43 -43
- package/src/components/icon-card.tsx +67 -67
- package/src/components/icons/calendar-icon.tsx +5 -5
- package/src/components/icons/clear-all-icon.tsx +5 -5
- package/src/components/icons/empty-agent-icon.tsx +93 -93
- package/src/components/icons/empty-table-icon.tsx +104 -104
- package/src/components/icons/grids-icon.tsx +5 -5
- package/src/components/img-part.tsx +27 -27
- package/src/components/legacy-slot.tsx +110 -110
- package/src/components/line-checker.tsx +168 -168
- package/src/components/linear-gradient-border-btn.tsx +48 -48
- package/src/components/linear-gradient-color-bg-animation.tsx +103 -103
- package/src/components/memoized-markdown.tsx +32 -32
- package/src/components/message-content.tsx +21 -21
- package/src/components/number-part.tsx +46 -46
- package/src/components/office-container.tsx +289 -289
- package/src/components/option-item.tsx +27 -27
- package/src/components/output-config-editor.tsx +478 -478
- package/src/components/previewer-header.tsx +270 -270
- package/src/components/primary-confirm-btn.tsx +58 -58
- package/src/components/primary-entry-btn.tsx +48 -48
- package/src/components/radio-card.tsx +63 -63
- package/src/components/scroll-to-bottom-btn.tsx +28 -28
- package/src/components/split-line.tsx +9 -9
- package/src/components/square-checker.tsx +87 -87
- package/src/components/subform-fields-value-checker.tsx +184 -184
- package/src/components/tab-radio-group.tsx +83 -83
- package/src/components/tooltip.tsx +53 -53
- package/src/components/ui/button.tsx +51 -51
- package/src/components/ui/calendar.tsx +57 -57
- package/src/components/ui/dialog.tsx +104 -104
- package/src/components/ui/drawer.tsx +279 -279
- package/src/components/ui/form.tsx +202 -202
- package/src/components/ui/icons.tsx +1267 -1267
- package/src/components/ui/input.tsx +28 -28
- package/src/components/ui/label.tsx +30 -30
- package/src/components/ui/popover.tsx +85 -85
- package/src/components/ui/select.tsx +236 -236
- package/src/components/ui/spinner.tsx +17 -17
- package/src/components/ui/switch.tsx +33 -33
- package/src/components/ui/tabs.tsx +62 -62
- package/src/components/ui/textarea.tsx +28 -28
- package/src/components/ui/tooltip.tsx +53 -53
- package/src/components/user-txt-msg-bubble.tsx +47 -47
- package/src/components/warning-msg.tsx +27 -27
- package/src/const/ui.ts +119 -119
- package/src/css.d.ts +4 -4
- package/src/hooks/use-column-appear.ts +78 -78
- package/src/hooks/use-portal-container.ts +27 -27
- package/src/hooks/use-resizable-width.ts +129 -129
- package/src/hooks/use-select-popover-position.ts +74 -74
- package/src/hooks/use-shadow.ts +127 -127
- package/src/index.ts +226 -226
- package/src/lib/utils.ts +138 -138
- package/src/stories/AbsFullscreenGradientBg.stories.tsx +36 -36
- package/src/stories/AgentCategorySelectMenu.stories.tsx +33 -33
- package/src/stories/AgentEntryCard.stories.tsx +90 -90
- package/src/stories/AgentHelperCard.stories.tsx +105 -105
- package/src/stories/AgentHelperCardList.stories.tsx +120 -120
- package/src/stories/AgentHelperMainLayout.stories.tsx +71 -71
- package/src/stories/AgentScrollSelector.stories.tsx +95 -95
- package/src/stories/AgentSelect.stories.tsx +134 -134
- package/src/stories/AgentTag.stories.tsx +44 -44
- package/src/stories/AppSelect.stories.tsx +250 -250
- package/src/stories/AttachmentPart.stories.tsx +122 -122
- package/src/stories/AttachmentPartGroup.stories.tsx +152 -152
- package/src/stories/AttachmentsPreviewer.stories.tsx +306 -306
- package/src/stories/BaseButton.stories.tsx +33 -33
- package/src/stories/BorderAnimation.stories.tsx +116 -116
- package/src/stories/BorderColorAnimation.stories.tsx +63 -63
- package/src/stories/BotAvatarAndName.stories.ts +24 -24
- package/src/stories/BotIcon.stories.ts +22 -22
- package/src/stories/BsConditionInput.stories.tsx +460 -460
- package/src/stories/BsEntrySelect.stories.tsx +343 -343
- package/src/stories/BsTooltip.stories.tsx +32 -32
- package/src/stories/Card.stories.tsx +28 -28
- package/src/stories/CardField.stories.tsx +87 -87
- package/src/stories/ChatAreaHeader.stories.ts +26 -26
- package/src/stories/CheckCard.stories.tsx +114 -114
- package/src/stories/CircleChecker.stories.tsx +89 -89
- package/src/stories/CollapsibleTextMsg.stories.ts +44 -44
- package/src/stories/ConditionGroup.stories.tsx +216 -216
- package/src/stories/ConditionInput.stories.tsx +502 -502
- package/src/stories/ConditionItem.stories.tsx +163 -163
- package/src/stories/ConditonQuantifierSelect.stories.tsx +54 -54
- package/src/stories/ConditonTriggerDescription.stories.tsx +61 -61
- package/src/stories/ConfirmDialog.stories.tsx +123 -123
- package/src/stories/DataTable.stories.tsx +191 -191
- package/src/stories/DatePicker.stories.tsx +174 -174
- package/src/stories/ExecLogFilter.stories.tsx +145 -145
- package/src/stories/FakeBotMsg.stories.tsx +36 -36
- package/src/stories/FieldEditPreferenceSelect.stories.tsx +161 -161
- package/src/stories/FieldSelect.stories.tsx +228 -228
- package/src/stories/FieldValueInput.stories.tsx +442 -442
- package/src/stories/FlowNodeActionTriggerSelect.stories.tsx +80 -80
- package/src/stories/Form.stories.tsx +302 -302
- package/src/stories/FormActionTriggerSelect.stories.tsx +80 -80
- package/src/stories/FormDivider.stories.tsx +31 -31
- package/src/stories/FormInfoEditor.stories.tsx +173 -173
- package/src/stories/FormSelect.stories.tsx +222 -222
- package/src/stories/FormulaTag.stories.tsx +68 -68
- package/src/stories/GenerateAnimation.stories.ts +20 -20
- package/src/stories/IconBtn.stories.tsx +32 -32
- package/src/stories/IconCard.stories.tsx +35 -35
- package/src/stories/IconLib.tsx +45 -45
- package/src/stories/Icons.stories.ts +22 -22
- package/src/stories/ImgMsgPart.stories.tsx +42 -42
- package/src/stories/Input.stories.tsx +102 -102
- package/src/stories/Label.stories.tsx +66 -66
- package/src/stories/LegacySlot.stories.tsx +56 -56
- package/src/stories/LineChecker.stories.tsx +133 -133
- package/src/stories/LinearGradientBorderBtn.stories.tsx +86 -86
- package/src/stories/LinearGradientColorBgAnimation.stories.tsx +60 -60
- package/src/stories/MemoizedMarkdown.stories.tsx +102 -102
- package/src/stories/MessageContent.stories.tsx +36 -36
- package/src/stories/MonthdaysSelect.stories.tsx +78 -78
- package/src/stories/NumbersMsgPart.stories.tsx +42 -42
- package/src/stories/OfficeContainer.stories.tsx +287 -287
- package/src/stories/OffsetPreferenceSelect.stories.tsx +118 -118
- package/src/stories/OffsetTypeSelect.stories.tsx +75 -75
- package/src/stories/OffsetUnitSelect.stories.tsx +61 -61
- package/src/stories/OptionItem.stories.tsx +77 -77
- package/src/stories/OutputConfigEditor.stories.tsx +96 -96
- package/src/stories/PlaceholderCard.stories.tsx +35 -35
- package/src/stories/PreviewerHeader.stories.tsx +91 -91
- package/src/stories/PrimaryConfirmBtn.stories.tsx +60 -60
- package/src/stories/PrimaryEntryBtn.stories.tsx +74 -74
- package/src/stories/PromptInput.stories.tsx +228 -228
- package/src/stories/RadioCard.stories.tsx +103 -103
- package/src/stories/RelationalOperatorSelect.stories.tsx +61 -61
- package/src/stories/RepeatByTypeSelect.stories.tsx +58 -58
- package/src/stories/RepeatPreferenceSelect.stories.tsx +107 -107
- package/src/stories/RepeatPreferenceTypeSelect.stories.tsx +58 -58
- package/src/stories/ScrollToBottom.stories.tsx +24 -24
- package/src/stories/SearchInput.stories.tsx +50 -50
- package/src/stories/Select.stories.tsx +128 -128
- package/src/stories/SplitLine.stories.tsx +40 -40
- package/src/stories/SquareChecker.stories.tsx +96 -96
- package/src/stories/TabRadioGroup.stories.tsx +84 -84
- package/src/stories/Textarea.stories.tsx +67 -67
- package/src/stories/TriggerSelect.stories.tsx +48 -48
- package/src/stories/TriggerTimePreferenceSelect.stories.tsx +106 -106
- package/src/stories/TriggerTimeSourceTypeSelect.stories.tsx +68 -68
- package/src/stories/UserTextMsgBubble.stories.ts +24 -24
- package/src/stories/WarningMessage.stories.tsx +23 -23
- package/src/stories/WeekdaysSelect.stories.tsx +66 -66
- package/src/stories/assets/demo.css +539 -539
- package/src/stories/assets/demo_index.html +7988 -7988
- package/src/stories/assets/iconfont.css +1377 -1377
- package/src/stories/assets/iconfont.json +2382 -2382
- package/src/stories/assets/iconfont.svg +697 -697
- package/src/stories/collapsible.stories.tsx +47 -47
- package/src/stories/drawer.stories.tsx +196 -196
- package/src/stories/field-checker-list-msg.stories.tsx +95 -95
- package/src/stories/field-checker.stories.tsx +117 -117
- package/src/stories/field-icon.stories.tsx +70 -70
- package/src/stories/field-value-checker.stories.tsx +113 -113
- package/src/stories/fields-design-info-table.stories.tsx +203 -203
- package/src/stories/fields-generating.stories.tsx +41 -41
- package/src/stories/fields-previewer.stories.tsx +77 -77
- package/src/stories/subform-fields-value-checker.stories.tsx +98 -98
- package/src/style.css +226 -226
- package/src/types.ts +8 -8
- package/style.css +3652 -3652
- package/tsconfig.json +13 -13
- package/vite.config.ts +44 -44
|
@@ -1,179 +1,179 @@
|
|
|
1
|
-
import { cn } from '../../../lib/utils';
|
|
2
|
-
import { TriggerTypeIcon } from '../trigger-select';
|
|
3
|
-
import { AgentTag } from '../agent-tag';
|
|
4
|
-
import { IconBtn } from '../../icon-btn';
|
|
5
|
-
import { Switch } from '../../ui/switch';
|
|
6
|
-
import { EditIcon, CopyIcon, TrashIcon } from '../../bs-icons';
|
|
7
|
-
import type { IAgentHelper, IAgentInfo, IBsFormService, IEntry } from '@baishuyun/types';
|
|
8
|
-
import { useEffect, useMemo, useState } from 'react';
|
|
9
|
-
|
|
10
|
-
const FORM_ACTION_LABELS: Record<string, string> = {
|
|
11
|
-
submit: '提交数据',
|
|
12
|
-
edit: '编辑数据',
|
|
13
|
-
delete: '删除数据',
|
|
14
|
-
init: '表单初始化',
|
|
15
|
-
edit_init: '表单编辑初始化',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const FLOW_NODE_ACTION_LABELS: Record<string, string> = {
|
|
19
|
-
flow_end: '流程结束',
|
|
20
|
-
flow_node: '流程节点',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
function useTriggerDescription(helper: IAgentHelper, formService?: IBsFormService): string {
|
|
24
|
-
const [entryInfo, setEntryInfo] = useState<IEntry | undefined>(undefined);
|
|
25
|
-
|
|
26
|
-
const fetchEntryInfo = async (appId: string, entryId: string) => {
|
|
27
|
-
const entryInfo = await formService?.getEntry({ appId, entryId });
|
|
28
|
-
setEntryInfo(entryInfo);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
if (!helper.appId || !helper.formId) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
fetchEntryInfo(helper.appId, helper.formId);
|
|
37
|
-
}, [helper.appId, helper.formId])
|
|
38
|
-
|
|
39
|
-
const formName = entryInfo ? entryInfo.name : helper.formId;
|
|
40
|
-
const fieldDict = useMemo(() => {
|
|
41
|
-
const ret: Record<string, string> = {};
|
|
42
|
-
for (const i of (entryInfo?.content?.items ?? [])) {
|
|
43
|
-
const key = i.widget?.widgetName ?? "";
|
|
44
|
-
if (!key) {
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
ret[key] = i.label;
|
|
49
|
-
}
|
|
50
|
-
return ret;
|
|
51
|
-
}, [entryInfo?.content?.items])
|
|
52
|
-
|
|
53
|
-
const widgetName = fieldDict[helper.triggerFieldWidgetName ?? ""] ?? helper.triggerFieldWidgetName;
|
|
54
|
-
|
|
55
|
-
switch (helper.triggerType) {
|
|
56
|
-
case 'form_action': {
|
|
57
|
-
const actions =
|
|
58
|
-
helper.formActionTriggerType
|
|
59
|
-
?.map((a) => FORM_ACTION_LABELS[a] || a)
|
|
60
|
-
.join('/') || '';
|
|
61
|
-
return actions ? `${formName}\n${actions}` : formName;
|
|
62
|
-
}
|
|
63
|
-
case 'form_flow_node': {
|
|
64
|
-
const nodes =
|
|
65
|
-
helper.flowNodeTriggerType
|
|
66
|
-
?.map((n) => FLOW_NODE_ACTION_LABELS[n] || n)
|
|
67
|
-
.join('/') || '';
|
|
68
|
-
return nodes ? `${formName}\n${nodes}` : formName
|
|
69
|
-
}
|
|
70
|
-
case 'form_field': {
|
|
71
|
-
return helper.triggerFieldWidgetName
|
|
72
|
-
? `${formName} / ${widgetName}`
|
|
73
|
-
: formName;
|
|
74
|
-
}
|
|
75
|
-
case 'universal':
|
|
76
|
-
return '开箱即用,无需触发';
|
|
77
|
-
case 'scheduler':
|
|
78
|
-
return '按计划时间触发';
|
|
79
|
-
default:
|
|
80
|
-
return '';
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface AgentHelperCardProps {
|
|
85
|
-
helper: IAgentHelper;
|
|
86
|
-
agentName?: string;
|
|
87
|
-
agentIcon?: string;
|
|
88
|
-
getAgent: (agentId: string) => IAgentInfo | undefined;
|
|
89
|
-
className?: string;
|
|
90
|
-
onEnabledChange?: (enabled: boolean) => void;
|
|
91
|
-
onViewLogs?: () => void;
|
|
92
|
-
onEdit?: () => void;
|
|
93
|
-
onCopy?: () => void;
|
|
94
|
-
onDelete?: () => void;
|
|
95
|
-
|
|
96
|
-
formService?: IBsFormService;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export const AgentHelperCard = ({
|
|
100
|
-
helper,
|
|
101
|
-
className,
|
|
102
|
-
onEnabledChange,
|
|
103
|
-
onViewLogs,
|
|
104
|
-
onEdit,
|
|
105
|
-
getAgent,
|
|
106
|
-
onCopy,
|
|
107
|
-
onDelete,
|
|
108
|
-
formService,
|
|
109
|
-
}: AgentHelperCardProps) => {
|
|
110
|
-
const description = useTriggerDescription(helper, formService);
|
|
111
|
-
const agent = getAgent(helper.agentId);
|
|
112
|
-
|
|
113
|
-
return (
|
|
114
|
-
<div
|
|
115
|
-
className={cn(
|
|
116
|
-
'bg-white border border-[#e0e0e0] border-solid content-stretch flex flex-col items-start rounded-[10px] w-full group min-w-[335px]',
|
|
117
|
-
className,
|
|
118
|
-
)}
|
|
119
|
-
>
|
|
120
|
-
{/* Header */}
|
|
121
|
-
<div className="grid-rows-[max-content] inline-grid leading-[0] place-items-start shrink-0 w-full">
|
|
122
|
-
<div className="col-1 content-stretch flex h-[42px] items-center justify-between ml-0 mt-0 px-[12px] row-1 w-full">
|
|
123
|
-
<div className="content-stretch flex gap-[6px] items-center shrink-0 min-w-0">
|
|
124
|
-
<TriggerTypeIcon triggerType={helper.triggerType} size={18} />
|
|
125
|
-
<p className="leading-[normal] shrink-0 text-[#030303] text-[14px] truncate">
|
|
126
|
-
{helper.helperName}
|
|
127
|
-
</p>
|
|
128
|
-
</div>
|
|
129
|
-
<div className="content-stretch flex gap-[10px] items-center opacity-0 group-hover:opacity-100 transition-opacity shrink-0">
|
|
130
|
-
{onEdit && (
|
|
131
|
-
<IconBtn icon={<EditIcon />} rounded onClick={onEdit} />
|
|
132
|
-
)}
|
|
133
|
-
{onCopy && (
|
|
134
|
-
<IconBtn icon={<CopyIcon />} rounded onClick={onCopy} />
|
|
135
|
-
)}
|
|
136
|
-
{onDelete && (
|
|
137
|
-
<IconBtn icon={<TrashIcon />} rounded onClick={onDelete} />
|
|
138
|
-
)}
|
|
139
|
-
</div>
|
|
140
|
-
</div>
|
|
141
|
-
<div className="col-1 h-0 ml-0 mt-[42px] row-1 w-full border-b border-[#e0e0e0]" />
|
|
142
|
-
</div>
|
|
143
|
-
|
|
144
|
-
{/* Content */}
|
|
145
|
-
<div className="content-stretch flex flex-col h-[172px] items-start justify-between p-[12px] shrink-0 w-full">
|
|
146
|
-
<div className="content-stretch flex flex-col gap-[6px] items-start shrink-0 text-[14px] w-full">
|
|
147
|
-
<p className="min-w-full shrink-0 text-[#666] w-[min-content]">
|
|
148
|
-
触发:
|
|
149
|
-
</p>
|
|
150
|
-
{description.split('\n').map((line, i) => (
|
|
151
|
-
<p
|
|
152
|
-
key={i}
|
|
153
|
-
className="shrink-0 text-[#030303] whitespace-nowrap overflow-hidden text-ellipsis max-w-full"
|
|
154
|
-
>
|
|
155
|
-
{line}
|
|
156
|
-
</p>
|
|
157
|
-
))}
|
|
158
|
-
</div>
|
|
159
|
-
{agent && <AgentTag agent={agent} />}
|
|
160
|
-
</div>
|
|
161
|
-
|
|
162
|
-
{/* Footer */}
|
|
163
|
-
<div className="grid-rows-[max-content] inline-grid leading-[0] place-items-start shrink-0 w-full">
|
|
164
|
-
<div className="col-1 h-0 ml-0 mt-0 row-1 w-full border-t border-[#e0e0e0]" />
|
|
165
|
-
<div className="col-1 content-stretch flex h-[42px] items-center justify-between ml-0 mt-0 px-[12px] row-1 w-full">
|
|
166
|
-
<Switch checked={helper.enabled} onCheckedChange={onEnabledChange} />
|
|
167
|
-
{onViewLogs && (
|
|
168
|
-
<button
|
|
169
|
-
className="leading-[normal] shrink-0 text-[#0265ff] text-[12px] whitespace-nowrap hover:underline"
|
|
170
|
-
onClick={onViewLogs}
|
|
171
|
-
>
|
|
172
|
-
查看执行日志
|
|
173
|
-
</button>
|
|
174
|
-
)}
|
|
175
|
-
</div>
|
|
176
|
-
</div>
|
|
177
|
-
</div>
|
|
178
|
-
);
|
|
179
|
-
};
|
|
1
|
+
import { cn } from '../../../lib/utils';
|
|
2
|
+
import { TriggerTypeIcon } from '../trigger-select';
|
|
3
|
+
import { AgentTag } from '../agent-tag';
|
|
4
|
+
import { IconBtn } from '../../icon-btn';
|
|
5
|
+
import { Switch } from '../../ui/switch';
|
|
6
|
+
import { EditIcon, CopyIcon, TrashIcon } from '../../bs-icons';
|
|
7
|
+
import type { IAgentHelper, IAgentInfo, IBsFormService, IEntry } from '@baishuyun/types';
|
|
8
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
9
|
+
|
|
10
|
+
const FORM_ACTION_LABELS: Record<string, string> = {
|
|
11
|
+
submit: '提交数据',
|
|
12
|
+
edit: '编辑数据',
|
|
13
|
+
delete: '删除数据',
|
|
14
|
+
init: '表单初始化',
|
|
15
|
+
edit_init: '表单编辑初始化',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const FLOW_NODE_ACTION_LABELS: Record<string, string> = {
|
|
19
|
+
flow_end: '流程结束',
|
|
20
|
+
flow_node: '流程节点',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
function useTriggerDescription(helper: IAgentHelper, formService?: IBsFormService): string {
|
|
24
|
+
const [entryInfo, setEntryInfo] = useState<IEntry | undefined>(undefined);
|
|
25
|
+
|
|
26
|
+
const fetchEntryInfo = async (appId: string, entryId: string) => {
|
|
27
|
+
const entryInfo = await formService?.getEntry({ appId, entryId });
|
|
28
|
+
setEntryInfo(entryInfo);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (!helper.appId || !helper.formId) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
fetchEntryInfo(helper.appId, helper.formId);
|
|
37
|
+
}, [helper.appId, helper.formId])
|
|
38
|
+
|
|
39
|
+
const formName = entryInfo ? entryInfo.name : helper.formId;
|
|
40
|
+
const fieldDict = useMemo(() => {
|
|
41
|
+
const ret: Record<string, string> = {};
|
|
42
|
+
for (const i of (entryInfo?.content?.items ?? [])) {
|
|
43
|
+
const key = i.widget?.widgetName ?? "";
|
|
44
|
+
if (!key) {
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
ret[key] = i.label;
|
|
49
|
+
}
|
|
50
|
+
return ret;
|
|
51
|
+
}, [entryInfo?.content?.items])
|
|
52
|
+
|
|
53
|
+
const widgetName = fieldDict[helper.triggerFieldWidgetName ?? ""] ?? helper.triggerFieldWidgetName;
|
|
54
|
+
|
|
55
|
+
switch (helper.triggerType) {
|
|
56
|
+
case 'form_action': {
|
|
57
|
+
const actions =
|
|
58
|
+
helper.formActionTriggerType
|
|
59
|
+
?.map((a) => FORM_ACTION_LABELS[a] || a)
|
|
60
|
+
.join('/') || '';
|
|
61
|
+
return actions ? `${formName}\n${actions}` : formName;
|
|
62
|
+
}
|
|
63
|
+
case 'form_flow_node': {
|
|
64
|
+
const nodes =
|
|
65
|
+
helper.flowNodeTriggerType
|
|
66
|
+
?.map((n) => FLOW_NODE_ACTION_LABELS[n] || n)
|
|
67
|
+
.join('/') || '';
|
|
68
|
+
return nodes ? `${formName}\n${nodes}` : formName
|
|
69
|
+
}
|
|
70
|
+
case 'form_field': {
|
|
71
|
+
return helper.triggerFieldWidgetName
|
|
72
|
+
? `${formName} / ${widgetName}`
|
|
73
|
+
: formName;
|
|
74
|
+
}
|
|
75
|
+
case 'universal':
|
|
76
|
+
return '开箱即用,无需触发';
|
|
77
|
+
case 'scheduler':
|
|
78
|
+
return '按计划时间触发';
|
|
79
|
+
default:
|
|
80
|
+
return '';
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface AgentHelperCardProps {
|
|
85
|
+
helper: IAgentHelper;
|
|
86
|
+
agentName?: string;
|
|
87
|
+
agentIcon?: string;
|
|
88
|
+
getAgent: (agentId: string) => IAgentInfo | undefined;
|
|
89
|
+
className?: string;
|
|
90
|
+
onEnabledChange?: (enabled: boolean) => void;
|
|
91
|
+
onViewLogs?: () => void;
|
|
92
|
+
onEdit?: () => void;
|
|
93
|
+
onCopy?: () => void;
|
|
94
|
+
onDelete?: () => void;
|
|
95
|
+
|
|
96
|
+
formService?: IBsFormService;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export const AgentHelperCard = ({
|
|
100
|
+
helper,
|
|
101
|
+
className,
|
|
102
|
+
onEnabledChange,
|
|
103
|
+
onViewLogs,
|
|
104
|
+
onEdit,
|
|
105
|
+
getAgent,
|
|
106
|
+
onCopy,
|
|
107
|
+
onDelete,
|
|
108
|
+
formService,
|
|
109
|
+
}: AgentHelperCardProps) => {
|
|
110
|
+
const description = useTriggerDescription(helper, formService);
|
|
111
|
+
const agent = getAgent(helper.agentId);
|
|
112
|
+
|
|
113
|
+
return (
|
|
114
|
+
<div
|
|
115
|
+
className={cn(
|
|
116
|
+
'bg-white border border-[#e0e0e0] border-solid content-stretch flex flex-col items-start rounded-[10px] w-full group min-w-[335px]',
|
|
117
|
+
className,
|
|
118
|
+
)}
|
|
119
|
+
>
|
|
120
|
+
{/* Header */}
|
|
121
|
+
<div className="grid-rows-[max-content] inline-grid leading-[0] place-items-start shrink-0 w-full">
|
|
122
|
+
<div className="col-1 content-stretch flex h-[42px] items-center justify-between ml-0 mt-0 px-[12px] row-1 w-full">
|
|
123
|
+
<div className="content-stretch flex gap-[6px] items-center shrink-0 min-w-0">
|
|
124
|
+
<TriggerTypeIcon triggerType={helper.triggerType} size={18} />
|
|
125
|
+
<p className="leading-[normal] shrink-0 text-[#030303] text-[14px] truncate">
|
|
126
|
+
{helper.helperName}
|
|
127
|
+
</p>
|
|
128
|
+
</div>
|
|
129
|
+
<div className="content-stretch flex gap-[10px] items-center opacity-0 group-hover:opacity-100 transition-opacity shrink-0">
|
|
130
|
+
{onEdit && (
|
|
131
|
+
<IconBtn icon={<EditIcon />} rounded onClick={onEdit} />
|
|
132
|
+
)}
|
|
133
|
+
{onCopy && (
|
|
134
|
+
<IconBtn icon={<CopyIcon />} rounded onClick={onCopy} />
|
|
135
|
+
)}
|
|
136
|
+
{onDelete && (
|
|
137
|
+
<IconBtn icon={<TrashIcon />} rounded onClick={onDelete} />
|
|
138
|
+
)}
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
<div className="col-1 h-0 ml-0 mt-[42px] row-1 w-full border-b border-[#e0e0e0]" />
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
{/* Content */}
|
|
145
|
+
<div className="content-stretch flex flex-col h-[172px] items-start justify-between p-[12px] shrink-0 w-full">
|
|
146
|
+
<div className="content-stretch flex flex-col gap-[6px] items-start shrink-0 text-[14px] w-full">
|
|
147
|
+
<p className="min-w-full shrink-0 text-[#666] w-[min-content]">
|
|
148
|
+
触发:
|
|
149
|
+
</p>
|
|
150
|
+
{description.split('\n').map((line, i) => (
|
|
151
|
+
<p
|
|
152
|
+
key={i}
|
|
153
|
+
className="shrink-0 text-[#030303] whitespace-nowrap overflow-hidden text-ellipsis max-w-full"
|
|
154
|
+
>
|
|
155
|
+
{line}
|
|
156
|
+
</p>
|
|
157
|
+
))}
|
|
158
|
+
</div>
|
|
159
|
+
{agent && <AgentTag agent={agent} />}
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
{/* Footer */}
|
|
163
|
+
<div className="grid-rows-[max-content] inline-grid leading-[0] place-items-start shrink-0 w-full">
|
|
164
|
+
<div className="col-1 h-0 ml-0 mt-0 row-1 w-full border-t border-[#e0e0e0]" />
|
|
165
|
+
<div className="col-1 content-stretch flex h-[42px] items-center justify-between ml-0 mt-0 px-[12px] row-1 w-full">
|
|
166
|
+
<Switch checked={helper.enabled} onCheckedChange={onEnabledChange} />
|
|
167
|
+
{onViewLogs && (
|
|
168
|
+
<button
|
|
169
|
+
className="leading-[normal] shrink-0 text-[#0265ff] text-[12px] whitespace-nowrap hover:underline"
|
|
170
|
+
onClick={onViewLogs}
|
|
171
|
+
>
|
|
172
|
+
查看执行日志
|
|
173
|
+
</button>
|
|
174
|
+
)}
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
);
|
|
179
|
+
};
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { cn } from '../../../lib/utils';
|
|
2
|
-
import { AgentHelperCard } from '../agent-helper-card';
|
|
3
|
-
import type { IAgentHelper, IAgentInfo, IBsFormService } from '@baishuyun/types';
|
|
4
|
-
|
|
5
|
-
export interface AgentHelperCardListProps {
|
|
6
|
-
items: Array<IAgentHelper>;
|
|
7
|
-
className?: string;
|
|
8
|
-
getAgentName?: (agentId: string) => string | undefined;
|
|
9
|
-
getAgentIcon?: (agentId: string) => string | undefined;
|
|
10
|
-
getAgent: (agentId: string) => (IAgentInfo | undefined);
|
|
11
|
-
onEnabledChange?: (helperId: string, enabled: boolean) => void;
|
|
12
|
-
onViewLogs?: (helperId: string) => void;
|
|
13
|
-
onEdit?: (helperId: string) => void;
|
|
14
|
-
onCopy?: (helperId: string) => void;
|
|
15
|
-
onDelete?: (helperId: string) => void;
|
|
16
|
-
formService?: IBsFormService;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const AgentHelperCardList = ({
|
|
20
|
-
items,
|
|
21
|
-
className,
|
|
22
|
-
getAgent,
|
|
23
|
-
onEnabledChange,
|
|
24
|
-
onViewLogs,
|
|
25
|
-
onEdit,
|
|
26
|
-
onCopy,
|
|
27
|
-
onDelete,
|
|
28
|
-
formService,
|
|
29
|
-
}: AgentHelperCardListProps) => {
|
|
30
|
-
return (
|
|
31
|
-
<div
|
|
32
|
-
className={cn(
|
|
33
|
-
'content-start flex flex-wrap gap-[20px] items-start',
|
|
34
|
-
className,
|
|
35
|
-
)}
|
|
36
|
-
>
|
|
37
|
-
{items.map((helper) => (
|
|
38
|
-
<AgentHelperCard
|
|
39
|
-
formService={formService}
|
|
40
|
-
key={helper.id}
|
|
41
|
-
helper={helper}
|
|
42
|
-
getAgent={getAgent}
|
|
43
|
-
className="w-[335px] shrink-0"
|
|
44
|
-
onEnabledChange={
|
|
45
|
-
onEnabledChange
|
|
46
|
-
? (enabled) => onEnabledChange(helper.id, enabled)
|
|
47
|
-
: undefined
|
|
48
|
-
}
|
|
49
|
-
onViewLogs={
|
|
50
|
-
onViewLogs ? () => onViewLogs(helper.id) : undefined
|
|
51
|
-
}
|
|
52
|
-
onEdit={onEdit ? () => onEdit(helper.id) : undefined}
|
|
53
|
-
onCopy={onCopy ? () => onCopy(helper.id) : undefined}
|
|
54
|
-
onDelete={onDelete ? () => onDelete(helper.id) : undefined}
|
|
55
|
-
/>
|
|
56
|
-
))}
|
|
57
|
-
</div>
|
|
58
|
-
);
|
|
59
|
-
};
|
|
1
|
+
import { cn } from '../../../lib/utils';
|
|
2
|
+
import { AgentHelperCard } from '../agent-helper-card';
|
|
3
|
+
import type { IAgentHelper, IAgentInfo, IBsFormService } from '@baishuyun/types';
|
|
4
|
+
|
|
5
|
+
export interface AgentHelperCardListProps {
|
|
6
|
+
items: Array<IAgentHelper>;
|
|
7
|
+
className?: string;
|
|
8
|
+
getAgentName?: (agentId: string) => string | undefined;
|
|
9
|
+
getAgentIcon?: (agentId: string) => string | undefined;
|
|
10
|
+
getAgent: (agentId: string) => (IAgentInfo | undefined);
|
|
11
|
+
onEnabledChange?: (helperId: string, enabled: boolean) => void;
|
|
12
|
+
onViewLogs?: (helperId: string) => void;
|
|
13
|
+
onEdit?: (helperId: string) => void;
|
|
14
|
+
onCopy?: (helperId: string) => void;
|
|
15
|
+
onDelete?: (helperId: string) => void;
|
|
16
|
+
formService?: IBsFormService;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const AgentHelperCardList = ({
|
|
20
|
+
items,
|
|
21
|
+
className,
|
|
22
|
+
getAgent,
|
|
23
|
+
onEnabledChange,
|
|
24
|
+
onViewLogs,
|
|
25
|
+
onEdit,
|
|
26
|
+
onCopy,
|
|
27
|
+
onDelete,
|
|
28
|
+
formService,
|
|
29
|
+
}: AgentHelperCardListProps) => {
|
|
30
|
+
return (
|
|
31
|
+
<div
|
|
32
|
+
className={cn(
|
|
33
|
+
'content-start flex flex-wrap gap-[20px] items-start',
|
|
34
|
+
className,
|
|
35
|
+
)}
|
|
36
|
+
>
|
|
37
|
+
{items.map((helper) => (
|
|
38
|
+
<AgentHelperCard
|
|
39
|
+
formService={formService}
|
|
40
|
+
key={helper.id}
|
|
41
|
+
helper={helper}
|
|
42
|
+
getAgent={getAgent}
|
|
43
|
+
className="w-[335px] shrink-0"
|
|
44
|
+
onEnabledChange={
|
|
45
|
+
onEnabledChange
|
|
46
|
+
? (enabled) => onEnabledChange(helper.id, enabled)
|
|
47
|
+
: undefined
|
|
48
|
+
}
|
|
49
|
+
onViewLogs={
|
|
50
|
+
onViewLogs ? () => onViewLogs(helper.id) : undefined
|
|
51
|
+
}
|
|
52
|
+
onEdit={onEdit ? () => onEdit(helper.id) : undefined}
|
|
53
|
+
onCopy={onCopy ? () => onCopy(helper.id) : undefined}
|
|
54
|
+
onDelete={onDelete ? () => onDelete(helper.id) : undefined}
|
|
55
|
+
/>
|
|
56
|
+
))}
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { cn } from '../../../lib/utils';
|
|
3
|
-
|
|
4
|
-
export interface IAgentHelperMainLayoutProps {
|
|
5
|
-
className?: string;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const AgentHelperMainLayout = ({ className, children }: IAgentHelperMainLayoutProps) => {
|
|
10
|
-
return (
|
|
11
|
-
<div className={cn('flex flex-col h-full w-full', className)}>
|
|
12
|
-
{children}
|
|
13
|
-
</div>
|
|
14
|
-
);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
interface ISlotProps {
|
|
18
|
-
className?: string;
|
|
19
|
-
children?: React.ReactNode;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const TopBar = ({ className, children }: ISlotProps) => {
|
|
23
|
-
return (
|
|
24
|
-
<div className={cn('h-[52px] shrink-0 bg-white border-b border-[#E0E0E0] flex items-center', className)}>
|
|
25
|
-
{children}
|
|
26
|
-
</div>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
TopBar.displayName = 'AgentHelperMainLayout.TopBar';
|
|
30
|
-
AgentHelperMainLayout.TopBar = TopBar;
|
|
31
|
-
|
|
32
|
-
const Main = ({ className, children }: ISlotProps) => {
|
|
33
|
-
return (
|
|
34
|
-
<div className={cn('flex flex-1 min-h-0', className)}>
|
|
35
|
-
{children}
|
|
36
|
-
</div>
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
Main.displayName = 'AgentHelperMainLayout.Main';
|
|
40
|
-
AgentHelperMainLayout.Main = Main;
|
|
41
|
-
|
|
42
|
-
const SideBar = ({ className, children }: ISlotProps) => {
|
|
43
|
-
return (
|
|
44
|
-
<div className={cn('w-[280px] shrink-0 bg-white border-r border-[#E0E0E0] flex flex-col', className)}>
|
|
45
|
-
{children}
|
|
46
|
-
</div>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
SideBar.displayName = 'AgentHelperMainLayout.SideBar';
|
|
50
|
-
AgentHelperMainLayout.SideBar = SideBar;
|
|
51
|
-
|
|
52
|
-
const Content = ({ className, children }: ISlotProps) => {
|
|
53
|
-
return (
|
|
54
|
-
<div className={cn('flex-1 min-w-0 bg-[#F5F7FA] overflow-auto', className)}>
|
|
55
|
-
{children}
|
|
56
|
-
</div>
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
Content.displayName = 'AgentHelperMainLayout.Content';
|
|
60
|
-
AgentHelperMainLayout.Content = Content;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { cn } from '../../../lib/utils';
|
|
3
|
+
|
|
4
|
+
export interface IAgentHelperMainLayoutProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const AgentHelperMainLayout = ({ className, children }: IAgentHelperMainLayoutProps) => {
|
|
10
|
+
return (
|
|
11
|
+
<div className={cn('flex flex-col h-full w-full', className)}>
|
|
12
|
+
{children}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
interface ISlotProps {
|
|
18
|
+
className?: string;
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const TopBar = ({ className, children }: ISlotProps) => {
|
|
23
|
+
return (
|
|
24
|
+
<div className={cn('h-[52px] shrink-0 bg-white border-b border-[#E0E0E0] flex items-center', className)}>
|
|
25
|
+
{children}
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
TopBar.displayName = 'AgentHelperMainLayout.TopBar';
|
|
30
|
+
AgentHelperMainLayout.TopBar = TopBar;
|
|
31
|
+
|
|
32
|
+
const Main = ({ className, children }: ISlotProps) => {
|
|
33
|
+
return (
|
|
34
|
+
<div className={cn('flex flex-1 min-h-0', className)}>
|
|
35
|
+
{children}
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
Main.displayName = 'AgentHelperMainLayout.Main';
|
|
40
|
+
AgentHelperMainLayout.Main = Main;
|
|
41
|
+
|
|
42
|
+
const SideBar = ({ className, children }: ISlotProps) => {
|
|
43
|
+
return (
|
|
44
|
+
<div className={cn('w-[280px] shrink-0 bg-white border-r border-[#E0E0E0] flex flex-col', className)}>
|
|
45
|
+
{children}
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
SideBar.displayName = 'AgentHelperMainLayout.SideBar';
|
|
50
|
+
AgentHelperMainLayout.SideBar = SideBar;
|
|
51
|
+
|
|
52
|
+
const Content = ({ className, children }: ISlotProps) => {
|
|
53
|
+
return (
|
|
54
|
+
<div className={cn('flex-1 min-w-0 bg-[#F5F7FA] overflow-auto', className)}>
|
|
55
|
+
{children}
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
Content.displayName = 'AgentHelperMainLayout.Content';
|
|
60
|
+
AgentHelperMainLayout.Content = Content;
|