diff --git a/ui/src/workflow/nodes/ai-chat-node/index.vue b/ui/src/workflow/nodes/ai-chat-node/index.vue index dc80d08f2..e70865074 100644 --- a/ui/src/workflow/nodes/ai-chat-node/index.vue +++ b/ui/src/workflow/nodes/ai-chat-node/index.vue @@ -115,13 +115,23 @@ - + :preview="false" + :toolbars="[]" + :footers="footers" + > + + + + + + - + + + + + + + { return true } } +const dialogVisible = ref(false) +const cloneContent = ref('') +const footers: any = [null, '=', 0] +function openDialog() { + cloneContent.value = chat_data.value.prompt + dialogVisible.value = true +} +function submitDialog() { + set(props.nodeModel.properties.node_data, 'prompt', cloneContent.value) + dialogVisible.value = false +} const { params: { id } } = app.config.globalProperties.$route as any @@ -266,4 +295,10 @@ onMounted(() => { set(props.nodeModel, 'validate', validate) }) - + diff --git a/ui/src/workflow/nodes/base-node/index.vue b/ui/src/workflow/nodes/base-node/index.vue index 78758516d..38155fa9f 100644 --- a/ui/src/workflow/nodes/base-node/index.vue +++ b/ui/src/workflow/nodes/base-node/index.vue @@ -40,14 +40,32 @@ + class="reply-node-editor" + :footers="footers" + > + + + + + + + + + + + - + diff --git a/ui/src/workflow/nodes/question-node/index.vue b/ui/src/workflow/nodes/question-node/index.vue index 7d0226138..42e08d748 100644 --- a/ui/src/workflow/nodes/question-node/index.vue +++ b/ui/src/workflow/nodes/question-node/index.vue @@ -116,13 +116,23 @@ - + :preview="false" + :toolbars="[]" + :footers="footers" + > + + + + + + + + + + + + + { return true } } +const dialogVisible = ref(false) +const cloneContent = ref('') +const footers: any = [null, '=', 0] +function openDialog() { + cloneContent.value = form_data.value.prompt + dialogVisible.value = true +} +function submitDialog() { + set(props.nodeModel.properties.node_data, 'prompt', cloneContent.value) + dialogVisible.value = false +} const { params: { id } } = app.config.globalProperties.$route as any @@ -263,4 +293,10 @@ onMounted(() => { set(props.nodeModel, 'validate', validate) }) - + diff --git a/ui/src/workflow/nodes/reply-node/index.vue b/ui/src/workflow/nodes/reply-node/index.vue index 9a234fec1..bbd3c699b 100644 --- a/ui/src/workflow/nodes/reply-node/index.vue +++ b/ui/src/workflow/nodes/reply-node/index.vue @@ -16,7 +16,12 @@ 回复内容 - + @@ -24,6 +29,9 @@ () +const isKeyDown = ref(false) +const wheel = (e: any) => { + if (isKeyDown.value) { + e.preventDefault() + } else { + e.stopPropagation() + return true + } +} const form = { reply_type: 'content', content: '',