From 89792d5d3df98d111425309679f05538535d3445 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud <79562285+wangdan-fit2cloud@users.noreply.github.com> Date: Fri, 28 Feb 2025 22:42:23 +0800 Subject: [PATCH 1/6] perf: optimization codemirror component --- ui/src/components/codemirror-editor/index.vue | 99 +++++++- .../component/FunctionFormDrawer.vue | 54 +---- .../icons/variable-assign-node-icon.vue | 2 +- ui/src/workflow/nodes/function-node/index.vue | 56 +---- .../nodes/variable-assign-node/index.vue | 212 +++++++++--------- 5 files changed, 203 insertions(+), 220 deletions(-) diff --git a/ui/src/components/codemirror-editor/index.vue b/ui/src/components/codemirror-editor/index.vue index c4086b872..0d9d81cac 100644 --- a/ui/src/components/codemirror-editor/index.vue +++ b/ui/src/components/codemirror-editor/index.vue @@ -1,16 +1,50 @@ - + diff --git a/ui/src/views/function-lib/component/FunctionFormDrawer.vue b/ui/src/views/function-lib/component/FunctionFormDrawer.vue index 2b74e052b..2b8031e8c 100644 --- a/ui/src/views/function-lib/component/FunctionFormDrawer.vue +++ b/ui/src/views/function-lib/component/FunctionFormDrawer.vue @@ -133,13 +133,8 @@ -
- - +
+

{{ $t('common.param.outputParam') }} @@ -162,27 +157,6 @@

- - - - - @@ -223,9 +197,6 @@ const form = ref({ permission_type: 'PRIVATE' }) -const dialogVisible = ref(false) -const cloneContent = ref('') - watch(visible, (bool) => { if (!bool) { isEdit.value = false @@ -259,14 +230,8 @@ const rules = reactive({ ] }) -function openCodemirrorDialog() { - cloneContent.value = form.value.code - dialogVisible.value = true -} - -function submitDialog() { - form.value.code = cloneContent.value - dialogVisible.value = false +function submitCodemirrorEditor(val: string) { + form.value.code = val } function close() { @@ -353,13 +318,4 @@ defineExpose({ open }) - + diff --git a/ui/src/workflow/icons/variable-assign-node-icon.vue b/ui/src/workflow/icons/variable-assign-node-icon.vue index d83f578d1..a7b580ff3 100644 --- a/ui/src/workflow/icons/variable-assign-node-icon.vue +++ b/ui/src/workflow/icons/variable-assign-node-icon.vue @@ -1,5 +1,5 @@ diff --git a/ui/src/workflow/nodes/function-node/index.vue b/ui/src/workflow/nodes/function-node/index.vue index abd5c31fa..0bbd5158a 100644 --- a/ui/src/workflow/nodes/function-node/index.vue +++ b/ui/src/workflow/nodes/function-node/index.vue @@ -23,7 +23,8 @@ :prop="'input_field_list.' + index + '.value'" :rules="{ required: item.is_required, - message: item.source === 'reference' + message: + item.source === 'reference' ? $t('views.functionLib.functionForm.form.param.selectPlaceholder') : $t('views.functionLib.functionForm.form.param.inputPlaceholder'), trigger: 'blur' @@ -76,17 +77,13 @@
{{ $t('views.functionLib.functionForm.form.param.code') }}
-
+
-
- - - - - - + diff --git a/ui/src/workflow/nodes/variable-assign-node/index.vue b/ui/src/workflow/nodes/variable-assign-node/index.vue index ecd8fd31b..a88bccec9 100644 --- a/ui/src/workflow/nodes/variable-assign-node/index.vue +++ b/ui/src/workflow/nodes/variable-assign-node/index.vue @@ -7,6 +7,7 @@ require-asterisk-position="right" label-width="auto" ref="replyNodeFormRef" + hide-required-asterisk > @@ -212,6 +203,7 @@ function submitDialog(val: string) { const replyNodeFormRef = ref() const nodeCascaderRef = ref() const nodeCascaderRef2 = ref() + const validate = async () => { // console.log(replyNodeFormRef.value.validate()) let ps = [ From bd5d12977876b3c61844d6c31da6f77371ac336f Mon Sep 17 00:00:00 2001 From: maninhill <41712985+maninhill@users.noreply.github.com> Date: Sat, 1 Mar 2025 09:31:24 +0800 Subject: [PATCH 2/6] chore: Update README.md (#2452) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9556afe31..f75c49dee 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ MaxKB = Max Knowledge Base, it is a chatbot based on Large Language Models (LLM) - **Flexible Orchestration**: Equipped with a powerful workflow engine and function library, enabling the orchestration of AI processes to meet the needs of complex business scenarios. - **Seamless Integration**: Facilitates zero-coding rapid integration into third-party business systems, quickly equipping existing systems with intelligent Q&A capabilities to enhance user satisfaction. - **Model-Agnostic**: Supports various large models, including private models (such as DeepSeek, Llama, Qwen, etc.) and public models (like OpenAI, Claude, Gemini, etc.). +- **Multi Modal**: Native support for input and output text, image, audio and video. ## Quick start From 7cdd188b060399cba976e593d7d389de281ead2f Mon Sep 17 00:00:00 2001 From: CaptainB Date: Mon, 3 Mar 2025 10:20:41 +0800 Subject: [PATCH 3/6] refactor: rename function lib export subfix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1052638 --user=刘瑞斌 函数库导出后缀名优化 https://www.tapd.cn/57709429/s/1660837 --- apps/function_lib/serializers/function_lib_serializer.py | 2 +- ui/src/api/function-lib.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/function_lib/serializers/function_lib_serializer.py b/apps/function_lib/serializers/function_lib_serializer.py index 6c658ab81..cccdfcdc3 100644 --- a/apps/function_lib/serializers/function_lib_serializer.py +++ b/apps/function_lib/serializers/function_lib_serializer.py @@ -249,7 +249,7 @@ class FunctionLibSerializer(serializers.Serializer): mk_instance = FlibInstance(application_dict, 'v1') application_pickle = pickle.dumps(mk_instance) response = HttpResponse(content_type='text/plain', content=application_pickle) - response['Content-Disposition'] = f'attachment; filename="{function_lib.name}.flib"' + response['Content-Disposition'] = f'attachment; filename="{function_lib.name}.fx"' return response except Exception as e: return result.error(str(e), response_status=status.HTTP_500_INTERNAL_SERVER_ERROR) diff --git a/ui/src/api/function-lib.ts b/ui/src/api/function-lib.ts index f9082a308..41a90a96c 100644 --- a/ui/src/api/function-lib.ts +++ b/ui/src/api/function-lib.ts @@ -105,7 +105,7 @@ const exportFunctionLib = ( loading?: Ref ) => { return exportFile( - name + '.flib', + name + '.fx', `${prefix}/${id}/export`, undefined, loading From 7eff1c919b0240f5ee39065a760eb9c60dee869d Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Mon, 3 Mar 2025 12:04:26 +0800 Subject: [PATCH 4/6] fix: After generating the problem, jump to the first page (#2457) --- ui/src/views/document/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/views/document/index.vue b/ui/src/views/document/index.vue index 626282f36..35692236b 100644 --- a/ui/src/views/document/index.vue +++ b/ui/src/views/document/index.vue @@ -440,7 +440,7 @@ - +
From 7497c1b7cdb9d4c9dd47d06b8529985741457315 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Mon, 3 Mar 2025 14:40:25 +0800 Subject: [PATCH 5/6] fix: Fix user input table title not changed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1052676 --user=刘瑞斌 【应用】高级编排-设置-基本信息-修改用户输入标题后保存-未更新-再次进入后仍展示用户输入 https://www.tapd.cn/57709429/s/1661083 --- .../workflow/nodes/base-node/component/UserInputFieldTable.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/workflow/nodes/base-node/component/UserInputFieldTable.vue b/ui/src/workflow/nodes/base-node/component/UserInputFieldTable.vue index f0eaa0daf..5ef1e1f2a 100644 --- a/ui/src/workflow/nodes/base-node/component/UserInputFieldTable.vue +++ b/ui/src/workflow/nodes/base-node/component/UserInputFieldTable.vue @@ -1,6 +1,6 @@