Skip to content

fix(panel): Close works after Stop when waiting for user input#324

Open
gilangjavier wants to merge 1 commit intoalibaba:mainfrom
gilangjavier:fix/stop-close-ask-user
Open

fix(panel): Close works after Stop when waiting for user input#324
gilangjavier wants to merge 1 commit intoalibaba:mainfrom
gilangjavier:fix/stop-close-ask-user

Conversation

@gilangjavier
Copy link

fix(panel): close works after stop when waiting for user input

Add abort support to ask_user tool. When Stop is clicked while waiting for
user answer, the promise rejects with AbortError, causing the main loop to catch
and set status to error. Panel then clears the waiting UI and the Close button
appears and works as expected.

Changes:

  • Add withAbortSignal helper in tools
  • Expose abortSignal in PageAgentCore
  • Improve AbortError detection
  • Add Panel#cancelWaitingForUserAnswer
  • Call cancel when status changes away from running

Fixes #183

Add abort support to ask_user tool. When Stop is clicked while waiting for
user answer, the promise rejects with AbortError, causing the main loop to catch
and set status to error. Panel then clears the waiting UI and the Close button
appears and works as expected.

Changes:
- Add withAbortSignal helper in tools
- Expose abortSignal in PageAgentCore
- Improve AbortError detection
- Add Panel#cancelWaitingForUserAnswer
- Call cancel when status changes away from running

Fixes alibaba#183
@CLAassistant
Copy link

CLAassistant commented Mar 20, 2026

CLA assistant check
All committers have signed the CLA.

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.

[Bug] 默认的UI,当询问用户问题的时候,点击停止和关闭没有关闭pannel

2 participants