Implement Thinkloom desktop MVP

This commit is contained in:
2026-07-17 00:41:22 -07:00
parent 26e5808d66
commit b5e6eafa1c
30 changed files with 12805 additions and 274 deletions
+6 -12
View File
@@ -1,13 +1,7 @@
import { env } from "cloudflare:workers";
import { drizzle } from "drizzle-orm/d1";
import * as schema from "./schema";
export function getDb() {
if (!env.DB) {
throw new Error(
"Cloudflare D1 binding `DB` is unavailable. Set the `d1` field in .openai/hosting.json to `DB` or let your control plane inject the real binding values before using the database."
);
}
return drizzle(env.DB, { schema });
import { drizzle } from "drizzle-orm/d1";
import * as schema from "./schema";
/** Create a typed database client from the D1 binding supplied by the worker. */
export function getDb(binding: D1Database) {
return drizzle(binding, { schema });
}