perf: prune online-dev workflow editor entries

This commit is contained in:
2026-06-22 23:30:14 +08:00
parent 8138bc4d57
commit 24f6f41338
8 changed files with 176 additions and 361 deletions
@@ -16,7 +16,7 @@ import type {
* - agent-debug: 智能体编辑器调试模式
* - agent-chat: 智能体正式对话模式(支持历史、反馈)
*/
import { computed, defineAsyncComponent, onUnmounted, ref, watch } from 'vue';
import { computed, onUnmounted, ref, watch } from 'vue';
import { Settings2, X } from '@vben/icons';
@@ -36,25 +36,6 @@ import { useChatApi } from './composables/useChatApi';
import { useEventHandler } from './composables/useEventHandler';
import LiteDesignPreviewPanel from './LiteDesignPreviewPanel.vue';
const AppDesignPanel = defineAsyncComponent(() =>
import('#/components/form-editor/AppDesignPanel.vue'),
);
const AppSettingsPanel = defineAsyncComponent(() =>
import('#/components/form-editor/AppSettingsPanel.vue'),
);
const DashboardBasicInfoConfirmPanel = defineAsyncComponent(() =>
import('#/components/form-editor/DashboardBasicInfoConfirmPanel.vue'),
);
const DashboardDesignConfirmPanel = defineAsyncComponent(() =>
import('#/components/form-editor/DashboardDesignConfirmPanel.vue'),
);
const DashboardPublishConfirmPanel = defineAsyncComponent(() =>
import('#/components/form-editor/DashboardPublishConfirmPanel.vue'),
);
const SystemSummaryConfirmPanel = defineAsyncComponent(() =>
import('#/components/form-editor/SystemSummaryConfirmPanel.vue'),
);
// ==================== Props ====================
const props = withDefaults(defineProps<AiChatPanelProps>(), {
mode: 'workflow',
@@ -1026,7 +1007,7 @@ onUnmounted(() => {
/>
<!-- 应用设计面板 -->
<AppDesignPanel
<LiteDesignPreviewPanel
v-if="showAppDesignPanel"
:visible="showAppDesignPanel"
:design="currentAppDesign as any"
@@ -1036,27 +1017,27 @@ onUnmounted(() => {
/>
<!-- 应用设置面板 -->
<AppSettingsPanel
<LiteDesignPreviewPanel
v-if="showAppSettingsPanel"
:visible="showAppSettingsPanel"
:settings="currentAppSettings as any"
:design="currentAppSettings as any"
@update:visible="showAppSettingsPanel = $event"
@confirm="handleAppSettingsConfirm"
@close="handleAppSettingsClose"
/>
<!-- 仪表盘基础信息面板 -->
<DashboardBasicInfoConfirmPanel
<LiteDesignPreviewPanel
v-if="showDashboardBasicInfoPanel"
:visible="showDashboardBasicInfoPanel"
:basic-info="currentDashboardBasicInfo as any"
:design="currentDashboardBasicInfo as any"
@update:visible="showDashboardBasicInfoPanel = $event"
@confirm="handleDashboardBasicInfoConfirm"
@close="handleDashboardBasicInfoClose"
/>
<!-- 仪表盘设计面板 -->
<DashboardDesignConfirmPanel
<LiteDesignPreviewPanel
v-if="showDashboardDesignPanel"
:visible="showDashboardDesignPanel"
:design="currentDashboardDesign as any"
@@ -1066,20 +1047,20 @@ onUnmounted(() => {
/>
<!-- 仪表盘发布面板 -->
<DashboardPublishConfirmPanel
<LiteDesignPreviewPanel
v-if="showDashboardPublishPanel"
:visible="showDashboardPublishPanel"
:publish-data="currentDashboardPublish as any"
:design="currentDashboardPublish as any"
@update:visible="showDashboardPublishPanel = $event"
@confirm="handleDashboardPublishConfirm"
@close="handleDashboardPublishClose"
/>
<!-- 系统总结面板 -->
<SystemSummaryConfirmPanel
<LiteDesignPreviewPanel
v-if="showSystemSummaryPanel"
:visible="showSystemSummaryPanel"
:data="currentSystemSummary as any"
:design="currentSystemSummary as any"
@update:visible="showSystemSummaryPanel = $event"
@confirm="handleSystemSummaryConfirm"
@close="handleSystemSummaryClose"
@@ -1097,7 +1078,7 @@ onUnmounted(() => {
@close="handleDesignClose"
/>
<AppDesignPanel
<LiteDesignPreviewPanel
v-if="showAppDesignPanel"
:visible="showAppDesignPanel"
:design="currentAppDesign as any"
@@ -1106,25 +1087,25 @@ onUnmounted(() => {
@close="handleAppDesignClose"
/>
<AppSettingsPanel
<LiteDesignPreviewPanel
v-if="showAppSettingsPanel"
:visible="showAppSettingsPanel"
:settings="currentAppSettings as any"
:design="currentAppSettings as any"
@update:visible="showAppSettingsPanel = $event"
@confirm="handleAppSettingsConfirm"
@close="handleAppSettingsClose"
/>
<DashboardBasicInfoConfirmPanel
<LiteDesignPreviewPanel
v-if="showDashboardBasicInfoPanel"
:visible="showDashboardBasicInfoPanel"
:basic-info="currentDashboardBasicInfo as any"
:design="currentDashboardBasicInfo as any"
@update:visible="showDashboardBasicInfoPanel = $event"
@confirm="handleDashboardBasicInfoConfirm"
@close="handleDashboardBasicInfoClose"
/>
<DashboardDesignConfirmPanel
<LiteDesignPreviewPanel
v-if="showDashboardDesignPanel"
:visible="showDashboardDesignPanel"
:design="currentDashboardDesign as any"
@@ -1133,19 +1114,19 @@ onUnmounted(() => {
@close="handleDashboardDesignClose"
/>
<DashboardPublishConfirmPanel
<LiteDesignPreviewPanel
v-if="showDashboardPublishPanel"
:visible="showDashboardPublishPanel"
:publish-data="currentDashboardPublish as any"
:design="currentDashboardPublish as any"
@update:visible="showDashboardPublishPanel = $event"
@confirm="handleDashboardPublishConfirm"
@close="handleDashboardPublishClose"
/>
<SystemSummaryConfirmPanel
<LiteDesignPreviewPanel
v-if="showSystemSummaryPanel"
:visible="showSystemSummaryPanel"
:data="currentSystemSummary as any"
:design="currentSystemSummary as any"
@update:visible="showSystemSummaryPanel = $event"
@confirm="handleSystemSummaryConfirm"
@close="handleSystemSummaryClose"
@@ -13,7 +13,6 @@ import type { ChatMessage } from '#/components/ChatBox/index';
*/
import {
computed,
defineAsyncComponent,
nextTick,
onUnmounted,
ref,
@@ -34,9 +33,6 @@ import { ChatBox } from '#/components/ChatBox/index';
import AiWorkingAnimation from '../../../../components/ai-loading/AiWorkingAnimation.vue';
const AppDesignPanel = defineAsyncComponent(
() => import('#/components/form-editor/AppDesignPanel.vue'),
);
const props = defineProps<{
/** Agent 详情(可选,用于显示名称和欢迎配置) */
agent?: Agent | null;
@@ -503,7 +499,7 @@ function handleStreamEvent(
if (configData?.type === 'design_preview') {
const previewType = configData.preview_type;
// 应用设计方案使用 AppDesignPanel(富文本编辑器)
// 应用设计方案使用轻量预览面板
if (previewType === 'app_design') {
currentAppDesign.value = {
type: previewType,
@@ -924,7 +920,7 @@ onUnmounted(() => {
v-if="showAppDesignPanel && currentAppDesign"
class="flex flex-1 flex-col overflow-hidden"
>
<AppDesignPanel
<LiteDesignPreviewPanel
:visible="showAppDesignPanel"
:design="currentAppDesign as any"
@update:visible="showAppDesignPanel = $event"
@@ -1,17 +1,9 @@
<script setup lang="ts">
import type { WorkflowStreamEvent } from '#/api/ai-platform/ai-platform';
import type { DesignPreviewData } from '#/components/ai-chat-panel/types';
import type { ChatMessage, ReasoningStep } from '#/components/ChatBox/index';
import type {
AppDesignData,
AppSettingsData,
DashboardBasicInfoData,
DashboardDesignData,
DashboardPublishData,
DesignData,
SystemSummaryData,
} from '#/components/form-editor';
import { computed, defineAsyncComponent, onUnmounted, ref, watch } from 'vue';
import { computed, onUnmounted, ref, watch } from 'vue';
import { Settings2, X } from '@vben/icons';
import { $t } from '@vben/locales';
@@ -31,24 +23,14 @@ import {
} from '#/api/ai-platform/ai-platform';
import LiteDesignPreviewPanel from '#/components/ai-chat-panel/LiteDesignPreviewPanel.vue';
import { ChatBox } from '#/components/ChatBox/index';
const AppDesignPanel = defineAsyncComponent(
() => import('#/components/form-editor/AppDesignPanel.vue'),
);
const AppSettingsPanel = defineAsyncComponent(
() => import('#/components/form-editor/AppSettingsPanel.vue'),
);
const DashboardBasicInfoConfirmPanel = defineAsyncComponent(
() => import('#/components/form-editor/DashboardBasicInfoConfirmPanel.vue'),
);
const DashboardDesignConfirmPanel = defineAsyncComponent(
() => import('#/components/form-editor/DashboardDesignConfirmPanel.vue'),
);
const DashboardPublishConfirmPanel = defineAsyncComponent(
() => import('#/components/form-editor/DashboardPublishConfirmPanel.vue'),
);
const SystemSummaryConfirmPanel = defineAsyncComponent(
() => import('#/components/form-editor/SystemSummaryConfirmPanel.vue'),
);
type DesignData = DesignPreviewData;
type AppDesignData = DesignPreviewData;
type AppSettingsData = DesignPreviewData;
type DashboardBasicInfoData = DesignPreviewData;
type DashboardDesignData = DesignPreviewData;
type DashboardPublishData = DesignPreviewData;
type SystemSummaryData = DesignPreviewData;
const props = defineProps<{
nodes: any[];
@@ -1269,7 +1251,7 @@ onUnmounted(() => {
/>
<!-- 应用设计面板 -->
<AppDesignPanel
<LiteDesignPreviewPanel
v-if="showAppDesignPanel"
:visible="showAppDesignPanel"
:design="currentAppDesign"
@@ -1279,27 +1261,27 @@ onUnmounted(() => {
/>
<!-- 应用设置面板 -->
<AppSettingsPanel
<LiteDesignPreviewPanel
v-if="showAppSettingsPanel"
:visible="showAppSettingsPanel"
:settings="currentAppSettings"
:design="currentAppSettings"
@update:visible="showAppSettingsPanel = $event"
@confirm="handleAppSettingsConfirm"
@close="handleAppSettingsClose"
/>
<!-- 仪表盘基础信息面板 -->
<DashboardBasicInfoConfirmPanel
<LiteDesignPreviewPanel
v-if="showDashboardBasicInfoPanel"
:visible="showDashboardBasicInfoPanel"
:basic-info="currentDashboardBasicInfo"
:design="currentDashboardBasicInfo"
@update:visible="showDashboardBasicInfoPanel = $event"
@confirm="handleDashboardBasicInfoConfirm"
@close="handleDashboardBasicInfoClose"
/>
<!-- 仪表盘设计面板 -->
<DashboardDesignConfirmPanel
<LiteDesignPreviewPanel
v-if="showDashboardDesignPanel"
:visible="showDashboardDesignPanel"
:design="currentDashboardDesign"
@@ -1309,20 +1291,20 @@ onUnmounted(() => {
/>
<!-- 仪表盘发布面板 -->
<DashboardPublishConfirmPanel
<LiteDesignPreviewPanel
v-if="showDashboardPublishPanel"
:visible="showDashboardPublishPanel"
:publish-data="currentDashboardPublish"
:design="currentDashboardPublish"
@update:visible="showDashboardPublishPanel = $event"
@confirm="handleDashboardPublishConfirm"
@close="handleDashboardPublishClose"
/>
<!-- 系统总结面板 -->
<SystemSummaryConfirmPanel
<LiteDesignPreviewPanel
v-if="showSystemSummaryPanel"
:visible="showSystemSummaryPanel"
:data="currentSystemSummary"
:design="currentSystemSummary"
@update:visible="showSystemSummaryPanel = $event"
@confirm="handleSystemSummaryConfirm"
@close="handleSystemSummaryClose"
@@ -54,53 +54,69 @@ const components: Record<string, any> = {
),
// 循环节点
loop: defineAsyncComponent(() => import('../panels/LoopPanel.vue')),
// 表单节点
// 轻量版兼容旧工作流中的在线开发节点,不再加载原表单/应用/仪表盘配置面板
form_basic_info: defineAsyncComponent(
() => import('../panels/FormBasicInfoPanel.vue'),
() => import('../panels/PrunedNodePanel.vue'),
),
form_database_design: defineAsyncComponent(
() => import('../panels/FormDatabaseDesignPanel.vue'),
() => import('../panels/PrunedNodePanel.vue'),
),
form_database_create: defineAsyncComponent(
() => import('../panels/FormDatabaseCreatePanel.vue'),
() => import('../panels/PrunedNodePanel.vue'),
),
form_ui_design: defineAsyncComponent(
() => import('../panels/FormUIDesignPanel.vue'),
() => import('../panels/PrunedNodePanel.vue'),
),
form_list_design: defineAsyncComponent(
() => import('../panels/FormListDesignPanel.vue'),
() => import('../panels/PrunedNodePanel.vue'),
),
form_create: defineAsyncComponent(
() => import('../panels/FormCreatePanel.vue'),
() => import('../panels/PrunedNodePanel.vue'),
),
form_publish: defineAsyncComponent(
() => import('../panels/FormPublishPanel.vue'),
() => import('../panels/PrunedNodePanel.vue'),
),
form_data_create: defineAsyncComponent(
() => import('../panels/PrunedNodePanel.vue'),
),
form_data_read: defineAsyncComponent(
() => import('../panels/PrunedNodePanel.vue'),
),
form_data_update: defineAsyncComponent(
() => import('../panels/PrunedNodePanel.vue'),
),
form_data_delete: defineAsyncComponent(
() => import('../panels/PrunedNodePanel.vue'),
),
form_data_list: defineAsyncComponent(
() => import('../panels/PrunedNodePanel.vue'),
),
form_schema_to_llm: defineAsyncComponent(
() => import('../panels/PrunedNodePanel.vue'),
),
// 应用节点
app_create: defineAsyncComponent(
() => import('../panels/AppCreatePanel.vue'),
() => import('../panels/PrunedNodePanel.vue'),
),
app_design: defineAsyncComponent(
() => import('../panels/AppDesignPanel.vue'),
() => import('../panels/PrunedNodePanel.vue'),
),
app_settings: defineAsyncComponent(
() => import('../panels/AppSettingsPanel.vue'),
() => import('../panels/PrunedNodePanel.vue'),
),
app_update: defineAsyncComponent(
() => import('../panels/AppUpdatePanel.vue'),
() => import('../panels/PrunedNodePanel.vue'),
),
// 仪表盘节点
dashboard_basic_info: defineAsyncComponent(
() => import('../panels/DashboardBasicInfoPanel.vue'),
() => import('../panels/PrunedNodePanel.vue'),
),
dashboard_design: defineAsyncComponent(
() => import('../panels/DashboardDesignPanel.vue'),
() => import('../panels/PrunedNodePanel.vue'),
),
dashboard_create: defineAsyncComponent(
() => import('../panels/DashboardCreatePanel.vue'),
() => import('../panels/PrunedNodePanel.vue'),
),
dashboard_publish: defineAsyncComponent(
() => import('../panels/DashboardPublishPanel.vue'),
() => import('../panels/PrunedNodePanel.vue'),
),
// 系统总结节点
system_summary: defineAsyncComponent(
@@ -108,25 +124,6 @@ const components: Record<string, any> = {
),
// 子流程节点
subflow: defineAsyncComponent(() => import('../panels/SubflowPanel.vue')),
// 表单数据节点
form_data_create: defineAsyncComponent(
() => import('../panels/FormDataPanel.vue'),
),
form_data_read: defineAsyncComponent(
() => import('../panels/FormDataPanel.vue'),
),
form_data_update: defineAsyncComponent(
() => import('../panels/FormDataPanel.vue'),
),
form_data_delete: defineAsyncComponent(
() => import('../panels/FormDataPanel.vue'),
),
form_data_list: defineAsyncComponent(
() => import('../panels/FormDataPanel.vue'),
),
form_schema_to_llm: defineAsyncComponent(
() => import('../panels/FormDataPanel.vue'),
),
// Text-to-SQL 节点
text_to_sql: defineAsyncComponent(
() => import('../panels/TextToSqlPanel.vue'),
@@ -27,17 +27,13 @@ import {
Database,
DatabaseBackup,
DatabaseZap,
FilePlus,
FileText,
Fullscreen,
GitBranch,
GitFork,
Globe,
HelpCircle,
LayoutDashboard,
LayoutTemplate,
ListChecks,
Map,
MessageSquareMore,
MessageSquareText,
Minus,
@@ -47,14 +43,10 @@ import {
RefreshCw,
Save,
Search,
Send,
Settings,
Snowflake,
Square,
TableProperties,
Trash2,
Undo2,
Upload,
Workflow,
} from '@vben/icons';
import { $t } from '@vben/locales';
@@ -84,32 +76,16 @@ import ContextMenu from './components/ContextMenu.vue';
import Panel from './components/Panel.vue';
import VersionHistoryPanel from './components/VersionHistoryPanel.vue';
import AddButtonEdge from './edges/AddButtonEdge.vue';
import AppCreateNode from './nodes/AppCreateNode.vue';
import AppDesignNode from './nodes/AppDesignNode.vue';
import AppSettingsNode from './nodes/AppSettingsNode.vue';
import AppUpdateNode from './nodes/AppUpdateNode.vue';
import ChoiceNode from './nodes/ChoiceNode.vue';
import CodeNode from './nodes/CodeNode.vue';
import ConditionNode from './nodes/ConditionNode.vue';
import ConfirmNode from './nodes/ConfirmNode.vue';
import DashboardBasicInfoNode from './nodes/DashboardBasicInfoNode.vue';
import DashboardCreateNode from './nodes/DashboardCreateNode.vue';
import DashboardDesignNode from './nodes/DashboardDesignNode.vue';
import DashboardPublishNode from './nodes/DashboardPublishNode.vue';
import DbDeleteNode from './nodes/DbDeleteNode.vue';
import DbInsertNode from './nodes/DbInsertNode.vue';
import DbQueryNode from './nodes/DbQueryNode.vue';
import DbSqlNode from './nodes/DbSqlNode.vue';
import DbUpdateNode from './nodes/DbUpdateNode.vue';
import EndNode from './nodes/EndNode.vue';
import FormBasicInfoNode from './nodes/FormBasicInfoNode.vue';
import FormCreateNode from './nodes/FormCreateNode.vue';
import FormDatabaseCreateNode from './nodes/FormDatabaseCreateNode.vue';
import FormDatabaseDesignNode from './nodes/FormDatabaseDesignNode.vue';
import FormDataNode from './nodes/FormDataNode.vue';
import FormListDesignNode from './nodes/FormListDesignNode.vue';
import FormPublishNode from './nodes/FormPublishNode.vue';
import FormUIDesignNode from './nodes/FormUIDesignNode.vue';
import HttpNode from './nodes/HttpNode.vue';
import IntentNode from './nodes/IntentNode.vue';
import KnowledgeRetrievalNode from './nodes/KnowledgeRetrievalNode.vue';
@@ -118,6 +94,7 @@ import LoopNode from './nodes/LoopNode.vue';
import MergeNode from './nodes/MergeNode.vue';
import MessageNode from './nodes/MessageNode.vue';
import ParallelNode from './nodes/ParallelNode.vue';
import PrunedNode from './nodes/PrunedNode.vue';
import QuestionNode from './nodes/QuestionNode.vue';
import SnowflakeCortexAnalystNode from './nodes/SnowflakeCortexAnalystNode.vue';
import SnowflakeCortexLLMNode from './nodes/SnowflakeCortexLLMNode.vue';
@@ -184,35 +161,33 @@ const nodeTypes = {
snowflake_cortex_analyst: markRaw(SnowflakeCortexAnalystNode),
// 循环节点
loop: markRaw(LoopNode),
// 表单节点
form_basic_info: markRaw(FormBasicInfoNode),
form_database_design: markRaw(FormDatabaseDesignNode),
form_database_create: markRaw(FormDatabaseCreateNode),
form_ui_design: markRaw(FormUIDesignNode),
form_list_design: markRaw(FormListDesignNode),
form_create: markRaw(FormCreateNode),
form_publish: markRaw(FormPublishNode),
// 应用管理节点
app_create: markRaw(AppCreateNode),
app_design: markRaw(AppDesignNode),
app_settings: markRaw(AppSettingsNode),
app_update: markRaw(AppUpdateNode),
// 仪表盘节点
dashboard_basic_info: markRaw(DashboardBasicInfoNode),
dashboard_design: markRaw(DashboardDesignNode),
dashboard_create: markRaw(DashboardCreateNode),
dashboard_publish: markRaw(DashboardPublishNode),
// 轻量版兼容旧工作流中的在线开发节点,不再加载原表单/应用/仪表盘组件
form_basic_info: markRaw(PrunedNode),
form_database_design: markRaw(PrunedNode),
form_database_create: markRaw(PrunedNode),
form_ui_design: markRaw(PrunedNode),
form_list_design: markRaw(PrunedNode),
form_create: markRaw(PrunedNode),
form_publish: markRaw(PrunedNode),
app_create: markRaw(PrunedNode),
app_design: markRaw(PrunedNode),
app_settings: markRaw(PrunedNode),
app_update: markRaw(PrunedNode),
dashboard_basic_info: markRaw(PrunedNode),
dashboard_design: markRaw(PrunedNode),
dashboard_create: markRaw(PrunedNode),
dashboard_publish: markRaw(PrunedNode),
// 系统总结节点
system_summary: markRaw(SystemSummaryNode),
// 子流程节点
subflow: markRaw(SubflowNode),
// 表单数据节点
form_data_create: markRaw(FormDataNode),
form_data_read: markRaw(FormDataNode),
form_data_update: markRaw(FormDataNode),
form_data_delete: markRaw(FormDataNode),
form_data_list: markRaw(FormDataNode),
form_schema_to_llm: markRaw(FormDataNode),
// 表单数据节点在轻量版中仅保留旧工作流渲染兼容
form_data_create: markRaw(PrunedNode),
form_data_read: markRaw(PrunedNode),
form_data_update: markRaw(PrunedNode),
form_data_delete: markRaw(PrunedNode),
form_data_list: markRaw(PrunedNode),
form_schema_to_llm: markRaw(PrunedNode),
// Text-to-SQL 节点
text_to_sql: markRaw(TextToSqlNode),
// 知识库节点
@@ -390,94 +365,6 @@ const nodeCategories = computed(() => [
},
],
},
{
name: $t('ai-platform.workflow.editor.categories.formDesign'),
nodes: [
{
type: 'form_basic_info',
label: getNodeLabel('form_basic_info'),
icon: 'FileText',
color: 'purple',
},
{
type: 'form_database_design',
label: getNodeLabel('form_database_design'),
icon: 'Database',
color: 'purple',
},
{
type: 'form_database_create',
label: getNodeLabel('form_database_create'),
icon: 'DatabaseZap',
color: 'purple',
},
{
type: 'form_ui_design',
label: getNodeLabel('form_ui_design'),
icon: 'LayoutTemplate',
color: 'purple',
},
{
type: 'form_list_design',
label: getNodeLabel('form_list_design'),
icon: 'TableProperties',
color: 'purple',
},
{
type: 'form_create',
label: getNodeLabel('form_create'),
icon: 'FilePlus',
color: 'purple',
},
{
type: 'form_publish',
label: getNodeLabel('form_publish'),
icon: 'Send',
color: 'purple',
},
],
},
{
name: $t('ai-platform.workflow.editor.categories.formData'),
nodes: [
{
type: 'form_data_create',
label: getNodeLabel('form_data_create'),
icon: 'FilePlus',
color: 'green',
},
{
type: 'form_data_read',
label: getNodeLabel('form_data_read'),
icon: 'FileText',
color: 'blue',
},
{
type: 'form_data_update',
label: getNodeLabel('form_data_update'),
icon: 'FileText',
color: 'orange',
},
{
type: 'form_data_delete',
label: getNodeLabel('form_data_delete'),
icon: 'Trash2',
color: 'red',
},
{
type: 'form_data_list',
label: getNodeLabel('form_data_list'),
icon: 'Search',
color: 'blue',
},
{
type: 'form_schema_to_llm',
label: getNodeLabel('form_schema_to_llm'),
icon: 'Code',
color: 'purple',
},
],
},
{
name: $t('ai-platform.workflow.editor.categories.dialog'),
nodes: [
@@ -587,6 +474,12 @@ const nodeCategories = computed(() => [
icon: 'Workflow',
color: 'purple',
},
{
type: 'system_summary',
label: getNodeLabel('system_summary'),
icon: 'ClipboardCheck',
color: 'purple',
},
{
type: 'end',
label: getNodeLabel('end'),
@@ -612,72 +505,6 @@ const nodeCategories = computed(() => [
},
],
},
{
name: $t('ai-platform.workflow.editor.categories.appManage'),
nodes: [
{
type: 'app_create',
label: getNodeLabel('app_create'),
icon: 'LayoutTemplate',
color: 'indigo',
},
{
type: 'app_design',
label: getNodeLabel('app_design'),
icon: 'LayoutDashboard',
color: 'indigo',
},
{
type: 'app_settings',
label: getNodeLabel('app_settings'),
icon: 'Settings',
color: 'indigo',
},
{
type: 'app_update',
label: getNodeLabel('app_update'),
icon: 'Save',
color: 'indigo',
},
],
},
{
name: $t('ai-platform.workflow.editor.categories.dashboard'),
icon: 'LayoutDashboard',
color: 'cyan',
nodes: [
{
type: 'dashboard_basic_info',
label: getNodeLabel('dashboard_basic_info'),
icon: 'FileText',
color: 'cyan',
},
{
type: 'dashboard_design',
label: getNodeLabel('dashboard_design'),
icon: 'LayoutDashboard',
color: 'cyan',
},
{
type: 'dashboard_create',
label: getNodeLabel('dashboard_create'),
icon: 'FilePlus',
color: 'cyan',
},
{
type: 'dashboard_publish',
label: getNodeLabel('dashboard_publish'),
icon: 'Upload',
color: 'cyan',
},
{
type: 'system_summary',
label: getNodeLabel('system_summary'),
icon: 'ClipboardCheck',
color: 'cyan',
},
],
},
{
name: $t('ai-platform.workflow.editor.categories.knowledge'),
nodes: [
@@ -0,0 +1,24 @@
<script setup lang="ts">
import { EyeOff } from '@vben/icons';
import BaseNode from './BaseNode.vue';
defineProps<{
data: any;
id: string;
selected?: boolean;
type: string;
}>();
</script>
<template>
<BaseNode
:node-id="id"
:selected="selected"
:label="data.label || type"
:node-type="type"
>
<template #icon><EyeOff class="size-5" /></template>
<template #desc>轻量版已隐藏该在线开发节点</template>
</BaseNode>
</template>
@@ -0,0 +1,23 @@
<script setup lang="ts">
import { computed } from 'vue';
const props = defineProps<{
data?: Record<string, any>;
nodeType?: string;
}>();
const configJson = computed(() =>
JSON.stringify(props.data || {}, null, 2),
);
</script>
<template>
<div class="space-y-3">
<div class="text-muted-foreground text-sm">
该节点属于在线开发能力当前轻量版只保留历史查看和运行兼容
</div>
<pre
class="bg-muted/50 border-border max-h-[480px] overflow-auto rounded border p-3 text-xs leading-relaxed"
>{{ configJson }}</pre>
</div>
</template>
@@ -1,32 +1,16 @@
import { markRaw } from 'vue';
import AddButtonEdge from '../editor/edges/AddButtonEdge.vue';
import AppCreateNode from '../editor/nodes/AppCreateNode.vue';
import AppDesignNode from '../editor/nodes/AppDesignNode.vue';
import AppSettingsNode from '../editor/nodes/AppSettingsNode.vue';
import AppUpdateNode from '../editor/nodes/AppUpdateNode.vue';
import ChoiceNode from '../editor/nodes/ChoiceNode.vue';
import CodeNode from '../editor/nodes/CodeNode.vue';
import ConditionNode from '../editor/nodes/ConditionNode.vue';
import ConfirmNode from '../editor/nodes/ConfirmNode.vue';
import DashboardBasicInfoNode from '../editor/nodes/DashboardBasicInfoNode.vue';
import DashboardCreateNode from '../editor/nodes/DashboardCreateNode.vue';
import DashboardDesignNode from '../editor/nodes/DashboardDesignNode.vue';
import DashboardPublishNode from '../editor/nodes/DashboardPublishNode.vue';
import DbDeleteNode from '../editor/nodes/DbDeleteNode.vue';
import DbInsertNode from '../editor/nodes/DbInsertNode.vue';
import DbQueryNode from '../editor/nodes/DbQueryNode.vue';
import DbSqlNode from '../editor/nodes/DbSqlNode.vue';
import DbUpdateNode from '../editor/nodes/DbUpdateNode.vue';
import EndNode from '../editor/nodes/EndNode.vue';
import FormBasicInfoNode from '../editor/nodes/FormBasicInfoNode.vue';
import FormCreateNode from '../editor/nodes/FormCreateNode.vue';
import FormDatabaseCreateNode from '../editor/nodes/FormDatabaseCreateNode.vue';
import FormDatabaseDesignNode from '../editor/nodes/FormDatabaseDesignNode.vue';
import FormDataNode from '../editor/nodes/FormDataNode.vue';
import FormListDesignNode from '../editor/nodes/FormListDesignNode.vue';
import FormPublishNode from '../editor/nodes/FormPublishNode.vue';
import FormUIDesignNode from '../editor/nodes/FormUIDesignNode.vue';
import HttpNode from '../editor/nodes/HttpNode.vue';
import IntentNode from '../editor/nodes/IntentNode.vue';
import KnowledgeRetrievalNode from '../editor/nodes/KnowledgeRetrievalNode.vue';
@@ -35,6 +19,7 @@ import LoopNode from '../editor/nodes/LoopNode.vue';
import MergeNode from '../editor/nodes/MergeNode.vue';
import MessageNode from '../editor/nodes/MessageNode.vue';
import ParallelNode from '../editor/nodes/ParallelNode.vue';
import PrunedNode from '../editor/nodes/PrunedNode.vue';
import QuestionNode from '../editor/nodes/QuestionNode.vue';
import SnowflakeCortexAnalystNode from '../editor/nodes/SnowflakeCortexAnalystNode.vue';
import SnowflakeCortexLLMNode from '../editor/nodes/SnowflakeCortexLLMNode.vue';
@@ -67,29 +52,29 @@ export const workflowNodeTypes = {
snowflake_cortex_llm: markRaw(SnowflakeCortexLLMNode),
snowflake_cortex_analyst: markRaw(SnowflakeCortexAnalystNode),
loop: markRaw(LoopNode),
form_basic_info: markRaw(FormBasicInfoNode),
form_database_design: markRaw(FormDatabaseDesignNode),
form_database_create: markRaw(FormDatabaseCreateNode),
form_ui_design: markRaw(FormUIDesignNode),
form_list_design: markRaw(FormListDesignNode),
form_create: markRaw(FormCreateNode),
form_publish: markRaw(FormPublishNode),
app_create: markRaw(AppCreateNode),
app_design: markRaw(AppDesignNode),
app_settings: markRaw(AppSettingsNode),
app_update: markRaw(AppUpdateNode),
dashboard_basic_info: markRaw(DashboardBasicInfoNode),
dashboard_design: markRaw(DashboardDesignNode),
dashboard_create: markRaw(DashboardCreateNode),
dashboard_publish: markRaw(DashboardPublishNode),
form_basic_info: markRaw(PrunedNode),
form_database_design: markRaw(PrunedNode),
form_database_create: markRaw(PrunedNode),
form_ui_design: markRaw(PrunedNode),
form_list_design: markRaw(PrunedNode),
form_create: markRaw(PrunedNode),
form_publish: markRaw(PrunedNode),
app_create: markRaw(PrunedNode),
app_design: markRaw(PrunedNode),
app_settings: markRaw(PrunedNode),
app_update: markRaw(PrunedNode),
dashboard_basic_info: markRaw(PrunedNode),
dashboard_design: markRaw(PrunedNode),
dashboard_create: markRaw(PrunedNode),
dashboard_publish: markRaw(PrunedNode),
system_summary: markRaw(SystemSummaryNode),
subflow: markRaw(SubflowNode),
form_data_create: markRaw(FormDataNode),
form_data_read: markRaw(FormDataNode),
form_data_update: markRaw(FormDataNode),
form_data_delete: markRaw(FormDataNode),
form_data_list: markRaw(FormDataNode),
form_schema_to_llm: markRaw(FormDataNode),
form_data_create: markRaw(PrunedNode),
form_data_read: markRaw(PrunedNode),
form_data_update: markRaw(PrunedNode),
form_data_delete: markRaw(PrunedNode),
form_data_list: markRaw(PrunedNode),
form_schema_to_llm: markRaw(PrunedNode),
text_to_sql: markRaw(TextToSqlNode),
knowledge_retrieval: markRaw(KnowledgeRetrievalNode),
};