diff --git a/src/views/settings/creation/index.vue b/src/views/settings/creation/index.vue index f29126e..036f18c 100644 --- a/src/views/settings/creation/index.vue +++ b/src/views/settings/creation/index.vue @@ -2117,13 +2117,10 @@ const sendMessage = async () => { // 2. 构建节点输入参数 const nodeInputParams = currentWorkflowForCreation.value.nodeInputParams?.map((node: any) => { - const nodeParam: any = { - id: node.id, - nodeCode: node.nodeCode, - name: node.name, - }; + // 先展开原始节点的所有字段(保留 promptContent、isSaveFile、outputConfig、modelOutputFields 等) + const nodeParam: any = { ...node }; - // 添加表单配置和值 + // 用用户填写的值覆盖 formConfig if (node.formConfig && Array.isArray(node.formConfig)) { nodeParam.formConfig = node.formConfig.map((field: any) => { // HTTP body: 将创作模式填写值回写到 body 的 showInForm 子字段 @@ -2165,10 +2162,9 @@ const sendMessage = async () => { }); } - // 添加其他配置 + // 用用户填写的值覆盖 config if (node.config) { nodeParam.config = { ...node.config }; - // 更新 config 中的值 Object.keys(node.config).forEach((key) => { const fieldKey = `${node.id}_${key}`; if (creationFormValues[fieldKey] !== undefined) { @@ -2177,11 +2173,6 @@ const sendMessage = async () => { }); } - // 添加其他字段 - if (node.inputSource) nodeParam.inputSource = node.inputSource; - if (node.modelConfig) nodeParam.modelConfig = node.modelConfig; - if (node.skillName) nodeParam.skillName = node.skillName; - return nodeParam; }) || [];