From 0e6381d2b31bbba6db963f5bb5840d10d705fed7 Mon Sep 17 00:00:00 2001 From: 2910410219 <2910410219@qq.com> Date: Wed, 12 Aug 2026 17:26:58 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=B8=8A=E6=B8=B8=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E5=BC=95=E7=94=A8=EF=BC=88=E6=A0=B8=E5=BF=83?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=89=20=20=20-=20=E6=96=B0=E5=A2=9E=20up?= =?UTF-8?q?streamNodes=20computed=EF=BC=9A=E9=81=8D=E5=8E=86=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E9=80=89=E4=B8=AD=E8=8A=82=E7=82=B9=E7=9A=84=E5=89=8D?= =?UTF-8?q?=E9=A9=B1=E9=93=BE=E8=B7=AF=EF=BC=8C=E4=BB=85=20model=20/=20htt?= =?UTF-8?q?p=20/=20form=20=E4=B8=89=E7=B1=BB=E8=8A=82=E7=82=B9=E8=A2=AB?= =?UTF-8?q?=E8=AF=86=E5=88=AB=E4=B8=BA=E6=9C=89=E8=BE=93=E5=87=BA=E7=9A=84?= =?UTF-8?q?=E8=8A=82=E7=82=B9=20=20=20-=20=E6=96=B0=E5=A2=9E=20getNodeOutp?= =?UTF-8?q?utFields=EF=BC=8C=E6=8C=89=E8=8A=82=E7=82=B9=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=8F=90=E5=8F=96=E5=8F=AF=E5=BC=95=E7=94=A8=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=9A=20=20=20=20=20-=20form=20=E2=86=92=20formConfig=20?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E6=AE=B5=20=20=20=20=20-=20http=20=E2=86=92?= =?UTF-8?q?=20response=20schema=20=E7=9A=84=E5=8F=B6=E5=AD=90=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=20=20=20=20=20-=20model=20=E2=86=92=20modelResponseBo?= =?UTF-8?q?dyMapping=EF=BC=88=E6=A8=A1=E5=9E=8B=E8=BF=94=E5=9B=9E=E5=8F=82?= =?UTF-8?q?=E6=95=B0=EF=BC=89=E7=9A=84=20key=20=20=20=20=20-=20=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E8=8A=82=E7=82=B9=20=E2=86=92=20runFormFields?= =?UTF-8?q?=EF=BC=88=E8=BF=90=E8=A1=8C=E8=A1=A8=E5=8D=95=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=89=EF=BC=8C=E4=BB=8E=E8=80=8C=E8=AE=A9=E4=B8=8B=E6=B8=B8?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E8=83=BD=E5=BC=95=E7=94=A8"=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=A1=AB=E7=9A=84=E8=BF=90=E8=A1=8C=E8=A1=A8=E5=8D=95?= =?UTF-8?q?"=E4=BD=9C=E4=B8=BA=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2. 开始节点运行表单字段聚合 - syncRunFormFields + 深监听:开始节点 formConfig 变化时自动聚合字段,存为 runFormFields,作为开始节点自身可被下游引用的输出 3. 模型返回参数 - handleModelConfirm 用 stripReadonlyFields 清理 requestBodyMapping 冗余字段,同时保存 modelResponseBodyMapping 供下游引用 - 保存时 collectExposedFields 提取对外暴露字段存 modelFormFields 4. 提示词 / 反向提示词 - 保存 prompt、negativePrompt、runFormFields 到节点 DSL 5. 其他 - nodeTypes 用 markRaw 包裹 FlowNode,修复 Vue 警告 - buildNodeFormConfigFromDsl 的 responseType 匹配改为兼容 key/value 两种取值 --- src/api/settings/workflow/index.ts | 3 + .../json-schema-editor/FieldConfigDialog.vue | 224 ++++++- src/components/json-schema-editor/index.vue | 22 +- .../workflow/component/ModelField.vue | 612 ++++++++++++++++++ .../workflow/component/ModelParamsForm.vue | 91 +++ .../workflow/component/NodeConfigPanel.vue | 195 +++++- .../workflow/component/PromptEditor.vue | 93 +++ .../workflow/component/modelParamUtils.ts | 227 +++++++ src/views/settings/workflow/index.vue | 244 ++++++- 9 files changed, 1661 insertions(+), 50 deletions(-) create mode 100644 src/views/settings/workflow/component/ModelField.vue create mode 100644 src/views/settings/workflow/component/ModelParamsForm.vue create mode 100644 src/views/settings/workflow/component/PromptEditor.vue create mode 100644 src/views/settings/workflow/component/modelParamUtils.ts diff --git a/src/api/settings/workflow/index.ts b/src/api/settings/workflow/index.ts index c4f93b2..ae47272 100644 --- a/src/api/settings/workflow/index.ts +++ b/src/api/settings/workflow/index.ts @@ -25,6 +25,7 @@ export interface NodeLibraryItem { postToolOption: boolean; skillOption: boolean; promptOption: boolean; + negativePromptOption: boolean; isSaveFileOption: boolean; formConfigOption: boolean; modelConfigOption: boolean; @@ -51,6 +52,8 @@ export interface WorkflowModelItem { baseUrl?: string; enabled?: number | boolean; isOwner?: number; + // 模型请求参数模板(选择模型后渲染为递归表单,与 DSL modelRequestParams 结构一致) + requestBodyMapping?: Record; [key: string]: any; } diff --git a/src/components/json-schema-editor/FieldConfigDialog.vue b/src/components/json-schema-editor/FieldConfigDialog.vue index 2bbc34b..cb718d3 100644 --- a/src/components/json-schema-editor/FieldConfigDialog.vue +++ b/src/components/json-schema-editor/FieldConfigDialog.vue @@ -36,15 +36,45 @@ -