diff --git a/packages/website/src/pages/docs/features/custom-tools/page.tsx b/packages/website/src/pages/docs/features/custom-tools/page.tsx index fbd44e4..55bf25e 100644 --- a/packages/website/src/pages/docs/features/custom-tools/page.tsx +++ b/packages/website/src/pages/docs/features/custom-tools/page.tsx @@ -1,4 +1,3 @@ -import BetaNotice from '@/components/BetaNotice' import CodeEditor from '@/components/CodeEditor' import { Heading } from '@/components/Heading' import { useLanguage } from '@/i18n/context' @@ -12,115 +11,84 @@ export default function CustomTools() {
{isZh - ? '通过注册自定义工具,扩展 AI Agent 的能力边界。使用 Zod 定义严格的输入接口,让 AI 安全调用你的业务逻辑。' - : 'Extend AI Agent capabilities by registering custom tools. Use Zod to define strict input schemas for safe business logic calls.'} + ? '通过注册自定义工具,扩展 AI Agent 的能力边界。使用 Zod 定义输入接口,让 AI 安全调用你的业务逻辑。' + : 'Extend AI Agent capabilities by registering custom tools. Define input schemas with Zod for safe business logic invocation.'}
{isZh - ? '每个自定义工具需要定义四个核心属性:name、description、input schema 和 execute 函数。' - : 'Each custom tool requires four core properties: name, description, input schema, and execute function.'} + ? '使用 tool() 辅助函数定义自定义工具,每个工具包含 description、inputSchema 和 execute 三个属性。' + : 'Use the tool() helper to define custom tools with description, inputSchema, and execute.'}
- {isZh - ? '通过 pageFilter 属性控制工具在哪些页面可见,提升安全性和用户体验。' - : 'Control tool visibility on specific pages via the pageFilter property to enhance security and UX.'} -
- -+ {isZh + ? '使用相同的名称可以覆盖内置工具的行为,设置为 null 则完全移除该工具。' + : 'Use the same name to override a built-in tool, or set it to null to remove it entirely.'} +
+ +