Skip to content

Commit e8ce589

Browse files
committed
fix
1 parent 4f84331 commit e8ce589

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

packages/adapter-postgres/src/index.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,12 @@ export class PostgresDatabaseAdapter
170170
.map((_, i) => `$${i + 3}`)
171171
.join(", ");
172172

173-
let query = `SELECT * FROM memories WHERE type = $1 AND "agentId" = $2 AND "roomId" IN (${placeholders})`;
174-
let queryParams = [params.tableName, params.agentId, ...params.roomIds];
173+
const query = `SELECT * FROM memories WHERE type = $1 AND "agentId" = $2 AND "roomId" IN (${placeholders})`;
174+
const queryParams = [
175+
params.tableName,
176+
params.agentId,
177+
...params.roomIds,
178+
];
175179

176180
const { rows } = await this.query(query, queryParams);
177181
return rows.map((row) => ({

packages/core/src/goals.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,20 @@ import {
66
} from "./types.ts";
77

88
export const getGoals = async ({
9-
agentId,
109
runtime,
1110
roomId,
1211
userId,
1312
onlyInProgress = true,
1413
count = 5,
1514
}: {
1615
runtime: IAgentRuntime;
17-
agentId: UUID;
1816
roomId: UUID;
1917
userId?: UUID;
2018
onlyInProgress?: boolean;
2119
count?: number;
2220
}) => {
2321
return runtime.databaseAdapter.getGoals({
24-
agentId,
22+
agentId: runtime.agentId,
2523
roomId,
2624
userId,
2725
onlyInProgress,

packages/core/src/runtime.ts

-1
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,6 @@ export class AgentRuntime implements IAgentRuntime {
741741
unique: false,
742742
}),
743743
getGoals({
744-
agentId: this.agentId,
745744
runtime: this,
746745
count: 10,
747746
onlyInProgress: false,

0 commit comments

Comments
 (0)