Files
page-agent/pages/docs/integration/api-reference/page.tsx
2025-09-29 16:33:15 +08:00

42 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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>
)
}