feat(ext): require llmConfig when calling from main world

This commit is contained in:
Simon
2026-01-28 20:28:21 +08:00
parent 0f3ae38cb3
commit f67ec5a2c2
2 changed files with 17 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
import { initPageController } from '@/agent/RemotePageController.content'
import { DEMO_CONFIG } from '@/agent/constants'
// import { DEMO_CONFIG } from '@/agent/constants'
const DEBUG_PREFIX = '[Content]'
@@ -67,9 +68,11 @@ async function exposeAgentToPage() {
}
try {
multiPageAgent = new MultiPageAgent(DEMO_CONFIG)
const { task, llmConfig } = payload
const result = await multiPageAgent.execute(payload)
multiPageAgent = new MultiPageAgent(llmConfig)
const result = await multiPageAgent.execute(task)
window.postMessage(
{