From a5acdad7b1ce7a8e82f958e345c991b72d5609ae Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Tue, 25 Mar 2025 18:31:42 +0800 Subject: [PATCH] perf: refine user input style --- ui/src/assets/fx/bochaai/detail.md | 13 +++--- ui/src/assets/fx/google_search/detail.md | 25 ++++++----- ui/src/assets/fx/langsearch/detail.md | 16 ++++---- .../component/chat-input-operate/index.vue | 1 - .../ai-chat/component/user-form/index.vue | 24 ++++++++--- ui/src/components/ai-chat/index.vue | 24 ++++++++++- .../layout/components/sidebar/SidebarItem.vue | 4 +- ui/src/views/function-lib/index.vue | 9 ++++ ui/src/workflow/common/NodeControl.vue | 6 --- .../workflow/icons/function-lib-node-icon.vue | 2 +- ui/src/workflow/nodes/ai-chat-node/index.vue | 41 ++++++++----------- ui/src/workflow/nodes/mcp-node/index.vue | 5 ++- 12 files changed, 97 insertions(+), 73 deletions(-) diff --git a/ui/src/assets/fx/bochaai/detail.md b/ui/src/assets/fx/bochaai/detail.md index 729dd233d76..dbbf940c90d 100644 --- a/ui/src/assets/fx/bochaai/detail.md +++ b/ui/src/assets/fx/bochaai/detail.md @@ -2,15 +2,14 @@ 博查工具是一个支持自然语言搜索的 Web Search API,从近百亿网页和生态内容源中搜索高质量世界知识,包括新闻、图片、视频、百科、机酒、学术等. - ## 配置 1. 获取API Key  -在[博查开放平台](https://open.bochaai.com/overview) 上申请 API 密钥。 -![API Key](/src/assets/fx/img/bocha_APIKey.jpg) + 在[博查开放平台](https://open.bochaai.com/overview) 上申请 API 密钥。 + ![API Key](/src/assets/fx/img/bocha_APIKey.jpg) 1. 在函数库中配置 -在函数库的博查函数面板中,点击 … > 启用参数,填写 API 密钥,并启用博查函数。 -![启动参数](/src/assets/fx/img/bocha_setting.jpg) + 在函数库的博查函数面板中,点击 … > 启用参数,填写 API 密钥,并启用博查函数。 + ![启动参数](/src/assets/fx/img/bocha_setting.jpg) 1. 在应用中使用 -在高级编排应用中,点击添加组件->函数库->博查,设置使用参数。 -![应用中使用](/src/assets/fx/img/bocha_app_used.jpg) \ No newline at end of file + 在高级编排应用中,点击添加组件->函数库->博查,设置使用参数。 + ![应用中使用](/src/assets/fx/img/bocha_app_used.jpg) diff --git a/ui/src/assets/fx/google_search/detail.md b/ui/src/assets/fx/google_search/detail.md index e6daef90270..42bc23664b4 100644 --- a/ui/src/assets/fx/google_search/detail.md +++ b/ui/src/assets/fx/google_search/detail.md @@ -5,19 +5,18 @@ Google 搜索工具是一个实时 API,可提取搜索引擎结果,提供来 ## 配置 1. 创建 Google Custom Search Engine -在[Programmable Search Engine](https://programmablesearchengine.google.com/)中 添加 Search Engine -![google 创建引擎](/src/assets/fx/img/google_AddSearchEngine.jpg) + 在[Programmable Search Engine](https://programmablesearchengine.google.com/)中 添加 Search Engine + ![google 创建引擎](/src/assets/fx/img/google_AddSearchEngine.jpg) 2. 获取cx参数 -进入添加引擎,在【基本】菜单中获取搜索引擎的ID,即cx。 -![google cx ](/src/assets/fx/img/google_cx.jpg) -3.获取 API Key -打开 https://developers.google.com/custom-search/v1/overview?hl=zh-cn,获取API Key。 -![google API Key](/src/assets/fx/img/google_APIKey.jpg) + 进入添加引擎,在【基本】菜单中获取搜索引擎的ID,即cx。 + ![google cx ](/src/assets/fx/img/google_cx.jpg) 3.获取 API Key + 打开 https://developers.google.com/custom-search/v1/overview?hl=zh-cn,获取API Key。 + ![google API Key](/src/assets/fx/img/google_APIKey.jpg) -4. 配置启动参数 -在Google搜索函数的启动参数中填写配置以上参数。 -![启动参数](/src/assets/fx/img/google_setting.jpg) +3. 配置启动参数 + 在Google搜索函数的启动参数中填写配置以上参数。 + ![启动参数](/src/assets/fx/img/google_setting.jpg) -5. 在应用中使用 -在高级编排应用中,点击添加组件->函数库->博查,设置使用参数。 -![应用中使用](/src/assets/fx/img/google_app_used.jpg) +4. 在应用中使用 + 在高级编排应用中,点击添加组件->函数库->博查,设置使用参数。 + ![应用中使用](/src/assets/fx/img/google_app_used.jpg) diff --git a/ui/src/assets/fx/langsearch/detail.md b/ui/src/assets/fx/langsearch/detail.md index 75347e1da79..0ca6556b1dd 100644 --- a/ui/src/assets/fx/langsearch/detail.md +++ b/ui/src/assets/fx/langsearch/detail.md @@ -2,16 +2,14 @@ 博查工具是一个支持自然语言搜索的 Web Search API,从近百亿网页和生态内容源中搜索高质量世界知识,包括新闻、图片、视频、百科、机酒、学术等. - ## 配置 1. 获取API Key  -在[博查开放平台](https://open.bochaai.com/overview) 上申请 API 密钥。 -![API Key](/src/assets/fx/img/langsearch_APIKey.jpg) + 在[博查开放平台](https://open.bochaai.com/overview) 上申请 API 密钥。 + ![API Key](/src/assets/fx/img/langsearch_APIKey.jpg) 2. 在函数库中配置 -在函数库的博查函数面板中,点击 … > 启用参数,填写 API 密钥,并启用博查函数。 -![启动参数](/src/assets/fx/img/langsearch_setting.jpg) -1. 在应用中使用 -在高级编排应用中,点击添加组件->函数库->博查,设置使用参数。 - ![应用中使用](/src/assets/fx/img/langsearch_app_used.jpg) - \ No newline at end of file + 在函数库的博查函数面板中,点击 … > 启用参数,填写 API 密钥,并启用博查函数。 + ![启动参数](/src/assets/fx/img/langsearch_setting.jpg) +3. 在应用中使用 + 在高级编排应用中,点击添加组件->函数库->博查,设置使用参数。 + ![应用中使用](/src/assets/fx/img/langsearch_app_used.jpg) diff --git a/ui/src/components/ai-chat/component/chat-input-operate/index.vue b/ui/src/components/ai-chat/component/chat-input-operate/index.vue index 83d2e0ddfb6..5a7986ef0ae 100644 --- a/ui/src/components/ai-chat/component/chat-input-operate/index.vue +++ b/ui/src/components/ai-chat/component/chat-input-operate/index.vue @@ -749,7 +749,6 @@ onMounted(() => { @media only screen and (max-width: 768px) { .ai-chat { - height: calc(100% - 100px); &__operate { position: fixed; bottom: 0; diff --git a/ui/src/components/ai-chat/component/user-form/index.vue b/ui/src/components/ai-chat/component/user-form/index.vue index 97350cc913e..ea7d83f8bd6 100644 --- a/ui/src/components/ai-chat/component/user-form/index.vue +++ b/ui/src/components/ai-chat/component/user-form/index.vue @@ -4,8 +4,7 @@ (inputFieldList.length > 0 || (type === 'debug-ai-chat' && apiInputFieldList.length > 0)) && type !== 'log' " - class="mb-16 w-full" - style="padding: 0 24px; max-width: 400px" + class="user-form-container mb-16 w-full" >
@@ -16,9 +15,14 @@ {{ inputFieldConfig.title }}
- + + -
+
+
{{ $t('chat.operation.startChat') @@ -359,4 +364,13 @@ onMounted(() => { handleInputFieldList() }) - + diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index 62e5a7fddde..403e560bdf1 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -1,5 +1,10 @@