feat(core): make execute_javascript honor AbortSignal by gaomeng1900 · Pull Request #545 · alibaba/page-agent · GitHub
Skip to content

feat(core): make execute_javascript honor AbortSignal#545

Merged
gaomeng1900 merged 2 commits into
mainfrom
feat/execute-js-abort-signal
Jun 11, 2026
Merged

feat(core): make execute_javascript honor AbortSignal#545
gaomeng1900 merged 2 commits into
mainfrom
feat/execute-js-abort-signal

Conversation

@gaomeng1900

@gaomeng1900 gaomeng1900 commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

What

Make the built-in execute_javascript tool abort-aware: the task AbortSignal is exposed as signal in the script scope and re-checked after the script settles so stale results cannot mutate a stopped run.

Closes #537

Type

  • Breaking change
  • Bug fix
  • Feature / Improvement
  • Refactor / Chores
  • Documentation / Website / Demo / Testing

Testing

  • Tested in modern browsers
  • No console errors
  • Types/doc added

Requirements / 要求

  • I have read and follow the Code of Conduct and Contributing Guide . / 我已阅读并遵守行为准则。
  • This PR is NOT generated by a bot or AI agent acting autonomously. I have authored or meaningfully reviewed every change. / 此 PR 不是由 bot 或 AI 自主生成的,我已亲自编写或充分审查了每一处变更。

Expose the task AbortSignal as `signal` in the script scope so cooperative
code can cancel promptly, and re-check signal.throwIfAborted() after the
script settles to discard stale results.

Closes #537.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ed0a09194

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/extension/src/agent/RemotePageController.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@gaomeng1900 gaomeng1900 merged commit e65c7c9 into main Jun 11, 2026
4 checks passed
@gaomeng1900 gaomeng1900 deleted the feat/execute-js-abort-signal branch June 11, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

execute_javascript tool should honor AbortSignal

2 participants