From 4367b1c6502d2be02df8d145441409e428cbc035 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud <79562285+wangdan-fit2cloud@users.noreply.github.com> Date: Mon, 24 Feb 2025 17:29:54 +0800 Subject: [PATCH] feat: Create workflow applications that support template selection --- .../locales/lang/en-US/views/application.ts | 8 ++- .../locales/lang/zh-CN/views/application.ts | 6 +- .../locales/lang/zh-Hant/views/application.ts | 4 ++ .../component/CreateApplicationDialog.vue | 67 ++++++++++++++++--- ui/src/workflow/common/data.ts | 42 ++++++++---- 5 files changed, 99 insertions(+), 28 deletions(-) diff --git a/ui/src/locales/lang/en-US/views/application.ts b/ui/src/locales/lang/en-US/views/application.ts index 82ed3fef3..10f5d9495 100644 --- a/ui/src/locales/lang/en-US/views/application.ts +++ b/ui/src/locales/lang/en-US/views/application.ts @@ -46,6 +46,10 @@ export default { simplePlaceholder: 'Suitable for beginners to create assistant.', workflowPlaceholder: 'Suitable for advanced users to customize the workflow of assistant' }, + appTemplate: { + blankApp: 'Blank APP', + assistantApp: 'Knowledge Assistant' + }, aiModel: { label: 'AI Model', placeholder: 'Please select an AI model' @@ -110,7 +114,7 @@ export default { reasoningContent: { label: 'Output Thinking', tooltip: - 'Please set the thinking label based on the model\'s return, and the content in the middle of the label will be recognized as the thinking process.', + "Please set the thinking label based on the model's return, and the content in the middle of the label will be recognized as the thinking process.", start: 'Start', end: 'End' } @@ -211,7 +215,7 @@ export default { slackSetting: { title: 'Slack Configuration', signingSecretPlaceholder: 'Please enter signing secret', - botUserTokenPlaceholder: 'Please enter bot user token', + botUserTokenPlaceholder: 'Please enter bot user token' }, copyUrl: 'Copy the link and fill it in' }, diff --git a/ui/src/locales/lang/zh-CN/views/application.ts b/ui/src/locales/lang/zh-CN/views/application.ts index 0f6733e13..f794936f5 100644 --- a/ui/src/locales/lang/zh-CN/views/application.ts +++ b/ui/src/locales/lang/zh-CN/views/application.ts @@ -41,6 +41,10 @@ export default { simplePlaceholder: '适合新手创建小助手', workflowPlaceholder: '适合高级用户自定义小助手的工作流' }, + appTemplate: { + blankApp: '空白应用', + assistantApp: '知识库问答助手' + }, aiModel: { label: 'AI 模型', placeholder: '请选择 AI 模型' @@ -198,7 +202,7 @@ export default { slackSetting: { title: 'Slack 应用配置', signingSecretPlaceholder: '请输入 Signing Secret', - botUserTokenPlaceholder: '请输入 Bot User Token', + botUserTokenPlaceholder: '请输入 Bot User Token' }, copyUrl: '复制链接填入到' }, diff --git a/ui/src/locales/lang/zh-Hant/views/application.ts b/ui/src/locales/lang/zh-Hant/views/application.ts index be2c236ba..47af0334a 100644 --- a/ui/src/locales/lang/zh-Hant/views/application.ts +++ b/ui/src/locales/lang/zh-Hant/views/application.ts @@ -41,6 +41,10 @@ export default { simplePlaceholder: '適合新手建立小助手', workflowPlaceholder: '適合高階用戶自訂小助手的工作流程' }, + appTemplate: { + blankApp: '空白應用', + assistantApp: '知識庫問答助手' + }, aiModel: { label: 'AI 模型', placeholder: '請選擇 AI 模型' diff --git a/ui/src/views/application/component/CreateApplicationDialog.vue b/ui/src/views/application/component/CreateApplicationDialog.vue index 234d56f75..11a079642 100644 --- a/ui/src/views/application/component/CreateApplicationDialog.vue +++ b/ui/src/views/application/component/CreateApplicationDialog.vue @@ -38,11 +38,7 @@ - +

{{ $t('views.application.simple') }}

{{ @@ -52,11 +48,7 @@
- +

{{ $t('views.application.workflow') }}

{{ @@ -68,6 +60,35 @@
+ +
+ + + + {{ $t('views.application.applicationForm.form.appTemplate.blankApp') }} + + + + + {{ $t('views.application.applicationForm.form.appTemplate.assistantApp') }} + + + +
+