9- [ ] make it one click to branch off like old jp townie demos
10- [ ] opentownie as a pr bot
11- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them
12- [ ] do a browser use or screenshot thing to give it access to its own visual output
13- [ ] Have it default to creating a new branch off main
7export const thinkTool = tool({
8 description:
9 "Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.",
10 parameters: z.object({
11 thought: z.string().describe("A thought to think about."),
175```
176โโโ backend/
177โ โโโ database/
178โ โ โโโ migrations.ts # Schema definitions
179โ โ โโโ queries.ts # DB query functions
233```
234
235### Database Patterns
236- Run migrations on startup or comment out for performance
237- Change table names when modifying schemas rather than altering
3import Stripe from "npm:stripe";
4import { getEnvVarName } from "../../shared/is-prod-branch.ts";
5import { addCredits } from "../database/queries.tsx";
6
7const app = new Hono();
15 insertInferenceCall,
16 startTrackingUsage,
17} from "../database/queries.tsx";
18import {
19 makeChangeValTypeTool,
10const PRICE_MULTIPLIER = 1.5;
11
12// Eventually we'll have a user database,
13// but in the meantime, we can cache user info in memory
14const userIdCache: { [key: string]: any } = {};
1import { Hono } from "npm:hono";
2import Stripe from "npm:stripe";
3import { getUser } from "../database/queries.tsx";
4import { getEnvVarName } from "../../shared/is-prod-branch.ts";
5
9import favicon from "./frontend/favicon.http.tsx";
10import loginRoute from "./frontend/routes/login.tsx";
11import adminDashboard from "./backend/database/usage-dashboard/index.ts";
12
13const SCOPE =
198```
199โโโ backend/
200โ โโโ database/
201โ โ โโโ migrations.ts # Schema definitions
202โ โ โโโ queries.ts # DB query functions
257 ```
258
259### Database Patterns
260- Run migrations on startup or comment out for performance
261- Change table names when modifying schemas rather than altering
1import { Hono } from "npm:hono";
2import { getCreditBalance, getUser } from "../database/queries.tsx";
3
4const app = new Hono();