vue-agent-start 0.1.0
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/package.json +30 -0
- package/pnpm-workspace.yaml +3 -0
- package/src/agent-flow/adapter/backend.ts +99 -0
- package/src/agent-flow/components/ChatIframePanel.vue +773 -0
- package/src/agent-flow/components/DatasetItemCard.vue +313 -0
- package/src/agent-flow/components/MemoryWindow.vue +104 -0
- package/src/agent-flow/components/PromptEditor.vue +804 -0
- package/src/agent-flow/components/PromptEditorTagPanel.vue +460 -0
- package/src/agent-flow/components/SvgIcon.vue +32 -0
- package/src/agent-flow/components/ToolItemCard.vue +169 -0
- package/src/agent-flow/components/VariableCard.vue +161 -0
- package/src/agent-flow/components/VariableSelector.vue +162 -0
- package/src/agent-flow/components/chat-iframe-types.ts +35 -0
- package/src/agent-flow/components/stubs/DatasetChooser.vue +70 -0
- package/src/agent-flow/components/stubs/Embedding.vue +22 -0
- package/src/agent-flow/components/stubs/ModelSelect.vue +24 -0
- package/src/agent-flow/components/stubs/RestfulSelectCard.vue +24 -0
- package/src/agent-flow/components/stubs/ToolChooser.vue +96 -0
- package/src/agent-flow/components/stubs/TriggersItemCard.vue +126 -0
- package/src/agent-flow/components/stubs/VariableModal.vue +115 -0
- package/src/agent-flow/index.ts +73 -0
- package/src/agent-flow/stores/workflow.ts +72 -0
- package/src/agent-flow/utils/langUtils.ts +173 -0
- package/src/agent-flow/workflow/Ability.vue +65 -0
- package/src/agent-flow/workflow/AuthorizationItem.vue +101 -0
- package/src/agent-flow/workflow/ConversationVar.vue +42 -0
- package/src/agent-flow/workflow/CustomEdge.vue +94 -0
- package/src/agent-flow/workflow/EnvironmentVar.vue +40 -0
- package/src/agent-flow/workflow/FlowDesigner.vue +2802 -0
- package/src/agent-flow/workflow/Icon.vue +179 -0
- package/src/agent-flow/workflow/NodeConfig.vue +509 -0
- package/src/agent-flow/workflow/NodeConfigCard.vue +460 -0
- package/src/agent-flow/workflow/NodeHandle.vue +147 -0
- package/src/agent-flow/workflow/NodeHeaderToolbar.vue +77 -0
- package/src/agent-flow/workflow/NodeHoverToolbar.vue +176 -0
- package/src/agent-flow/workflow/OutputItemCard.vue +668 -0
- package/src/agent-flow/workflow/ParamTableItem.vue +200 -0
- package/src/agent-flow/workflow/StructTable.vue +202 -0
- package/src/agent-flow/workflow/VarInsertField.vue +517 -0
- package/src/agent-flow/workflow/VarSelectField.vue +223 -0
- package/src/agent-flow/workflow/VariableSelectorItem.vue +48 -0
- package/src/agent-flow/workflow/WfField.vue +206 -0
- package/src/agent-flow/workflow/_config-base.css +470 -0
- package/src/agent-flow/workflow/composables/useNode.js +55 -0
- package/src/agent-flow/workflow/index.vue +53 -0
- package/src/agent-flow/workflow/nodeCard/AgentNodeCard.vue +180 -0
- package/src/agent-flow/workflow/nodeCard/AnswerNodeCard.vue +65 -0
- package/src/agent-flow/workflow/nodeCard/ClassifierCard.vue +152 -0
- package/src/agent-flow/workflow/nodeCard/CodeNodeCard.vue +139 -0
- package/src/agent-flow/workflow/nodeCard/ConditionNodeCard.vue +323 -0
- package/src/agent-flow/workflow/nodeCard/DocumentExtractorCard.vue +83 -0
- package/src/agent-flow/workflow/nodeCard/EndNodeCard.vue +123 -0
- package/src/agent-flow/workflow/nodeCard/HttpNodeCard.vue +451 -0
- package/src/agent-flow/workflow/nodeCard/HumanInputCard.vue +152 -0
- package/src/agent-flow/workflow/nodeCard/IterationCard.vue +66 -0
- package/src/agent-flow/workflow/nodeCard/KnowledgeRetrievalCard.vue +48 -0
- package/src/agent-flow/workflow/nodeCard/LLMNodeCard.vue +206 -0
- package/src/agent-flow/workflow/nodeCard/ListOperatorCard.vue +188 -0
- package/src/agent-flow/workflow/nodeCard/ParameterExtractorCard.vue +352 -0
- package/src/agent-flow/workflow/nodeCard/ServiceApiNodeCard.vue +188 -0
- package/src/agent-flow/workflow/nodeCard/StartNodeCard.vue +216 -0
- package/src/agent-flow/workflow/nodeCard/VariableAssignerCard.vue +125 -0
- package/src/agent-flow/workflow/nodeCard/VariableNodeCard.vue +121 -0
- package/src/agent-flow/workflow/nodes/AgentNode.vue +122 -0
- package/src/agent-flow/workflow/nodes/AnswerNode.vue +99 -0
- package/src/agent-flow/workflow/nodes/ClassifierNode.vue +199 -0
- package/src/agent-flow/workflow/nodes/CodeNode.vue +152 -0
- package/src/agent-flow/workflow/nodes/ConditionNode.vue +232 -0
- package/src/agent-flow/workflow/nodes/DocumentExtractorNode.vue +96 -0
- package/src/agent-flow/workflow/nodes/EndNode.vue +119 -0
- package/src/agent-flow/workflow/nodes/FileUploadNode.vue +97 -0
- package/src/agent-flow/workflow/nodes/HttpNode.vue +204 -0
- package/src/agent-flow/workflow/nodes/HumanInputNode.vue +110 -0
- package/src/agent-flow/workflow/nodes/IterationNode.vue +98 -0
- package/src/agent-flow/workflow/nodes/KnowledgeRetrievalNode.vue +253 -0
- package/src/agent-flow/workflow/nodes/LLMNode.vue +134 -0
- package/src/agent-flow/workflow/nodes/ListOperatorNode.vue +111 -0
- package/src/agent-flow/workflow/nodes/LoopNode.vue +94 -0
- package/src/agent-flow/workflow/nodes/ParameterExtractorNode.vue +147 -0
- package/src/agent-flow/workflow/nodes/ServiceApiNode.vue +161 -0
- package/src/agent-flow/workflow/nodes/StartNode.vue +199 -0
- package/src/agent-flow/workflow/nodes/TemplateNode.vue +103 -0
- package/src/agent-flow/workflow/nodes/UserInputNode.vue +92 -0
- package/src/agent-flow/workflow/nodes/VariableAssignerNode.vue +145 -0
- package/src/agent-flow/workflow/nodes/VariableNode.vue +130 -0
- package/src/agent-flow/workflow/nodes/_node-base.css +338 -0
- package/src/agent-flow/workflow/utils/node_card_form.ts +335 -0
- package/src/agent-flow/workflow/utils/node_config.ts +63 -0
- package/src/agent-flow/workflow/utils/workflow_utils.ts +151 -0
- package/src/agent-studio/adapters/springAgentStart.ts +390 -0
- package/src/agent-studio/api/index.ts +1 -0
- package/src/agent-studio/api/types.ts +173 -0
- package/src/agent-studio/components/AgentApiDocs.vue +500 -0
- package/src/agent-studio/components/AgentAppsPage.vue +1601 -0
- package/src/agent-studio/components/AgentCardGrid.vue +259 -0
- package/src/agent-studio/components/AgentChatPage.vue +553 -0
- package/src/agent-studio/components/AgentDebugPanel.vue +350 -0
- package/src/agent-studio/components/AgentLogsPanel.vue +391 -0
- package/src/agent-studio/components/AgentMonitorPanel.vue +204 -0
- package/src/agent-studio/components/AgentOrchestrate.vue +505 -0
- package/src/agent-studio/components/AgentPromptEditor.vue +237 -0
- package/src/agent-studio/components/AgentStudioShell.vue +227 -0
- package/src/agent-studio/components/AgentToolsPanel.vue +394 -0
- package/src/agent-studio/components/AgentVariablesPanel.vue +205 -0
- package/src/agent-studio/components/ApiKeyManager.vue +251 -0
- package/src/agent-studio/components/AppDesignDrawer.vue +3391 -0
- package/src/agent-studio/components/CreateAppModal.vue +737 -0
- package/src/agent-studio/components/SparkChart.vue +200 -0
- package/src/agent-studio/components/VariableEditorModal.vue +499 -0
- package/src/agent-studio/composables/useAgentStudio.ts +347 -0
- package/src/agent-studio/index.ts +60 -0
- package/src/agent-studio/panels/DrawerFlowDesigner.vue +203 -0
- package/src/agent-studio/panels/LogAnnotationPanel.vue +490 -0
- package/src/agent-studio/panels/MonitorPanel.vue +535 -0
- package/src/agent-studio/types.ts +242 -0
- package/src/index.ts +155 -0
- package/src/knowledge-hub/adapters/springAgentStart.ts +472 -0
- package/src/knowledge-hub/components/AddDocumentsWizard.vue +1452 -0
- package/src/knowledge-hub/components/CreateDatasetWizard.vue +1723 -0
- package/src/knowledge-hub/components/DatasetCardGrid.vue +467 -0
- package/src/knowledge-hub/components/DatasetDetailDrawer.vue +888 -0
- package/src/knowledge-hub/components/DatasetPicker.vue +65 -0
- package/src/knowledge-hub/components/DatasetPickerModal.vue +526 -0
- package/src/knowledge-hub/components/DatasetSettingsPanel.vue +908 -0
- package/src/knowledge-hub/components/DatasetSidebar.vue +781 -0
- package/src/knowledge-hub/components/DocumentChunksView.vue +802 -0
- package/src/knowledge-hub/components/DocumentTable.vue +552 -0
- package/src/knowledge-hub/components/HitTestingPanel.vue +74 -0
- package/src/knowledge-hub/components/KnowledgeApp.vue +66 -0
- package/src/knowledge-hub/components/KnowledgeHubApp.vue +504 -0
- package/src/knowledge-hub/components/RecallTestingPanelV2.vue +515 -0
- package/src/knowledge-hub/components/RetrievalConfigPopover.vue +270 -0
- package/src/knowledge-hub/components/RetrievalMethodPicker.vue +547 -0
- package/src/knowledge-hub/components/RetrievedList.vue +24 -0
- package/src/knowledge-hub/components/internal/KhDialog.vue +195 -0
- package/src/knowledge-hub/composables/useKnowledge.ts +89 -0
- package/src/knowledge-hub/i18n/index.ts +2 -0
- package/src/knowledge-hub/i18n/messages.ts +422 -0
- package/src/knowledge-hub/i18n/useKhI18n.ts +107 -0
- package/src/knowledge-hub/index.ts +46 -0
- package/src/knowledge-hub/styles/index.css +4 -0
- package/src/knowledge-hub/styles/tokens.css +138 -0
- package/src/knowledge-hub/types/api.ts +213 -0
- package/src/knowledge-hub/types/dataset.ts +88 -0
- package/src/knowledge-hub/types/document.ts +45 -0
- package/src/knowledge-hub/types/index.ts +9 -0
- package/src/knowledge-hub/types/retrieval.ts +46 -0
- package/src/provider-hub/components/CredentialForm.vue +103 -0
- package/src/provider-hub/components/DefaultModelsPanel.vue +270 -0
- package/src/provider-hub/components/GroupedModelSelect.vue +445 -0
- package/src/provider-hub/components/ModelCardGrid.vue +332 -0
- package/src/provider-hub/components/ModelParameterDrawer.vue +739 -0
- package/src/provider-hub/components/ModelPickerPopover.vue +1282 -0
- package/src/provider-hub/components/ProviderApp.vue +159 -0
- package/src/provider-hub/components/ProviderCredentialModal.vue +321 -0
- package/src/provider-hub/components/ProviderGallery.vue +131 -0
- package/src/provider-hub/components/ProviderHubShell.vue +1992 -0
- package/src/provider-hub/components/ProviderIcon.vue +130 -0
- package/src/provider-hub/composables/useProviderHub.ts +358 -0
- package/src/provider-hub/index.ts +43 -0
- package/src/provider-hub/svg/MiniMax.svg +1 -0
- package/src/provider-hub/svg/Volcengine.svg +1 -0
- package/src/provider-hub/svg/Zhipu.svg +1 -0
- package/src/provider-hub/svg/deepseek.svg +1 -0
- package/src/provider-hub/svg/moonshot.svg +1 -0
- package/src/provider-hub/svg/openai.svg +1 -0
- package/src/provider-hub/svg/qwen.svg +1 -0
- package/src/provider-hub/svg/siliconflow.svg +1 -0
- package/src/provider-hub/types.ts +256 -0
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
/* =========================================================
|
|
2
|
+
* agent-flow · 配置面板通用样式
|
|
3
|
+
* 由 NodeConfigCard.vue 顶部一次性引入,各 nodeCard/*.vue
|
|
4
|
+
* 直接用这里定义的 class 名(wf-config-*)+ 兼容层 utility。
|
|
5
|
+
*
|
|
6
|
+
* 兼容层:src/components/* 里遗留了 Tailwind 类(flex / gap-2 /
|
|
7
|
+
* mb-4 / p-2 ...),本文件在无 Tailwind 时兜底提供最低限度的样式,
|
|
8
|
+
* 避免面板视觉塌陷。nodeCards 已经全部去 Tailwind 化。
|
|
9
|
+
* ========================================================= */
|
|
10
|
+
|
|
11
|
+
/* -------- 配置面板结构 -------- */
|
|
12
|
+
.wf-config-panel {
|
|
13
|
+
position: relative;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
height: 100%;
|
|
17
|
+
background: #ffffff;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
font-size: 13px;
|
|
20
|
+
color: #1f2937;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.wf-config-header {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
gap: 10px;
|
|
27
|
+
padding: 10px 14px;
|
|
28
|
+
background: #ffffff;
|
|
29
|
+
border-bottom: 1px solid #e5e7eb;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.wf-config-header-icon {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
flex: none;
|
|
37
|
+
width: 28px;
|
|
38
|
+
height: 28px;
|
|
39
|
+
color: #ffffff;
|
|
40
|
+
background: var(--wf-accent, #6b7280);
|
|
41
|
+
border-radius: 6px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.wf-config-header-icon svg,
|
|
45
|
+
.wf-config-header-icon :deep(.icon) {
|
|
46
|
+
width: 16px;
|
|
47
|
+
height: 16px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.wf-config-header-title-input {
|
|
51
|
+
flex: 1;
|
|
52
|
+
min-width: 0;
|
|
53
|
+
padding: 2px 4px !important;
|
|
54
|
+
font-size: 14px !important;
|
|
55
|
+
font-weight: 600 !important;
|
|
56
|
+
color: #1f2937;
|
|
57
|
+
background: transparent !important;
|
|
58
|
+
border-radius: 4px !important;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.wf-config-header-title-input:hover {
|
|
62
|
+
background: #f3f4f6 !important;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.wf-config-header-actions {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
gap: 4px;
|
|
69
|
+
color: #6b7280;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.wf-config-desc {
|
|
73
|
+
padding: 8px 16px;
|
|
74
|
+
background: #ffffff;
|
|
75
|
+
border-bottom: 1px solid #f0f0f0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.wf-config-desc :deep(.ant-input) {
|
|
79
|
+
font-size: 12px !important;
|
|
80
|
+
color: #6b7280 !important;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.wf-config-body {
|
|
84
|
+
flex: 1;
|
|
85
|
+
min-height: 0;
|
|
86
|
+
padding: 8px 10px 12px;
|
|
87
|
+
overflow-y: auto;
|
|
88
|
+
background: #f6f7f9;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* 配置面板体内的滚动条 */
|
|
92
|
+
.wf-config-body::-webkit-scrollbar {
|
|
93
|
+
width: 6px;
|
|
94
|
+
}
|
|
95
|
+
.wf-config-body::-webkit-scrollbar-track {
|
|
96
|
+
background: transparent;
|
|
97
|
+
}
|
|
98
|
+
.wf-config-body::-webkit-scrollbar-thumb {
|
|
99
|
+
background: #d1d5db;
|
|
100
|
+
border-radius: 3px;
|
|
101
|
+
}
|
|
102
|
+
.wf-config-body::-webkit-scrollbar-thumb:hover {
|
|
103
|
+
background: #9ca3af;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* -------- 表单节段(各 nodeCard 内部划分) -------- */
|
|
107
|
+
.wf-config-section {
|
|
108
|
+
padding: 12px 14px;
|
|
109
|
+
margin-bottom: 10px;
|
|
110
|
+
background: #ffffff;
|
|
111
|
+
border: 1px solid #eef0f3;
|
|
112
|
+
border-radius: 8px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.wf-config-section:last-child {
|
|
116
|
+
margin-bottom: 0;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* 独立的 PromptEditor 作为单个 section(不用 wf-config-section 包一层);
|
|
120
|
+
* PromptEditor 自带 toolbar 和边框,外层再包 section 会视觉重叠 */
|
|
121
|
+
.wf-config-prompt {
|
|
122
|
+
margin-bottom: 10px;
|
|
123
|
+
}
|
|
124
|
+
.wf-config-prompt:last-child {
|
|
125
|
+
margin-bottom: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.wf-config-section-title {
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
gap: 6px;
|
|
132
|
+
margin-bottom: 6px;
|
|
133
|
+
font-size: 12px;
|
|
134
|
+
font-weight: 600;
|
|
135
|
+
color: #1f2937;
|
|
136
|
+
letter-spacing: 0.2px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.wf-config-field {
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-direction: column;
|
|
142
|
+
gap: 4px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.wf-config-field + .wf-config-field {
|
|
146
|
+
margin-top: 10px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.wf-config-label {
|
|
150
|
+
font-size: 11px;
|
|
151
|
+
font-weight: 500;
|
|
152
|
+
color: #4b5563;
|
|
153
|
+
line-height: 1.4;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.wf-config-hint {
|
|
157
|
+
margin-top: 3px;
|
|
158
|
+
font-size: 11px;
|
|
159
|
+
line-height: 1.5;
|
|
160
|
+
color: #9ca3af;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.wf-config-hint code {
|
|
164
|
+
padding: 0 4px;
|
|
165
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
166
|
+
font-size: 10px;
|
|
167
|
+
color: #4338ca;
|
|
168
|
+
background: #eef2ff;
|
|
169
|
+
border-radius: 3px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* -------- 配置面板内的 antd 组件视觉统一 -------- */
|
|
173
|
+
.wf-config-body :deep(.ant-input),
|
|
174
|
+
.wf-config-body :deep(.ant-input-number),
|
|
175
|
+
.wf-config-body :deep(.ant-input-affix-wrapper),
|
|
176
|
+
.wf-config-body :deep(.ant-select .ant-select-selector),
|
|
177
|
+
.wf-config-body :deep(.ant-picker) {
|
|
178
|
+
border-radius: 6px !important;
|
|
179
|
+
transition: border-color 0.15s, box-shadow 0.15s;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.wf-config-body :deep(.ant-input:hover),
|
|
183
|
+
.wf-config-body :deep(.ant-input-number:hover),
|
|
184
|
+
.wf-config-body :deep(.ant-input-affix-wrapper:hover),
|
|
185
|
+
.wf-config-body :deep(.ant-select:hover .ant-select-selector),
|
|
186
|
+
.wf-config-body :deep(.ant-picker:hover) {
|
|
187
|
+
border-color: var(--wf-accent, #6366f1) !important;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.wf-config-body :deep(.ant-input:focus),
|
|
191
|
+
.wf-config-body :deep(.ant-input-focused),
|
|
192
|
+
.wf-config-body :deep(.ant-input-affix-wrapper-focused),
|
|
193
|
+
.wf-config-body :deep(.ant-select-focused .ant-select-selector),
|
|
194
|
+
.wf-config-body :deep(.ant-picker-focused) {
|
|
195
|
+
border-color: var(--wf-accent, #6366f1) !important;
|
|
196
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--wf-accent, #6366f1) 15%, transparent) !important;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* 更紧凑的默认高度:接近 Dify 的紧凑表单感 */
|
|
200
|
+
.wf-config-body :deep(.ant-input:not(.ant-input-sm):not(.ant-input-lg)),
|
|
201
|
+
.wf-config-body :deep(.ant-input-number:not(.ant-input-number-sm)) {
|
|
202
|
+
padding: 3px 8px;
|
|
203
|
+
font-size: 12px;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.wf-config-body :deep(.ant-input-affix-wrapper:not(.ant-input-affix-wrapper-sm)) {
|
|
207
|
+
padding: 3px 8px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.wf-config-body :deep(.ant-input-affix-wrapper .ant-input) {
|
|
211
|
+
padding: 0;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.wf-config-body :deep(.ant-select:not(.ant-select-sm) .ant-select-selector) {
|
|
215
|
+
height: 28px;
|
|
216
|
+
padding: 0 8px;
|
|
217
|
+
font-size: 12px;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.wf-config-body :deep(.ant-select-single .ant-select-selector .ant-select-selection-item),
|
|
221
|
+
.wf-config-body :deep(.ant-select-single .ant-select-selector .ant-select-selection-placeholder) {
|
|
222
|
+
line-height: 26px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.wf-config-body :deep(.ant-input-number-input) {
|
|
226
|
+
height: 26px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.wf-config-body :deep(.ant-btn) {
|
|
230
|
+
border-radius: 6px;
|
|
231
|
+
font-size: 12px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.wf-config-body :deep(.ant-btn:not(.ant-btn-sm):not(.ant-btn-lg)) {
|
|
235
|
+
height: 28px;
|
|
236
|
+
padding: 0 10px;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.wf-config-body :deep(.ant-btn-primary) {
|
|
240
|
+
background: var(--wf-accent, #6366f1);
|
|
241
|
+
border-color: var(--wf-accent, #6366f1);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.wf-config-body :deep(.ant-btn-primary:hover) {
|
|
245
|
+
background: var(--wf-accent-hover, #4f46e5) !important;
|
|
246
|
+
border-color: var(--wf-accent-hover, #4f46e5) !important;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.wf-config-body :deep(.ant-btn-link) {
|
|
250
|
+
padding: 0 6px;
|
|
251
|
+
height: auto;
|
|
252
|
+
color: var(--wf-accent, #6366f1);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.wf-config-body :deep(.ant-collapse-ghost > .ant-collapse-item) {
|
|
256
|
+
border-bottom: 0;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.wf-config-body :deep(.ant-collapse-ghost > .ant-collapse-item > .ant-collapse-header) {
|
|
260
|
+
padding: 6px 0 !important;
|
|
261
|
+
font-size: 12px;
|
|
262
|
+
color: #4b5563;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.wf-config-body :deep(.ant-collapse-ghost > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box) {
|
|
266
|
+
padding: 4px 0 8px !important;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.wf-config-body :deep(.ant-tag) {
|
|
270
|
+
margin: 0;
|
|
271
|
+
border-radius: 4px;
|
|
272
|
+
font-size: 11px;
|
|
273
|
+
line-height: 18px;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* Popover 里的模型选择器 */
|
|
277
|
+
.wf-config-body :deep(.ant-switch) {
|
|
278
|
+
min-width: 32px;
|
|
279
|
+
height: 18px;
|
|
280
|
+
line-height: 18px;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.wf-config-body :deep(.ant-switch-small) {
|
|
284
|
+
min-width: 28px;
|
|
285
|
+
height: 16px;
|
|
286
|
+
line-height: 16px;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.wf-config-body :deep(.ant-slider) {
|
|
290
|
+
margin: 6px 6px;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* Popover / 上下文菜单 —— NodeConfigCard header 的 ellipsis 菜单 */
|
|
294
|
+
.wf-config-menu-overlay .ant-popover-inner-content {
|
|
295
|
+
padding: 4px !important;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.wf-config-menu {
|
|
299
|
+
min-width: 200px;
|
|
300
|
+
display: flex;
|
|
301
|
+
flex-direction: column;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.wf-config-menu-item {
|
|
305
|
+
display: flex;
|
|
306
|
+
align-items: center;
|
|
307
|
+
gap: 8px;
|
|
308
|
+
padding: 6px 10px;
|
|
309
|
+
font-size: 12px;
|
|
310
|
+
color: #1f2937;
|
|
311
|
+
border-radius: 4px;
|
|
312
|
+
cursor: pointer;
|
|
313
|
+
transition: background 0.15s;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.wf-config-menu-item:hover {
|
|
317
|
+
background: #eef2ff;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.wf-config-menu-item-danger {
|
|
321
|
+
color: #dc2626;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.wf-config-menu-item-danger:hover {
|
|
325
|
+
background: #fef2f2;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.wf-config-menu-icon {
|
|
329
|
+
font-size: 13px;
|
|
330
|
+
color: #6b7280;
|
|
331
|
+
flex: none;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.wf-config-menu-item-danger .wf-config-menu-icon {
|
|
335
|
+
color: #dc2626;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.wf-config-menu-item .wf-config-menu-shortcut {
|
|
339
|
+
margin-left: auto;
|
|
340
|
+
color: #9ca3af;
|
|
341
|
+
font-size: 11px;
|
|
342
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.wf-config-menu-divider {
|
|
346
|
+
height: 1px;
|
|
347
|
+
margin: 2px 0;
|
|
348
|
+
background: #f3f4f6;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/* Header 右上角小按钮:与菜单/关闭统一样式 */
|
|
352
|
+
.wf-config-header-btn {
|
|
353
|
+
display: inline-flex;
|
|
354
|
+
align-items: center;
|
|
355
|
+
justify-content: center;
|
|
356
|
+
width: 24px;
|
|
357
|
+
height: 24px;
|
|
358
|
+
color: #6b7280;
|
|
359
|
+
background: transparent;
|
|
360
|
+
border: none;
|
|
361
|
+
border-radius: 4px;
|
|
362
|
+
cursor: pointer;
|
|
363
|
+
font-size: 14px;
|
|
364
|
+
transition: background 0.15s, color 0.15s;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.wf-config-header-btn:hover {
|
|
368
|
+
color: #1f2937;
|
|
369
|
+
background: #f3f4f6;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.wf-config-header-divider {
|
|
373
|
+
width: 1px;
|
|
374
|
+
height: 16px;
|
|
375
|
+
margin: 0 2px;
|
|
376
|
+
background: #e5e7eb;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/* =========================================================
|
|
380
|
+
* 兼容层:Tailwind 类 lookalike(临时)
|
|
381
|
+
* 供 src/components/*.vue 里还没重构的模板兜底
|
|
382
|
+
* ========================================================= */
|
|
383
|
+
|
|
384
|
+
/* flex 布局 */
|
|
385
|
+
.flex { display: flex; }
|
|
386
|
+
.flex-col { flex-direction: column; }
|
|
387
|
+
.flex-row { flex-direction: row; }
|
|
388
|
+
.flex-1 { flex: 1 1 0%; min-width: 0; }
|
|
389
|
+
.flex-none { flex: none; }
|
|
390
|
+
.flex-auto { flex: 1 1 auto; }
|
|
391
|
+
.flex-wrap { flex-wrap: wrap; }
|
|
392
|
+
.items-start { align-items: flex-start; }
|
|
393
|
+
.items-center { align-items: center; }
|
|
394
|
+
.items-end { align-items: flex-end; }
|
|
395
|
+
.justify-start { justify-content: flex-start; }
|
|
396
|
+
.justify-center { justify-content: center; }
|
|
397
|
+
.justify-end { justify-content: flex-end; }
|
|
398
|
+
.justify-between { justify-content: space-between; }
|
|
399
|
+
.justify-around { justify-content: space-around; }
|
|
400
|
+
|
|
401
|
+
/* gap */
|
|
402
|
+
.gap-1 { gap: 4px; }
|
|
403
|
+
.gap-2 { gap: 8px; }
|
|
404
|
+
.gap-3 { gap: 12px; }
|
|
405
|
+
.gap-4 { gap: 16px; }
|
|
406
|
+
|
|
407
|
+
/* margin / padding */
|
|
408
|
+
.m-1 { margin: 4px; }
|
|
409
|
+
.m-2 { margin: 8px; }
|
|
410
|
+
.mt-1 { margin-top: 4px; }
|
|
411
|
+
.mt-2 { margin-top: 8px; }
|
|
412
|
+
.mt-3 { margin-top: 12px; }
|
|
413
|
+
.mt-4 { margin-top: 16px; }
|
|
414
|
+
.mb-1 { margin-bottom: 4px; }
|
|
415
|
+
.mb-2 { margin-bottom: 8px; }
|
|
416
|
+
.mb-3 { margin-bottom: 12px; }
|
|
417
|
+
.mb-4 { margin-bottom: 16px; }
|
|
418
|
+
.p-1 { padding: 4px; }
|
|
419
|
+
.p-2 { padding: 8px; }
|
|
420
|
+
.p-3 { padding: 12px; }
|
|
421
|
+
.p-4 { padding: 16px; }
|
|
422
|
+
.px-2 { padding-left: 8px; padding-right: 8px; }
|
|
423
|
+
.px-3 { padding-left: 12px; padding-right: 12px; }
|
|
424
|
+
.py-1 { padding-top: 4px; padding-bottom: 4px; }
|
|
425
|
+
.py-2 { padding-top: 8px; padding-bottom: 8px; }
|
|
426
|
+
.pb-2 { padding-bottom: 8px; }
|
|
427
|
+
.pb-4 { padding-bottom: 16px; }
|
|
428
|
+
.pt-2 { padding-top: 8px; }
|
|
429
|
+
|
|
430
|
+
/* 尺寸 */
|
|
431
|
+
.w-full { width: 100%; }
|
|
432
|
+
.w-4 { width: 16px; }
|
|
433
|
+
.w-20 { width: 80px; }
|
|
434
|
+
.h-full { height: 100%; }
|
|
435
|
+
.h-4 { height: 16px; }
|
|
436
|
+
.min-h-0 { min-height: 0; }
|
|
437
|
+
|
|
438
|
+
/* 文本 */
|
|
439
|
+
.text-xs { font-size: 12px; }
|
|
440
|
+
.text-sm { font-size: 13px; }
|
|
441
|
+
.text-base { font-size: 14px; }
|
|
442
|
+
.text-gray-400 { color: #9ca3af; }
|
|
443
|
+
.text-gray-500 { color: #6b7280; }
|
|
444
|
+
.text-gray-600 { color: #4b5563; }
|
|
445
|
+
.text-gray-800 { color: #1f2937; }
|
|
446
|
+
.text-orange-800 { color: #9a3412; }
|
|
447
|
+
.text-primary { color: #6366f1; }
|
|
448
|
+
.font-medium { font-weight: 500; }
|
|
449
|
+
.font-semibold { font-weight: 600; }
|
|
450
|
+
.truncate {
|
|
451
|
+
overflow: hidden;
|
|
452
|
+
text-overflow: ellipsis;
|
|
453
|
+
white-space: nowrap;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/* 背景 / 边框 */
|
|
457
|
+
.bg-white { background: #ffffff; }
|
|
458
|
+
.bg-gray-50 { background: #f9fafb; }
|
|
459
|
+
.bg-gray-100 { background: #f3f4f6; }
|
|
460
|
+
.bg-green-300 { background: #86efac; }
|
|
461
|
+
.border { border: 1px solid #e5e7eb; }
|
|
462
|
+
.border-t { border-top: 1px solid #e5e7eb; }
|
|
463
|
+
.border-b { border-bottom: 1px solid #e5e7eb; }
|
|
464
|
+
.rounded { border-radius: 4px; }
|
|
465
|
+
.rounded-md { border-radius: 6px; }
|
|
466
|
+
.rounded-lg { border-radius: 8px; }
|
|
467
|
+
|
|
468
|
+
.hover\:bg-primary-light:hover {
|
|
469
|
+
background: #eef2ff;
|
|
470
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
export function useNode(emit) {
|
|
4
|
+
const isHovered = ref(false);
|
|
5
|
+
const isRunning = ref(false);
|
|
6
|
+
const isCompleted = ref(false);
|
|
7
|
+
|
|
8
|
+
const onMouseEnter = () => {
|
|
9
|
+
isHovered.value = true;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const onMouseLeave = () => {
|
|
13
|
+
isHovered.value = false;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const duplicateNode = (nodeId) => {
|
|
17
|
+
emit('duplicate', nodeId);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const deleteNode = (nodeId) => {
|
|
21
|
+
emit('delete', nodeId);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const onConnectionPlusClick = (event, nodeId, handleId) => {
|
|
25
|
+
emit('connection-plus-click', event, nodeId, handleId);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const truncateText = (text, maxLength) => {
|
|
29
|
+
if (!text) return '';
|
|
30
|
+
return text.length > maxLength ? text.substring(0, maxLength) + '...' : text;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
isHovered,
|
|
35
|
+
isRunning,
|
|
36
|
+
isCompleted,
|
|
37
|
+
onMouseEnter,
|
|
38
|
+
onMouseLeave,
|
|
39
|
+
duplicateNode,
|
|
40
|
+
deleteNode,
|
|
41
|
+
onConnectionPlusClick,
|
|
42
|
+
truncateText,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const nodeColors = {
|
|
47
|
+
start: '#10b981',
|
|
48
|
+
llm: '#6366f1',
|
|
49
|
+
agent: '#6366f1',
|
|
50
|
+
code: '#84cc16',
|
|
51
|
+
condition: '#f59e0b',
|
|
52
|
+
http: '#06b6d4',
|
|
53
|
+
userInput: '#3b82f6',
|
|
54
|
+
end: '#ef4444',
|
|
55
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { h, reactive, ref } from 'vue';
|
|
3
|
+
|
|
4
|
+
import { PlusOutlined } from '@ant-design/icons-vue';
|
|
5
|
+
|
|
6
|
+
import { getWorkflow } from '@/adapter/backend';
|
|
7
|
+
|
|
8
|
+
const qw: Record<any, any> = reactive({});
|
|
9
|
+
|
|
10
|
+
const items: any = ref([]);
|
|
11
|
+
|
|
12
|
+
function loadData() {
|
|
13
|
+
getWorkflow(qw).then((res) => {
|
|
14
|
+
items.value = res.data;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
loadData();
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<div>
|
|
23
|
+
<div>
|
|
24
|
+
<a-row>
|
|
25
|
+
<a-col :span="8"><div>自动保存 09:13:03 已发布 15 小时前</div></a-col>
|
|
26
|
+
<a-col :span="14">
|
|
27
|
+
<a-space>
|
|
28
|
+
<a-button :icon="h(PlusOutlined)">会话变量</a-button>
|
|
29
|
+
<a-button :icon="h(PlusOutlined)">环境变量</a-button>
|
|
30
|
+
<a-button :icon="h(PlusOutlined)">预览</a-button>
|
|
31
|
+
<a-button :icon="h(PlusOutlined)">功能</a-button>
|
|
32
|
+
<a-button :icon="h(PlusOutlined)">发布</a-button>
|
|
33
|
+
<a-button type="primary" :icon="h(PlusOutlined)">发布</a-button>
|
|
34
|
+
<a-button :icon="h(PlusOutlined)">版本历史</a-button>
|
|
35
|
+
</a-space>
|
|
36
|
+
</a-col>
|
|
37
|
+
</a-row>
|
|
38
|
+
</div>
|
|
39
|
+
<div></div>
|
|
40
|
+
<div>
|
|
41
|
+
<a-row>
|
|
42
|
+
<a-col :span="18" :push="6">
|
|
43
|
+
<a-space wrap />
|
|
44
|
+
</a-col>
|
|
45
|
+
<a-col :span="6" :pull="18">
|
|
46
|
+
<a-space wrap />
|
|
47
|
+
</a-col>
|
|
48
|
+
</a-row>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
<style scoped></style>
|