feat: disable ScriptExecutionTool for MultiPageAgent
This commit is contained in:
@@ -50,6 +50,8 @@ export class MultiPageAgent extends PageAgentCore {
|
|||||||
|
|
||||||
super({
|
super({
|
||||||
...config,
|
...config,
|
||||||
|
// Disabled: AbortSignal cannot cross contexts
|
||||||
|
experimentalScriptExecutionTool: false,
|
||||||
pageController: pageController as any,
|
pageController: pageController as any,
|
||||||
customTools: customTools,
|
customTools: customTools,
|
||||||
customSystemPrompt: systemPrompt,
|
customSystemPrompt: systemPrompt,
|
||||||
|
|||||||
@@ -133,11 +133,7 @@ export class RemotePageController {
|
|||||||
return this.remoteCallDomAction('scroll_horizontally', args)
|
return this.remoteCallDomAction('scroll_horizontally', args)
|
||||||
}
|
}
|
||||||
|
|
||||||
async executeJavascript(script: string, _signal?: AbortSignal): Promise<DomActionReturn> {
|
// `execute_javascript` is intentionally not implemented: AbortSignal cannot cross context
|
||||||
// `AbortSignal` is not structured-cloneable across the messaging boundary.
|
|
||||||
// The remote script runs without it
|
|
||||||
return this.remoteCallDomAction('execute_javascript', [script])
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @note Managed by content script via storage polling. */
|
/** @note Managed by content script via storage polling. */
|
||||||
async showMask(): Promise<void> {}
|
async showMask(): Promise<void> {}
|
||||||
|
|||||||
Reference in New Issue
Block a user