mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
feat(cmdk): added knowledgebases to the cmdk modal (#1530)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user