{isZh
? 'PageAgent 由三个独立模块组成,可自由组合:'
@@ -45,7 +46,7 @@ export default function CustomUIDocs() {
{/* Two Event Streams */}
{isZh
? 'PageAgentCore 提供两种不同性质的事件流,方便 UI 渲染:'
@@ -120,7 +121,7 @@ export default function CustomUIDocs() {
{/* All Events */}
{isZh ? 'agent.history 数组中的事件类型:' : 'Event types in agent.history array:'}
{isZh ? 'activity 事件的 detail 类型:' : 'The detail type of activity events:'}
{isZh ? '监听事件并更新 React 状态:' : 'Listen to events and update React state:'}
{isZh
? '参考内置 PageAgent 的实现方式,用自定义 UI 替换 Panel:'
diff --git a/packages/website/src/pages/docs/advanced/page-agent-core/page.tsx b/packages/website/src/pages/docs/advanced/page-agent-core/page.tsx
index e9a8961..9476041 100644
--- a/packages/website/src/pages/docs/advanced/page-agent-core/page.tsx
+++ b/packages/website/src/pages/docs/advanced/page-agent-core/page.tsx
@@ -1,4 +1,5 @@
import CodeEditor from '@/components/CodeEditor'
+import { Heading } from '@/components/Heading'
import { APIDivider, APIReference, TypeRef } from '@/components/ui/api-reference'
import { useLanguage } from '@/i18n/context'
@@ -17,9 +18,9 @@ export default function PageAgentCoreDocs() {
{/* When to use */}
{isZh
? '配置与大语言模型的连接参数。支持 OpenAI 兼容的 API。'
@@ -133,7 +134,7 @@ const result = await agent.execute('Fill in the form with test data')`}
{/* Agent Configuration */}
{isZh
? '配置 Agent 的行为、生命周期钩子和扩展能力。'
@@ -210,7 +211,7 @@ const result = await agent.execute('Fill in the form with test data')`}
{/* Lifecycle Hooks */}
⚠️ {isZh ? '警告' : 'Warning'}:{' '}
@@ -262,7 +263,7 @@ const result = await agent.execute('Fill in the form with test data')`}
{/* PageController Configuration */}
{isZh
? '配置 DOM 提取、元素交互和视觉反馈。'
@@ -321,7 +322,7 @@ const result = await agent.execute('Fill in the form with test data')`}
{/* Properties */}
{isZh ? (
<>
@@ -438,7 +439,7 @@ const result = await agent.execute('Fill in the form with test data')`}
{/* ExecutionResult */}
{isZh
? '在非 DOM 环境中,你必须实现自定义的 PageController(例如远程操作页面或 Puppeteer)。'
diff --git a/packages/website/src/pages/docs/advanced/page-agent/page.tsx b/packages/website/src/pages/docs/advanced/page-agent/page.tsx
index e352566..3704346 100644
--- a/packages/website/src/pages/docs/advanced/page-agent/page.tsx
+++ b/packages/website/src/pages/docs/advanced/page-agent/page.tsx
@@ -1,6 +1,7 @@
import { Link } from 'wouter'
import CodeEditor from '@/components/CodeEditor'
+import { Heading } from '@/components/Heading'
import { APIReference, TypeRef } from '@/components/ui/api-reference'
import { useLanguage } from '@/i18n/context'
@@ -19,9 +20,9 @@ export default function PageAgentDocs() {
{/* When to use */}
{isZh
? '在大多数场景下,你应该使用 PageAgent。它提供了开箱即用的完整体验:'
@@ -43,7 +44,7 @@ export default function PageAgentDocs() {
{/* Basic Usage */}
{isZh
? 'PageAgent 使用与 PageAgentCore 相同的配置接口。'
@@ -144,7 +145,7 @@ console.log(result.history) // Full execution history`}
{/* Panel Property */}
{isZh
? 'PageAgent 自动创建一个 Panel 实例。你可以通过 panel 属性访问它来控制 UI:'
@@ -185,9 +186,9 @@ agent.panel.dispose()`}
{/* Comparison with PageAgentCore */}
{isZh ? '两个事件流' : 'Two Event Streams'}
+ {isZh ? '所有事件' : 'All Events'}
+ HistoricalEvent
+ AgentActivity
+
- {isZh ? '使用 React Hooks' : 'Using React Hooks'}
-
+
+
+
+
+
{isZh ? '基本用法' : 'Basic Usage'}
+ LLMConfig
+ AgentConfig
+ {isZh ? '生命周期钩子' : 'Lifecycle Hooks'}
+ PageControllerConfig
+ {isZh ? '属性' : 'Properties'}
+ {isZh ? '方法' : 'Methods'}
+ {isZh ? '事件' : 'Events'}
+ ExecutionResult
+ AgentActivity
+ {isZh ? '无头模式' : 'Headless Mode'}
+
+
+
{isZh ? '基本用法' : 'Basic Usage'}
+ {isZh ? '类定义' : 'Class Definition'}
+ {isZh ? '配置' : 'Configuration'}
+ {isZh ? 'Panel 属性' : 'Panel Property'}
+
+
+