Skip to content

Commit 8fd568d

Browse files
authored
fix: Workflow Basic Node User Input Configurable Title (#4439)
1 parent 317d630 commit 8fd568d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

ui/src/views/knowledge-workflow/component/action/KnowledgeBase.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
>
1111
<template #default>
1212
<h4 class="title-decoration-1 mb-16 mt-4">
13-
{{ $t('chat.userInput') }}
13+
{{ chat_title || $t('chat.userInput') }}
1414
</h4>
1515
</template>
1616
</DynamicsForm>
@@ -26,6 +26,10 @@ const dynamicsFormRef = ref<InstanceType<typeof DynamicsForm>>()
2626
const validate = () => {
2727
return dynamicsFormRef.value?.validate()
2828
}
29+
const chat_title = computed(() => {
30+
const kBase = props.workflow?.nodes?.find((n: any) => n.type === WorkflowType.KnowledgeBase)
31+
return kBase.properties.user_input_config.title
32+
})
2933
const base_form_list = computed(() => {
3034
const kBase = props.workflow?.nodes?.find((n: any) => n.type === WorkflowType.KnowledgeBase)
3135
if (kBase) {

ui/src/workflow/nodes/knowledge-base-node/component/UserInputFieldTable.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ onMounted(() => {
209209
if (props.nodeModel.properties.user_input_field_list) {
210210
inputFieldList.value = cloneDeep(props.nodeModel.properties.user_input_field_list)
211211
}
212-
212+
if (props.nodeModel.properties.user_input_config) {
213+
inputFieldConfig.value = props.nodeModel.properties.user_input_config
214+
}
215+
set(props.nodeModel.properties, 'user_input_config', inputFieldConfig)
213216
onDragHandle()
214217
})
215218
</script>

0 commit comments

Comments
 (0)