AI Engineering Workspace
PartialChat, files, terminal and preview in one place. Chat sessions run on a durable Postgres-backed queue (chat only: no tools or shell). Live models need an API key; the terminal is unavailable.
Project files
read-only- ..
- ai.ts
- apps.ts
- audit.ts
- auth.ts
- central-core.d.mts
- central-core.mjs
- central.ts
- cloud.ts
- config.ts
- crypto.ts
- db.ts
- design.ts
- engines.ts
- files.ts
- gates.ts
- gateway.ts
- marketplace-core.d.mts
- marketplace-core.mjs
- metrics.ts
- modules.ts
- motion.ts
- nexus-core.d.mts
- nexus-core.mjs
- oidc-core.d.mts
- oidc-core.mjs
- oidc.ts
- providers.ts
- proxy-core.d.mts
- proxy-core.mjs
- pwauth-core.d.mts
- pwauth-core.mjs
- requirements.ts
- rls.sql.d.mts
- rls.sql.mjs
- services-content.ts
- ssrf.ts
- status.ts
- tenant.ts
- tlsgate.ts
- workspace.ts
app/src/app/api/ai/sessions/[id]/route.ts
1import { sessionOf, tenant, notFound } from "@/lib/tenant";2import { db } from "@/lib/db";3export const dynamic = "force-dynamic";4export async function GET(_: Request, { params }: { params: Promise<{ id: string }> }) {5 const g = await tenant("viewer"); if (g.res) return g.res;6 const { id } = await params; const s = await sessionOf(g.ctx, id); if (!s) return notFound();7 const messages = await db().prepare("SELECT id,role,content,run_id,created_at FROM ai_messages WHERE session_id=? ORDER BY id").all(id);8 const runs = await db().prepare("SELECT id,status,attempts,max_attempts,error,tokens_in,tokens_out,cost_usd,updated_at FROM ai_runs WHERE session_id=? ORDER BY created_at DESC LIMIT 10").all(id);9 return Response.json({ session: s, messages, runs });10}11
Conversation
PartialSign in to start AI sessions.
Task checklist
- Application shell deployed
- Persistent projects
- Agent runtime
- Sandboxed terminal
Execution activity
No agent sessions. Git HEAD 0eebc42 on master.
Approval requests
None pending.