chore: cleanup; rm get abortSignal

This commit is contained in:
Simon
2026-06-08 17:40:44 +08:00
parent f8676a5cc2
commit 6530f0ef40
2 changed files with 1 additions and 183 deletions

View File

@@ -75,8 +75,7 @@ export class PageAgentCore extends EventTarget {
/**
* Called when the agent needs to ask the user questions.
* If unset, the `ask_user` tool will be disabled.
* The optional `signal` aborts when the task is stopped or disposed —
* implementations should reject the promise when it fires.
* Implementations should reject the promise when `signal` aborts.
* @example onAskUser: (q) => window.prompt(q) || ''
*/
onAskUser?: (question: string, options?: { signal: AbortSignal }) => Promise<string>
@@ -148,11 +147,6 @@ export class PageAgentCore extends EventTarget {
return this.#status
}
/** Abort signal for the current task. Tools get it via `ctx.signal`. */
get abortSignal(): AbortSignal {
return this.#abortController.signal
}
/** Emit statuschange event */
#emitStatusChange(): void {
this.dispatchEvent(new Event('statuschange'))