feat(cmdk): added knowledgebases to the cmdk modal (#1530)

This commit is contained in:
Waleed
2025-10-01 21:21:42 -07:00
committed by GitHub
parent b33ae5bff9
commit ace83ebcae
9 changed files with 211 additions and 145 deletions
@@ -117,13 +117,20 @@ const workflowDeploymentVersion = pgTable(
)
// ---------- DB client ----------
function isTruthy(value: string | undefined): boolean {
if (!value) return false
return value.toLowerCase() === 'true' || value === '1'
}
const useSSL = process.env.DATABASE_SSL === undefined ? false : isTruthy(process.env.DATABASE_SSL)
const postgresClient = postgres(CONNECTION_STRING, {
prepare: false,
idle_timeout: 20,
connect_timeout: 30,
max: 10,
onnotice: () => {},
ssl: 'require',
ssl: useSSL ? 'require' : false,
})
const db = drizzle(postgresClient)
+8 -2
View File
@@ -140,14 +140,20 @@ if (!CONNECTION_STRING) {
process.exit(1)
}
// Initialize database connection (following migration script pattern)
function isTruthy(value: string | undefined): boolean {
if (!value) return false
return value.toLowerCase() === 'true' || value === '1'
}
const useSSL = process.env.DATABASE_SSL === undefined ? false : isTruthy(process.env.DATABASE_SSL)
const postgresClient = postgres(CONNECTION_STRING, {
prepare: false,
idle_timeout: 20,
connect_timeout: 30,
max: 10,
onnotice: () => {},
ssl: 'require',
ssl: useSSL ? 'require' : false,
})
const db = drizzle(postgresClient)