docs: clean up
This commit is contained in:
@@ -28,10 +28,10 @@ const navigationSections: NavSection[] = [
|
||||
title: 'Features',
|
||||
items: [
|
||||
{ title: '模型接入', path: '/docs/features/model-integration' },
|
||||
{ title: '自定义工具', path: '/docs/features/custom-tools' },
|
||||
{ title: '知识库注入', path: '/docs/features/knowledge-injection' },
|
||||
{ title: '安全与权限', path: '/docs/features/security-permissions' },
|
||||
{ title: '数据脱敏', path: '/docs/features/data-masking' },
|
||||
{ title: '知识库注入', path: '/docs/features/knowledge-injection' },
|
||||
{ title: '自定义工具', path: '/docs/features/custom-tools' },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -39,7 +39,6 @@ const navigationSections: NavSection[] = [
|
||||
items: [
|
||||
{ title: 'CDN 引入', path: '/docs/integration/cdn-setup' },
|
||||
{ title: '配置选项', path: '/docs/integration/configuration' },
|
||||
{ title: 'API 参考', path: '/docs/integration/api-reference' },
|
||||
{ title: '最佳实践', path: '/docs/integration/best-practices' },
|
||||
{ title: '接入第三方 Agent', path: '/docs/integration/third-party-agent' },
|
||||
],
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
import BetaNotice from '@pages/components/BetaNotice'
|
||||
import CodeEditor from '@pages/components/CodeEditor'
|
||||
|
||||
export default function ApiReference() {
|
||||
return (
|
||||
<div>
|
||||
<h1 className="text-4xl font-bold mb-6">API 参考</h1>
|
||||
|
||||
<BetaNotice />
|
||||
|
||||
<p className="text-xl text-foreground/80 mb-6 leading-relaxed">
|
||||
完整的 API 文档,包含所有可用的方法和参数。
|
||||
</p>
|
||||
|
||||
<h2 className="text-2xl font-bold mb-3">核心方法</h2>
|
||||
|
||||
<div className="space-y-4 mb-6">
|
||||
<div className="border border-gray-200 dark:border-gray-700 rounded-lg p-4">
|
||||
<h3 className="text-lg font-semibold mb-2 font-mono">pageAgent.init(config)</h3>
|
||||
<p className="text-foreground/80 mb-3">初始化 page-agent</p>
|
||||
|
||||
<CodeEditor code={`const pageAgent = new PageAgent`} />
|
||||
</div>
|
||||
|
||||
<div className="border border-gray-200 dark:border-gray-700 rounded-lg p-4">
|
||||
<h3 className="text-lg font-semibold mb-2 font-mono">pageAgent.execute(instruction)</h3>
|
||||
<p className="text-foreground/80 mb-3">执行自然语言指令</p>
|
||||
|
||||
<CodeEditor
|
||||
code={`await pageAgent.execute('点击提交按钮');
|
||||
await pageAgent.execute('填写用户名为张三');`}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 className="text-2xl font-bold mb-3">事件监听</h2>
|
||||
|
||||
<CodeEditor code={`// TODO`} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -73,17 +73,6 @@ pageAgent.panel.show()
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="bg-gradient-to-r from-green-50 to-blue-50 dark:from-green-900/20 dark:to-blue-900/20 p-4 rounded-lg">
|
||||
<h3 className="text-lg font-semibold mb-2">🎉 完成!</h3>
|
||||
<p className="mb-3 ">可参考《知识库注入》来优化任务成功率。</p>
|
||||
<a
|
||||
href="/docs/features/security-permissions"
|
||||
className="inline-flex items-center px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors duration-200"
|
||||
>
|
||||
了解更多功能 →
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import DataMasking from './docs/features/data-masking/page'
|
||||
import KnowledgeInjection from './docs/features/knowledge-injection/page'
|
||||
import ModelIntegration from './docs/features/model-integration/page'
|
||||
import SecurityPermissions from './docs/features/security-permissions/page'
|
||||
import ApiReference from './docs/integration/api-reference/page'
|
||||
import BestPractices from './docs/integration/best-practices/page'
|
||||
// Integration pages
|
||||
import CdnSetup from './docs/integration/cdn-setup/page'
|
||||
@@ -117,15 +116,6 @@ export default function Router() {
|
||||
</div>
|
||||
</Route>
|
||||
|
||||
<Route path="/docs/integration/api-reference">
|
||||
<div className="min-h-screen bg-white dark:bg-gray-900">
|
||||
<Header />
|
||||
<DocsLayout>
|
||||
<ApiReference />
|
||||
</DocsLayout>
|
||||
</div>
|
||||
</Route>
|
||||
|
||||
<Route path="/docs/integration/best-practices">
|
||||
<div className="min-h-screen bg-white dark:bg-gray-900">
|
||||
<Header />
|
||||
|
||||
Reference in New Issue
Block a user