docs: clean up
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user