Skip to content

Commit 3674759

Browse files
committed
✨ Multi modal agent.
Add tooltips
1 parent 4787eb3 commit 3674759

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

frontend/app/[locale]/agents/components/tool/ToolPool.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
import { useState, useEffect, useMemo, useCallback, memo } from "react";
44
import { useTranslation } from "react-i18next";
55

6-
import { Button, App, Tabs, Collapse } from "antd";
6+
import { Button, App, Tabs, Collapse, Tooltip } from "antd";
77
import {
88
SettingOutlined,
99
LoadingOutlined,
1010
ApiOutlined,
1111
ReloadOutlined,
12+
BulbOutlined,
1213
} from "@ant-design/icons";
1314

1415
import { TOOL_SOURCE_TYPES } from "@/const/agentConfig";
@@ -643,6 +644,25 @@ function ToolPool({
643644
<h4 className="text-md font-medium text-gray-700">
644645
{t("toolPool.title")}
645646
</h4>
647+
<Tooltip
648+
title={
649+
<div style={{ whiteSpace: "pre-line" }}>
650+
{t("toolPool.tooltip.functionGuide")}
651+
</div>
652+
}
653+
overlayInnerStyle={{
654+
backgroundColor: "#ffffff",
655+
color: "#374151",
656+
border: "1px solid #e5e7eb",
657+
borderRadius: "6px",
658+
boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
659+
padding: "12px",
660+
maxWidth: "600px",
661+
minWidth: "400px",
662+
}}
663+
>
664+
<BulbOutlined className="ml-2 text-yellow-500" />
665+
</Tooltip>
646666
</div>
647667
<div className="flex items-center gap-2">
648668
<Button

frontend/public/locales/en/common.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@
400400
"toolPool.category.other": "other",
401401
"toolPool.noTools": "No tools available",
402402
"toolPool.error.requiredFields": "The following required fields are not filled: {{fields}}",
403+
"toolPool.tooltip.functionGuide": "1. For local knowledge base search functionality, please enable the knowledge_base_search tool;\n2. For text file parsing functionality, please enable the analyze_text_file tool;\n3. For image parsing functionality, please enable the analyze_image tool.",
403404

404405
"common.loading": "Loading",
405406
"common.save": "Save",

frontend/public/locales/zh/common.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@
401401
"toolPool.category.other": "其他",
402402
"toolPool.noTools": "暂无可用工具",
403403
"toolPool.error.requiredFields": "以下必填字段未填写: {{fields}}",
404+
"toolPool.tooltip.functionGuide": "1. 本地知识库检索功能,请启用knowledge_base_search工具;\n2. 文本文件解析功能,请启用analyze_text_file工具;\n3. 图片解析功能,请启用analyze_image工具。",
404405

405406
"common.loading": "加载中",
406407
"common.save": "保存",

0 commit comments

Comments
 (0)