Skip to content
  1. Home
  2. workspace
Checking…
Demo view — sanitized data only. Sign in over HTTPS to create projects and manage the workspace.

AI Engineering Workspace

Partial

Chat, 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

app/src/lib/ai.ts

1import { db, getSetting } from "./db";
2import { DEFAULT_PRICING, mockAllowed } from "./providers";
3
4export async function pricing(): Promise<Record<string, { in: number; out: number }>> {
5 try { return { ...DEFAULT_PRICING, ...JSON.parse(await getSetting("ai.pricing", "{}")) }; } catch { return DEFAULT_PRICING; }
6}
7export const monthStart = () => { const d = new Date(); return new Date(Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), 1)).toISOString(); };
8export async function limits() {
9 return { monthly: Number(await getSetting("ai.monthly_cap_usd", "5")), project: Number(await getSetting("ai.project_cap_usd", "2")) };
10}
11export async function spend() {
12 const m = await db().prepare("SELECT COALESCE(SUM(cost_usd),0) s, COALESCE(SUM(tokens_in),0) ti, COALESCE(SUM(tokens_out),0) tout, COUNT(*) n FROM usage_ledger WHERE ts>=?").get(monthStart()) as any;
13 return { month_usd: Number(m.s), tokens_in: Number(m.ti), tokens_out: Number(m.tout), calls: Number(m.n) };
14}
15export const providerOk = (p: string) => p === "anthropic" || p === "openai" || p === "opencode" || (p === "mock" && mockAllowed());
16export const ACTIVE = ["queued", "running", "paused"];
17

Conversation

Partial
Sign in to start AI sessions.

Task checklist

  • Application shell deployed
  • Persistent projects
  • Agent runtime
  • Sandboxed terminal

Execution activity

No agent sessions. Git HEAD 548ed73 on master.

Approval requests

None pending.