From 56b82c1be23e8637b6200a9e0e17d79e63a8ec36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Fri, 20 Mar 2026 17:01:14 +0800 Subject: [PATCH 01/12] feat: `Variable assign` supports convert type --- .../impl/base_variable_assign_node.py | 34 ++++++++++++++++--- .../nodes/variable-assign-node/index.ts | 8 ++++- .../nodes/variable-assign-node/index.vue | 17 ++++++++-- 3 files changed, 51 insertions(+), 8 deletions(-) diff --git a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py index 3ff1982f573..67d0584af0d 100644 --- a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py +++ b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py @@ -31,6 +31,25 @@ def chat_evaluation(self, variable, value): else: self.workflow_manage.chat_context[variable['fields'][1]] = value + def convert(self, val, target_type): + if not target_type or val is None: + return val + + if target_type == 'json_object': + return json.loads(val) + elif target_type == 'json_string': + return json.dumps(val, ensure_ascii=False) + elif target_type == 'string': + return str(val) + elif target_type == 'int': + return int(val) + elif target_type == 'float': + return float(val) + elif target_type == 'boolean': + return bool(val) + else: + return val + def handle(self, variable, evaluation): result = { 'name': variable['name'], @@ -42,19 +61,23 @@ def handle(self, variable, evaluation): val = variable['value'] else: val = json.loads(variable['value']) + val = self.convert(val, variable['target_type']) evaluation(variable, val) result['output_value'] = variable['value'] = val elif variable['type'] == 'string': # 变量解析 例如:{{global.xxx}} val = self.workflow_manage.generate_prompt(variable['value']) + val = self.convert(val, variable['target_type']) evaluation(variable, val) result['output_value'] = val else: val = variable['value'] + val = self.convert(val, variable['target_type']) evaluation(variable, val) result['output_value'] = val else: reference = self.get_reference_content(variable['reference']) + reference = self.convert(reference, variable['target_type']) evaluation(variable, reference) result['output_value'] = reference return result @@ -62,22 +85,23 @@ def handle(self, variable, evaluation): def execute(self, variable_list, **kwargs) -> NodeResult: # result_list = [] - is_chat = False + contains_chat_variable = False for variable in variable_list: if 'fields' not in variable: continue + if 'global' == variable['fields'][0]: result = self.handle(variable, self.global_evaluation) result_list.append(result) - if 'chat' == variable['fields'][0]: + elif 'chat' == variable['fields'][0]: result = self.handle(variable, self.chat_evaluation) result_list.append(result) - is_chat = True - if 'loop' == variable['fields'][0]: + contains_chat_variable = True + elif 'loop' == variable['fields'][0]: result = self.handle(variable, self.loop_evaluation) result_list.append(result) - if is_chat: + if contains_chat_variable: from application.flow.loop_workflow_manage import LoopWorkflowManage if isinstance(self.workflow_manage, LoopWorkflowManage): self.workflow_manage.parentWorkflowManage.get_chat_info().set_chat_variable( diff --git a/ui/src/workflow/nodes/variable-assign-node/index.ts b/ui/src/workflow/nodes/variable-assign-node/index.ts index 567bf425ae1..6c50d4b73cd 100644 --- a/ui/src/workflow/nodes/variable-assign-node/index.ts +++ b/ui/src/workflow/nodes/variable-assign-node/index.ts @@ -7,8 +7,14 @@ class VariableAssignNode extends AppNode { } } +class VariableAssignModel extends AppNodeModel { + get_width() { + return 450 + } +} + export default { type: 'variable-assign-node', - model: AppNodeModel, + model: VariableAssignModel, view: VariableAssignNode } diff --git a/ui/src/workflow/nodes/variable-assign-node/index.vue b/ui/src/workflow/nodes/variable-assign-node/index.vue index a455730e0d6..79cd5698197 100644 --- a/ui/src/workflow/nodes/variable-assign-node/index.vue +++ b/ui/src/workflow/nodes/variable-assign-node/index.vue @@ -68,6 +68,7 @@ + + + + + + + + @@ -174,6 +186,7 @@ const workflowMode = inject('workflowMode') as WorkflowMode const props = defineProps<{ nodeModel: any }>() const typeOptions = ['string', 'num', 'json', 'bool'] +const targetTypeOptions = ['string', 'int', 'float', 'json_object', 'json_string', 'boolean'] const wheel = (e: any) => { if (e.ctrlKey === true) { From 74684af56a85e29066478681bafdabed06215124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Fri, 20 Mar 2026 18:53:23 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/locales/lang/en-US/workflow.ts | 1 + ui/src/locales/lang/zh-CN/workflow.ts | 1 + ui/src/locales/lang/zh-Hant/workflow.ts | 1 + .../nodes/variable-assign-node/index.vue | 39 +++++++++++-------- 4 files changed, 26 insertions(+), 16 deletions(-) diff --git a/ui/src/locales/lang/en-US/workflow.ts b/ui/src/locales/lang/en-US/workflow.ts index 939706357f9..fdaa6981557 100644 --- a/ui/src/locales/lang/en-US/workflow.ts +++ b/ui/src/locales/lang/en-US/workflow.ts @@ -317,6 +317,7 @@ You are a master of problem optimization, adept at accurately inferring user int label: 'Variable Assign', text: 'Update the value of the global variable', assign: 'Set Value', + convertType: 'Convert type', }, variableAggregationNode: { label: 'Variable Aggregation', diff --git a/ui/src/locales/lang/zh-CN/workflow.ts b/ui/src/locales/lang/zh-CN/workflow.ts index 79164f83bff..6ea6beec65d 100644 --- a/ui/src/locales/lang/zh-CN/workflow.ts +++ b/ui/src/locales/lang/zh-CN/workflow.ts @@ -316,6 +316,7 @@ export default { label: '变量赋值', text: '更新全局变量的值', assign: '赋值', + convertType: '转换类型', }, mcpNode: { label: 'MCP 调用', diff --git a/ui/src/locales/lang/zh-Hant/workflow.ts b/ui/src/locales/lang/zh-Hant/workflow.ts index 326b8c5e863..ce575ac7c19 100644 --- a/ui/src/locales/lang/zh-Hant/workflow.ts +++ b/ui/src/locales/lang/zh-Hant/workflow.ts @@ -316,6 +316,7 @@ export default { label: '變數賦值', text: '更新全域變數的值', assign: '賦值', + convertType: '轉換類型', }, variableAggregationNode: { label: '變量聚合', diff --git a/ui/src/workflow/nodes/variable-assign-node/index.vue b/ui/src/workflow/nodes/variable-assign-node/index.vue index 79cd5698197..900b14bc801 100644 --- a/ui/src/workflow/nodes/variable-assign-node/index.vue +++ b/ui/src/workflow/nodes/variable-assign-node/index.vue @@ -68,7 +68,7 @@ - + - + - - + + @@ -154,13 +153,13 @@ ref="nodeCascaderRef2" :nodeModel="nodeModel" class="mr-8" - style="width: 250px" + style="width: 230px" :placeholder="$t('workflow.variable.placeholder')" v-model="item.reference" /> - - + + @@ -186,7 +185,15 @@ const workflowMode = inject('workflowMode') as WorkflowMode const props = defineProps<{ nodeModel: any }>() const typeOptions = ['string', 'num', 'json', 'bool'] -const targetTypeOptions = ['string', 'int', 'float', 'json_object', 'json_string', 'boolean'] +const targetTypeOptions = [ + { label: t('workflow.nodes.variableAssignNode.convertType'), key: '' }, + { label: 'string', key: 'string' }, + { label: 'int', key: 'int' }, + { label: 'float', key: 'float' }, + { label: 'json_object', key: 'json_object' }, + { label: 'json_string', key: 'json_string' }, + { label: 'boolean', key: 'boolean' }, +] const wheel = (e: any) => { if (e.ctrlKey === true) { From e3563e677b01c3b907b917cb9eeb88d1a6f07139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Fri, 20 Mar 2026 19:11:51 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=8F=AA=E6=9C=89string=E9=9C=80=E8=A6=81=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E8=BD=AC=E6=8D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/base_variable_assign_node.py | 12 ++++++++++++ ui/src/workflow/nodes/variable-assign-node/index.vue | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py index 67d0584af0d..3d807d1dce6 100644 --- a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py +++ b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py @@ -36,16 +36,28 @@ def convert(self, val, target_type): return val if target_type == 'json_object': + if isinstance(val, dict) or isinstance(val, list): + return val return json.loads(val) elif target_type == 'json_string': + if isinstance(val, str): + return val return json.dumps(val, ensure_ascii=False) elif target_type == 'string': + if isinstance(val, str): + return val return str(val) elif target_type == 'int': + if isinstance(val, int): + return val return int(val) elif target_type == 'float': + if isinstance(val, float): + return val return float(val) elif target_type == 'boolean': + if isinstance(val, bool): + return val return bool(val) else: return val diff --git a/ui/src/workflow/nodes/variable-assign-node/index.vue b/ui/src/workflow/nodes/variable-assign-node/index.vue index 900b14bc801..eb585bfb678 100644 --- a/ui/src/workflow/nodes/variable-assign-node/index.vue +++ b/ui/src/workflow/nodes/variable-assign-node/index.vue @@ -144,7 +144,12 @@ - + From 92cd721261de834b1d79a7b5c51813c71be52ea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Fri, 20 Mar 2026 19:30:34 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E5=B0=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nodes/variable-assign-node/index.vue | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ui/src/workflow/nodes/variable-assign-node/index.vue b/ui/src/workflow/nodes/variable-assign-node/index.vue index eb585bfb678..ae4db407182 100644 --- a/ui/src/workflow/nodes/variable-assign-node/index.vue +++ b/ui/src/workflow/nodes/variable-assign-node/index.vue @@ -67,8 +67,8 @@ - + - + @@ -147,7 +148,7 @@ @@ -157,13 +158,12 @@ - + From de6a04b7bc491d6f468843b215c8b7c5fafddd44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Fri, 20 Mar 2026 22:56:07 +0800 Subject: [PATCH 05/12] fix --- .../impl/base_variable_assign_node.py | 8 ++++---- ui/src/locales/lang/en-US/workflow.ts | 1 + ui/src/locales/lang/zh-CN/workflow.ts | 1 + ui/src/locales/lang/zh-Hant/workflow.ts | 1 + ui/src/workflow/nodes/variable-assign-node/index.vue | 8 +++----- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py index a209e01e4c1..13c16f48be3 100644 --- a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py +++ b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py @@ -80,23 +80,23 @@ def handle(self, variable, evaluation): val = variable['value'] else: val = json.loads(variable['value']) - val = self.convert(val, variable['target_type']) + val = self.convert(val, variable.get('target_type')) evaluation(variable, val) result['output_value'] = variable['value'] = val elif variable['type'] == 'string': # 变量解析 例如:{{global.xxx}} val = self.workflow_manage.generate_prompt(variable['value']) - val = self.convert(val, variable['target_type']) + val = self.convert(val, variable.get('target_type')) evaluation(variable, val) result['output_value'] = val else: val = variable['value'] - val = self.convert(val, variable['target_type']) + val = self.convert(val, variable.get('target_type')) evaluation(variable, val) result['output_value'] = val else: reference = self.get_reference_content(variable['reference']) - reference = self.convert(reference, variable['target_type']) + reference = self.convert(reference, variable.get('target_type')) evaluation(variable, reference) result['output_value'] = reference return result diff --git a/ui/src/locales/lang/en-US/workflow.ts b/ui/src/locales/lang/en-US/workflow.ts index fdaa6981557..13aea3091d9 100644 --- a/ui/src/locales/lang/en-US/workflow.ts +++ b/ui/src/locales/lang/en-US/workflow.ts @@ -318,6 +318,7 @@ You are a master of problem optimization, adept at accurately inferring user int text: 'Update the value of the global variable', assign: 'Set Value', convertType: 'Convert type', + doNotConvert: 'Do not convert', }, variableAggregationNode: { label: 'Variable Aggregation', diff --git a/ui/src/locales/lang/zh-CN/workflow.ts b/ui/src/locales/lang/zh-CN/workflow.ts index 6ea6beec65d..1efb31645b3 100644 --- a/ui/src/locales/lang/zh-CN/workflow.ts +++ b/ui/src/locales/lang/zh-CN/workflow.ts @@ -317,6 +317,7 @@ export default { text: '更新全局变量的值', assign: '赋值', convertType: '转换类型', + doNotConvert: '不转换', }, mcpNode: { label: 'MCP 调用', diff --git a/ui/src/locales/lang/zh-Hant/workflow.ts b/ui/src/locales/lang/zh-Hant/workflow.ts index ce575ac7c19..a48464a886a 100644 --- a/ui/src/locales/lang/zh-Hant/workflow.ts +++ b/ui/src/locales/lang/zh-Hant/workflow.ts @@ -317,6 +317,7 @@ export default { text: '更新全域變數的值', assign: '賦值', convertType: '轉換類型', + doNotConvert: '不轉換', }, variableAggregationNode: { label: '變量聚合', diff --git a/ui/src/workflow/nodes/variable-assign-node/index.vue b/ui/src/workflow/nodes/variable-assign-node/index.vue index ae4db407182..962b6afcdf5 100644 --- a/ui/src/workflow/nodes/variable-assign-node/index.vue +++ b/ui/src/workflow/nodes/variable-assign-node/index.vue @@ -123,10 +123,8 @@ @@ -191,7 +189,7 @@ const props = defineProps<{ nodeModel: any }>() const typeOptions = ['string', 'num', 'json', 'bool'] const targetTypeOptions = [ - { label: t('workflow.nodes.variableAssignNode.convertType'), key: '' }, + { label: t('workflow.nodes.variableAssignNode.doNotConvert'), key: '' }, { label: 'string', key: 'string' }, { label: 'int', key: 'int' }, { label: 'float', key: 'float' }, From bb2c7db5b6d51d3b343869fd01ed52c4a0130576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Fri, 20 Mar 2026 23:37:07 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E5=8F=98=E9=87=8F=E8=B5=8B=E5=80=BC?= =?UTF-8?q?=EF=BC=9A=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../variable_assign_node/impl/base_variable_assign_node.py | 4 ++++ ui/src/workflow/nodes/variable-assign-node/index.vue | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py index 13c16f48be3..81511c64348 100644 --- a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py +++ b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py @@ -89,6 +89,10 @@ def handle(self, variable, evaluation): val = self.convert(val, variable.get('target_type')) evaluation(variable, val) result['output_value'] = val + elif variable['type'] == 'null': + val = None + evaluation(variable, val) + result['output_value'] = val else: val = variable['value'] val = self.convert(val, variable.get('target_type')) diff --git a/ui/src/workflow/nodes/variable-assign-node/index.vue b/ui/src/workflow/nodes/variable-assign-node/index.vue index 962b6afcdf5..5d9b5a0c22b 100644 --- a/ui/src/workflow/nodes/variable-assign-node/index.vue +++ b/ui/src/workflow/nodes/variable-assign-node/index.vue @@ -187,7 +187,7 @@ import { WorkflowMode } from '@/enums/application' const workflowMode = inject('workflowMode') as WorkflowMode const props = defineProps<{ nodeModel: any }>() -const typeOptions = ['string', 'num', 'json', 'bool'] +const typeOptions = ['string', 'num', 'json', 'bool', 'null'] const targetTypeOptions = [ { label: t('workflow.nodes.variableAssignNode.doNotConvert'), key: '' }, { label: 'string', key: 'string' }, From 4ab9407587cc3c3f1fc98a8ef5082e0d9c23534f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Sat, 21 Mar 2026 00:24:21 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E7=AE=80=E5=8C=96=E8=B5=8B=E5=80=BC?= =?UTF-8?q?=E4=B8=BAnull=E7=9A=84=E9=85=8D=E7=BD=AE=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/base_variable_assign_node.py | 8 ++++---- ui/src/workflow/nodes/variable-assign-node/index.vue | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py index 81511c64348..b3397314b28 100644 --- a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py +++ b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py @@ -89,15 +89,15 @@ def handle(self, variable, evaluation): val = self.convert(val, variable.get('target_type')) evaluation(variable, val) result['output_value'] = val - elif variable['type'] == 'null': - val = None - evaluation(variable, val) - result['output_value'] = val else: val = variable['value'] val = self.convert(val, variable.get('target_type')) evaluation(variable, val) result['output_value'] = val + elif variable['source'] == 'null': + val = None + evaluation(variable, val) + result['output_value'] = val else: reference = self.get_reference_content(variable['reference']) reference = self.convert(reference, variable.get('target_type')) diff --git a/ui/src/workflow/nodes/variable-assign-node/index.vue b/ui/src/workflow/nodes/variable-assign-node/index.vue index 5d9b5a0c22b..1fbc4074090 100644 --- a/ui/src/workflow/nodes/variable-assign-node/index.vue +++ b/ui/src/workflow/nodes/variable-assign-node/index.vue @@ -45,6 +45,7 @@ + @@ -86,7 +87,6 @@ > - + () -const typeOptions = ['string', 'num', 'json', 'bool', 'null'] +const typeOptions = ['string', 'num', 'json', 'bool'] const targetTypeOptions = [ { label: t('workflow.nodes.variableAssignNode.doNotConvert'), key: '' }, { label: 'string', key: 'string' }, From 42f6c9bf425e18f6a0a8903ebe1e01721133db03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Sat, 21 Mar 2026 00:31:15 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E5=B0=8F=E8=B0=83=E6=95=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/workflow/nodes/variable-assign-node/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/workflow/nodes/variable-assign-node/index.vue b/ui/src/workflow/nodes/variable-assign-node/index.vue index 1fbc4074090..a78b477e8f3 100644 --- a/ui/src/workflow/nodes/variable-assign-node/index.vue +++ b/ui/src/workflow/nodes/variable-assign-node/index.vue @@ -45,7 +45,7 @@ - + From af90a947579a7b400377cf9dcf01149a5f91ed8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Wed, 25 Mar 2026 12:57:03 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E5=92=8C=E8=BE=93=E5=87=BA=E5=8F=82=E6=95=B0=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../variable_assign_node/impl/base_variable_assign_node.py | 3 +++ ui/src/components/execution-detail-card/index.vue | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py index b3397314b28..54149a7333c 100644 --- a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py +++ b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py @@ -103,6 +103,9 @@ def handle(self, variable, evaluation): reference = self.convert(reference, variable.get('target_type')) evaluation(variable, reference) result['output_value'] = reference + + result['input_type'] = type(result.get('input_value')).__name__ if result.get('input_value') is not None else 'null' + result['output_type'] = type(result.get('output_value')).__name__ if result.get('output_value') is not None else 'null' return result def execute(self, variable_list, **kwargs) -> NodeResult: diff --git a/ui/src/components/execution-detail-card/index.vue b/ui/src/components/execution-detail-card/index.vue index b7c91965977..93984e08ec9 100644 --- a/ui/src/components/execution-detail-card/index.vue +++ b/ui/src/components/execution-detail-card/index.vue @@ -880,7 +880,7 @@
- {{ f.name }}: {{ f.input_value }} + {{ f.name }} ({{ f.input_type }}): {{ f.input_value }}
@@ -890,7 +890,7 @@
- {{ f.name }}: {{ f.output_value }} + {{ f.name }} ({{ f.output_type }}): {{ f.output_value }}
From e62183426abbb3e349ed656b97af8a8bb83489c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Thu, 26 Mar 2026 10:09:20 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=9B=9E=E9=80=80?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E6=8A=A5=E9=94=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../variable_assign_node/impl/base_variable_assign_node.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py index 54149a7333c..041aa8b9667 100644 --- a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py +++ b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py @@ -99,7 +99,7 @@ def handle(self, variable, evaluation): evaluation(variable, val) result['output_value'] = val else: - reference = self.get_reference_content(variable['reference']) + reference = self.get_reference_content(variable.get('reference')) reference = self.convert(reference, variable.get('target_type')) evaluation(variable, reference) result['output_value'] = reference @@ -109,7 +109,6 @@ def handle(self, variable, evaluation): return result def execute(self, variable_list, **kwargs) -> NodeResult: - # result_list = [] contains_chat_variable = False for variable in variable_list: From 136c30e288b40067878785f1fd326359d83571ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Thu, 26 Mar 2026 10:15:18 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E6=92=A4=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../variable_assign_node/impl/base_variable_assign_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py index 041aa8b9667..30340d5fb81 100644 --- a/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py +++ b/apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py @@ -99,7 +99,7 @@ def handle(self, variable, evaluation): evaluation(variable, val) result['output_value'] = val else: - reference = self.get_reference_content(variable.get('reference')) + reference = self.get_reference_content(variable['reference']) reference = self.convert(reference, variable.get('target_type')) evaluation(variable, reference) result['output_value'] = reference From 2d1449aeb6715f03b96edb1840ea8cab9bea7221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Tue, 31 Mar 2026 14:21:35 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E5=B0=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/locales/lang/en-US/workflow.ts | 18 +++++++++--------- ui/src/locales/lang/zh-CN/workflow.ts | 6 +++--- ui/src/locales/lang/zh-Hant/workflow.ts | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ui/src/locales/lang/en-US/workflow.ts b/ui/src/locales/lang/en-US/workflow.ts index ec1b5e39c83..e39d262a977 100644 --- a/ui/src/locales/lang/en-US/workflow.ts +++ b/ui/src/locales/lang/en-US/workflow.ts @@ -200,18 +200,18 @@ export default { label: 'Question Optimization', text: 'Optimize and improve the current question based on historical chat records to better match knowledge segments', result: 'Optimized Question Result', - systemDefault: `#Role + systemDefault: `# Role You are a master of problem optimization, adept at accurately inferring user intentions based on context and optimizing the questions raised by users. -##Skills -###Skill 1: Optimizing Problems -2. Receive user input questions. -3. Carefully analyze the meaning of the problem based on the context. -4. Output optimized problems. +## Skills +### Skill 1: Optimizing Problems +1. Receive user input questions. +2. Carefully analyze the meaning of the problem based on the context. +3. Output optimized problems. -##Limitations: --Only return the optimized problem without any additional explanation or clarification. --Ensure that the optimized problem accurately reflects the original problem intent and does not alter the original intention.`, +## Limitations: +- Only return the optimized problem without any additional explanation or clarification. +- Ensure that the optimized problem accurately reflects the original problem intent and does not alter the original intention.`, }, conditionNode: { label: 'Conditional Branch', diff --git a/ui/src/locales/lang/zh-CN/workflow.ts b/ui/src/locales/lang/zh-CN/workflow.ts index b3169c439ce..3c004d437c2 100644 --- a/ui/src/locales/lang/zh-CN/workflow.ts +++ b/ui/src/locales/lang/zh-CN/workflow.ts @@ -205,9 +205,9 @@ export default { ## 技能 ### 技能 1: 优化问题 -2. 接收用户输入的问题。 -3. 依据上下文仔细分析问题含义。 -4. 输出优化后的问题。 +1. 接收用户输入的问题。 +2. 依据上下文仔细分析问题含义。 +3. 输出优化后的问题。 ## 限制: - 仅返回优化后的问题,不进行额外解释或说明。 diff --git a/ui/src/locales/lang/zh-Hant/workflow.ts b/ui/src/locales/lang/zh-Hant/workflow.ts index c62b2e507d6..a7fd05c9f1b 100644 --- a/ui/src/locales/lang/zh-Hant/workflow.ts +++ b/ui/src/locales/lang/zh-Hant/workflow.ts @@ -205,9 +205,9 @@ export default { ## 技能 ### 技能 1: 優化問題 -2. 接收用戶輸入的問題。 -3. 依據上下文仔細分析問題含義。 -4. 輸出優化後的問題。 +1. 接收用戶輸入的問題。 +2. 依據上下文仔細分析問題含義。 +3. 輸出優化後的問題。 ## 限制: - 僅返回優化後的問題,不進行額外解釋或說明。