执行传递参数更改
This commit is contained in:
@@ -2117,13 +2117,10 @@ const sendMessage = async () => {
|
|||||||
// 2. 构建节点输入参数
|
// 2. 构建节点输入参数
|
||||||
const nodeInputParams =
|
const nodeInputParams =
|
||||||
currentWorkflowForCreation.value.nodeInputParams?.map((node: any) => {
|
currentWorkflowForCreation.value.nodeInputParams?.map((node: any) => {
|
||||||
const nodeParam: any = {
|
// 先展开原始节点的所有字段(保留 promptContent、isSaveFile、outputConfig、modelOutputFields 等)
|
||||||
id: node.id,
|
const nodeParam: any = { ...node };
|
||||||
nodeCode: node.nodeCode,
|
|
||||||
name: node.name,
|
|
||||||
};
|
|
||||||
|
|
||||||
// 添加表单配置和值
|
// 用用户填写的值覆盖 formConfig
|
||||||
if (node.formConfig && Array.isArray(node.formConfig)) {
|
if (node.formConfig && Array.isArray(node.formConfig)) {
|
||||||
nodeParam.formConfig = node.formConfig.map((field: any) => {
|
nodeParam.formConfig = node.formConfig.map((field: any) => {
|
||||||
// HTTP body: 将创作模式填写值回写到 body 的 showInForm 子字段
|
// HTTP body: 将创作模式填写值回写到 body 的 showInForm 子字段
|
||||||
@@ -2165,10 +2162,9 @@ const sendMessage = async () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加其他配置
|
// 用用户填写的值覆盖 config
|
||||||
if (node.config) {
|
if (node.config) {
|
||||||
nodeParam.config = { ...node.config };
|
nodeParam.config = { ...node.config };
|
||||||
// 更新 config 中的值
|
|
||||||
Object.keys(node.config).forEach((key) => {
|
Object.keys(node.config).forEach((key) => {
|
||||||
const fieldKey = `${node.id}_${key}`;
|
const fieldKey = `${node.id}_${key}`;
|
||||||
if (creationFormValues[fieldKey] !== undefined) {
|
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;
|
return nodeParam;
|
||||||
}) || [];
|
}) || [];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user