This commit is contained in:
Simon
2026-03-16 19:45:29 +08:00
3 changed files with 18 additions and 6 deletions

View File

@@ -344,7 +344,7 @@ export class PageAgentCore extends EventTarget {
return result
}
await waitFor(0.4) // @TODO: configurable
await waitFor(this.config.stepDelay ?? 0.4)
}
}
@@ -512,7 +512,8 @@ export class PageAgentCore extends EventTarget {
// Accumulated wait time warning
if (this.#states.totalWaitTime >= 3) {
this.pushObservation(
`You have waited ${this.#states.totalWaitTime} seconds accumulatively. DO NOT wait any longer unless you have a good reason.`
`You have waited ${this.#states.totalWaitTime} seconds accumulatively. ` +
`DO NOT wait any longer unless you have a good reason.`
)
}
@@ -528,7 +529,8 @@ export class PageAgentCore extends EventTarget {
const remaining = this.config.maxSteps - step
if (remaining === 5) {
this.pushObservation(
`⚠️ Only ${remaining} steps remaining. Consider wrapping up or calling done with partial results.`
`⚠️ Only ${remaining} steps remaining. ` +
`Consider wrapping up or calling done with partial results.`
)
} else if (remaining === 2) {
this.pushObservation(