feat: init

This commit is contained in:
Simon
2025-09-29 16:33:15 +08:00
parent e8041e0582
commit 847620b5e8
98 changed files with 20166 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
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>
)
}