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/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";
6
7export 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}
17
18export 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

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 fb22adb on master.

Approval requests

None pending.