Skip to content

Commit d9bc04d

Browse files
committed
chore: lint
1 parent 4cb867d commit d9bc04d

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

agent/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ function initializeDatabase(dataDir: string) {
379379
return db;
380380
} else if (process.env.PGLITE_DATA_DIR) {
381381
elizaLogger.info("Initializing PgLite adapter...");
382+
// `dataDir: memory://` for in memory pg
382383
const db = new PGLiteDatabaseAdapter({
383384
dataDir: process.env.PGLITE_DATA_DIR,
384385
});

packages/adapter-pglite/src/index.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ export class PGLiteDatabaseAdapter
101101
}, context);
102102
}
103103

104-
async query<R = any>(
104+
async query<R>(
105105
queryTextOrConfig: string,
106-
values?: any[]
106+
values?: unknown[]
107107
): Promise<Results<R>> {
108108
return this.withDatabase(async () => {
109-
return await this.query<R>(queryTextOrConfig, values);
109+
return await this.db.query<R>(queryTextOrConfig, values);
110110
}, "query");
111111
}
112112

@@ -400,7 +400,7 @@ export class PGLiteDatabaseAdapter
400400
return this.withDatabase(async () => {
401401
// Build query
402402
let sql = `SELECT * FROM memories WHERE type = $1 AND "roomId" = $2`;
403-
const values: any[] = [params.tableName, params.roomId];
403+
const values: unknown[] = [params.tableName, params.roomId];
404404
let paramCount = 2;
405405

406406
// Add time range filters
@@ -474,7 +474,7 @@ export class PGLiteDatabaseAdapter
474474
}): Promise<Goal[]> {
475475
return this.withDatabase(async () => {
476476
let sql = `SELECT * FROM goals WHERE "roomId" = $1`;
477-
const values: any[] = [params.roomId];
477+
const values: unknown[] = [params.roomId];
478478
let paramCount = 1;
479479

480480
if (params.userId) {
@@ -974,7 +974,7 @@ export class PGLiteDatabaseAdapter
974974
WHERE type = $2
975975
`;
976976

977-
const values: any[] = [vectorStr, params.tableName];
977+
const values: unknown[] = [vectorStr, params.tableName];
978978

979979
// Log the query for debugging
980980
elizaLogger.debug("Query debug:", {

0 commit comments

Comments
 (0)