From 4e52f17b9fbd461f5f54dbf35619045f1db9c55d Mon Sep 17 00:00:00 2001 From: Simon <10131203+gaomeng1900@users.noreply.github.com> Date: Sat, 10 Jan 2026 17:44:08 +0800 Subject: [PATCH] feat(agent): mv in front of --- packages/page-agent/src/PageAgent.ts | 34 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/page-agent/src/PageAgent.ts b/packages/page-agent/src/PageAgent.ts index aebb435..36fb27e 100644 --- a/packages/page-agent/src/PageAgent.ts +++ b/packages/page-agent/src/PageAgent.ts @@ -364,23 +364,6 @@ export class PageAgent extends EventTarget { async #assembleUserPrompt(): Promise { let prompt = '' - // - // - - - prompt += '\n' - - this.history.forEach((history, index) => { - prompt += ` - Evaluation of Previous Step: ${history.brain.evaluation_previous_goal} - Memory: ${history.brain.memory} - Next Goal: ${history.brain.next_goal} - Action Results: ${history.action.output} - - ` - }) - - prompt += '\n\n' - // // - // - @@ -397,6 +380,23 @@ export class PageAgent extends EventTarget { ` + // + // - + + prompt += '\n\n' + + this.history.forEach((history, index) => { + prompt += ` + Evaluation of Previous Step: ${history.brain.evaluation_previous_goal} + Memory: ${history.brain.memory} + Next Goal: ${history.brain.next_goal} + Action Results: ${history.action.output} + + ` + }) + + prompt += '\n\n' + // prompt += await this.#getBrowserState()