diff --git a/packages/plugin-bootstrap/src/evaluators/goal.ts b/packages/plugin-bootstrap/src/evaluators/goal.ts index 52298a84fb..aadb66bf03 100644 --- a/packages/plugin-bootstrap/src/evaluators/goal.ts +++ b/packages/plugin-bootstrap/src/evaluators/goal.ts @@ -55,12 +55,6 @@ async function handler( state: State | undefined, options: { [key: string]: unknown } = { onlyInProgress: true } ): Promise { - // get goals - let goalsData = await getGoals({ - runtime, - roomId: message.roomId, - onlyInProgress: options.onlyInProgress as boolean, - }); state = (await runtime.composeState(message)) as State; const context = composeContext({ @@ -79,10 +73,10 @@ async function handler( const updates = parseJsonArrayFromText(response); // get goals - goalsData = await getGoals({ + const goalsData = await getGoals({ runtime, roomId: message.roomId, - onlyInProgress: true, + onlyInProgress: options.onlyInProgress as boolean, }); // Apply the updates to the goals