File tree Expand file tree Collapse file tree 7 files changed +613
-155
lines changed
Expand file tree Collapse file tree 7 files changed +613
-155
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export async function finishAgentRun(
8585 * Adds a completed step to the agent_step table
8686 */
8787export async function addAgentStep (
88- params : Parameters < AddAgentStepFn > [ 0 ] ,
88+ params : ParamsOf < AddAgentStepFn > ,
8989) : ReturnType < AddAgentStepFn > {
9090 const {
9191 userId,
Original file line number Diff line number Diff line change @@ -86,8 +86,10 @@ export enum AnalyticsEvent {
8686 // Web - API
8787 AGENT_RUN_API_REQUEST = 'api.agent_run_request' ,
8888 AGENT_RUN_CREATED = 'api.agent_run_created' ,
89+ AGENT_RUN_COMPLETED = 'api.agent_run_completed' ,
8990 AGENT_RUN_VALIDATION_ERROR = 'api.agent_run_validation_error' ,
9091 AGENT_RUN_CREATION_ERROR = 'api.agent_run_creation_error' ,
92+ AGENT_RUN_COMPLETION_ERROR = 'api.agent_run_completion_error' ,
9193 ME_API_REQUEST = 'api.me_request' ,
9294 ME_VALIDATION_ERROR = 'api.me_validation_error' ,
9395 CHAT_COMPLETIONS_REQUEST = 'api.chat_completions_request' ,
Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ import postgres from 'postgres'
44
55import * as schema from './schema'
66
7+ import type { CodebuffPgDatabase } from './types'
8+
79const client = postgres ( env . DATABASE_URL )
810
9- export const db = drizzle ( client , { schema } )
11+ export const db : CodebuffPgDatabase = drizzle ( client , { schema } )
1012export default db
Original file line number Diff line number Diff line change 1+ import type * as schema from './schema'
2+ import type { PgDatabase } from 'drizzle-orm/pg-core'
3+ import type { PostgresJsQueryResultHKT } from 'drizzle-orm/postgres-js'
4+
5+ export type CodebuffPgDatabase = PgDatabase <
6+ PostgresJsQueryResultHKT ,
7+ typeof schema
8+ >
You can’t perform that action at this time.
0 commit comments