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()