feat: change onAfterStep params
This commit is contained in:
@@ -281,7 +281,7 @@ export class PageAgent extends EventTarget {
|
||||
console.log(chalk.green('Step finished:'), actionName)
|
||||
console.groupEnd()
|
||||
|
||||
await onAfterStep.call(this, step, this.history)
|
||||
await onAfterStep.call(this, this.history)
|
||||
|
||||
step++
|
||||
if (step > MAX_STEPS) {
|
||||
|
||||
@@ -68,11 +68,7 @@ export interface AgentConfig {
|
||||
// @todo: remove `this` binding, pass agent as explicit parameter instead
|
||||
|
||||
onBeforeStep?: (this: PageAgent, stepCnt: number) => Promise<void> | void
|
||||
onAfterStep?: (
|
||||
this: PageAgent,
|
||||
stepCnt: number,
|
||||
history: HistoricalEvent[]
|
||||
) => Promise<void> | void
|
||||
onAfterStep?: (this: PageAgent, history: HistoricalEvent[]) => Promise<void> | void
|
||||
onBeforeTask?: (this: PageAgent) => Promise<void> | void
|
||||
onAfterTask?: (this: PageAgent, result: ExecutionResult) => Promise<void> | void
|
||||
|
||||
|
||||
Reference in New Issue
Block a user