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
- ssrf.ts
- status.ts
- tenant.ts
- tlsgate.ts
- workspace.ts
app/src/components/live.tsx
1"use client";2import { useEffect, useState } from "react";3import { Spark } from "./charts";4import { Bar, fmtBytes } from "./ui";5import type { Snapshot } from "@/lib/metrics";67export function useLive(initial: Snapshot) {8 const [s, setS] = useState(initial); const [live, setLive] = useState(false);9 useEffect(() => {10 const es = new EventSource("/api/stream");11 es.onmessage = e => { try { setS(JSON.parse(e.data)); setLive(true); } catch {} };12 es.onerror = () => setLive(false);13 return () => es.close();14 }, []);15 return { s, live };16}1718export function LiveResources({ initial }: { initial: Snapshot }) {19 const { s, live } = useLive(initial);20 const rows = [21 { k: "CPU", v: s.cpu, sub: `${s.host.cpus} vCPU · load ${s.host.load.map(x => x.toFixed(2)).join(" ")}`, h: s.history.map(x => x.cpu) },22 { k: "Memory", v: s.mem.pct, sub: `${fmtBytes(s.mem.used)} of ${fmtBytes(s.mem.total)}`, h: s.history.map(x => x.mem) },23 { k: "Disk", v: s.disk.pct, sub: `${fmtBytes(s.disk.total - s.disk.free)} of ${fmtBytes(s.disk.total)}`, h: [] as number[] },24 ];25 return <div>26 <div className="mb-3 flex items-center gap-2 text-xs text-muted"><span className={`h-2 w-2 rounded-full ${live ? "bg-[var(--ok)]" : "bg-[var(--warn)]"}`} aria-hidden />{live ? "Live · updating every 2 s" : "Connecting…"}27 <span className="ml-auto tabular-nums">↓ {fmtBytes(s.net.rx)}/s · ↑ {fmtBytes(s.net.tx)}/s</span></div>28 <div className="grid gap-4 sm:grid-cols-3">29 {rows.map(r => <div key={r.k} className="rounded-lg border border-line p-3">30 <div className="flex items-baseline justify-between"><span className="text-xs text-muted">{r.k}</span><span className="text-lg font-semibold tabular-nums">{r.v.toFixed(1)}%</span></div>31 {r.h.length > 1 ? <Spark data={r.h} label={`${r.k} history`} /> : <div className="py-4"><Bar pct={r.v} label={`${r.k} usage`} /></div>}32 <div className="text-xs text-muted">{r.sub}</div></div>)}33 </div></div>;34}35
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 1c27633 on master.
Approval requests
None pending.