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- ..
- assets
- basic-languages
- editor
- language
- nls
- abap-D-t0cyap.js
- apex-CcIm7xu6.js
- azcli-BA0tQDCg.js
- bat-C397hTD6.js
- bicep-DF5aW17k.js
- cameligo-plsz8qhj.js
- clojure-Y2auQMzK.js
- coffee-Bu45yuWE.js
- cpp-CkKPQIni.js
- csharp-CX28MZyh.js
- csp-D8uWnyxW.js
- css-CaeNmE3S.js
- css.worker-C7XcYe5x.js
- cssMode-DpEkhVlW.js
- cypher-DVThT8BS.js
- dart-CmGfCvrO.js
- dockerfile-CZqqYdch.js
- ecl-30fUercY.js
- editor-CG9c2pE-.js
- editor.js
- elixir-O3PRlgxO.js
- flow9-DqtmStfK.js
- freemarker2-DTUDMAl2.js
- fsharp-BOMdg4U1.js
- go-D_hbi-Jt.js
- graphql-CKUU4kLG.js
- handlebars-qLqoXa-4.js
- hcl-DTaboeZW.js
- html-DTxBj26n.js
- html.worker-VIR_LTyv.js
- htmlMode-DFBg6CMj.js
- index-BVflv2uG.js
- index.js
- ini--YXggpAu.js
- java-CI4ZMsH9.js
- javascript-BiL3JN6i.js
- json.worker-DzWXGkG8.js
- jsonMode-Dz4r0pwo.js
- julia-BwzEvaQw.js
- kotlin-IUYPiTV8.js
- less-C0eDYdqa.js
- lexon-iON-Kj97.js
- liquid-lXEUQRVn.js
- loader.js
- lspLanguageFeatures-IeRAvoKK.js
- lua-DtygF91M.js
- m3-CsR4AuFi.js
- markdown-C_rD0bIw.js
- mdx-Dtr248s4.js
- mips-CiYP61RB.js
- monaco.contribution-BRs4bdz5.js
- monaco.contribution-ChoOM5Gg.js
- monaco.contribution-DbKqsbmO.js
- monaco.contribution-DKFaWvum.js
- msdax-C38-sJlp.js
- mysql-CdtbpvbG.js
- nls.messages-loader.js
- objective-c-CntZFaHX.js
- pascal-r6kuqfl_.js
- pascaligo-BiXoTmXh.js
- perl-DABw_TcH.js
- pgsql-me_jFXeX.js
- php-D_kh-9LK.js
- pla-VfZjczW0.js
- postiats-BBSzz8Pk.js
- powerquery-Dt-g_2cc.js
- powershell-B-7ap1zc.js
- protobuf-BmtuEB1A.js
- pug-BRpRNeEb.js
- python-Cma5OvNe.js
- qsharp-BzsFaUU9.js
- r-f8dDdrp4.js
- razor-C8pOqqry.js
- redis-fvZQY4PI.js
- redshift-45Et0LQi.js
- restructuredtext-C7UUFKFD.js
- ruby-CZO8zYTz.js
- rust-Bfetafyc.js
- sb-3GYllVck.js
- scala-foMgrKo1.js
- scheme-CHdMtr7p.js
- scss-C1cmLt9V.js
- shell-ClXCKCEW.js
- solidity-MZ6ExpPy.js
- sophia-DWkuSsPQ.js
- sparql-AUGFYSyk.js
- sql-32GpJSV2.js
- st-CuDFIVZ_.js
- swift-t-PfMj7W.js
- systemverilog-Ch4vA8Yt.js
- tcl-D74tq1nH.js
- toggleHighContrast-CmI6H2gJ.js
- ts.worker-Dp2_QI6H.js
- tsMode-DgC3tGu_.js
- twig-C6taOxMV.js
- typescript-PjDChiYw.js
- typespec-D-PIh9Xw.js
- vb-Dyb2648j.js
- wgsl-BhLXMOR0.js
- workers-B_Zs9c54.js
- xml-BgCkTIhY.js
- yaml-D0tu26m-.js
app/src/app/(app)/console/page.tsx
1import Link from "next/link";2import { Cloud, FolderKanban, Network, Coins, CheckCircle2, Circle } from "lucide-react";3import { Badge, Card, Empty, MaturityBadge, PageHeader, Stat, ago } from "@/components/ui";4import { SignInCard, fmtUsd } from "@/components/console-ui";5import { Pill } from "@/components/console-client";6import { db } from "@/lib/db";7import { getCtx } from "@/lib/tenant";8import { listAudit } from "@/lib/audit";9import { nodeState, usageSummary } from "@/lib/cloud";10export const dynamic = "force-dynamic";11export const metadata = { title: "Overview" };12export default async function Overview() {13 const ctx = await getCtx(); if (!ctx) return <SignInCard what="your cloud console" />;14 const o = ctx.orgId; const u = await usageSummary(o);15 const insts = await db().prepare("SELECT id,name,target,status FROM instances WHERE org_id=? AND status<>'terminated' ORDER BY created_at DESC LIMIT 5").all(o) as any[];16 const nodes = (await db().prepare("SELECT id,label,revoked_at,enroll_used_at,last_seen FROM nodes WHERE org_id=? ORDER BY created_at DESC LIMIT 6").all(o) as any[]).map(n => ({ ...n, state: nodeState(n) }));17 const online = nodes.filter(n => n.state === "online").length; const events = await listAudit("", 6, o);18 const steps: [string, boolean, string][] = [["Create a cloud instance", u.counts.instances > 0, "/console/instances"], ["Connect a server (external VPS) or request a managed one", u.counts.nodes > 0, "/console/servers"], ["Start an application project", u.counts.projects > 0, "/projects/new"], ["Invite your team", false, "/console/team"]];19 return <>20 <PageHeader title="Cloud console" desc={`${ctx.orgName} · you are ${ctx.role}`} badge={<MaturityBadge state="partial" />} />21 <div className="grid grid-cols-2 gap-3 lg:grid-cols-4"><Stat label="Cloud instances" value={`${u.counts.instances}/${u.quotas.instances}`} sub="active quota" /><Stat label="Servers online" value={`${online}/${nodes.length}`} sub="external agents" />22 <Stat label="Applications" value={`${u.counts.projects}/${u.quotas.projects}`} sub="projects" /><Stat label="AI spend (month)" value={fmtUsd(u.ai.usd)} sub={`cap $${u.ai.cap_usd}`} /></div>23 <div className="mt-4 grid gap-4 lg:grid-cols-3">24 <Card title="Get started" className="lg:col-span-1"><ul className="space-y-2 text-sm">{steps.map(([t, d, h]) => <li key={t}><Link href={h} className="flex items-center gap-2 hover:underline">{d ? <CheckCircle2 size={16} className="text-[var(--ok)]" /> : <Circle size={16} className="text-muted" />}<span className={d ? "text-muted" : ""}>{t}</span></Link></li>)}</ul></Card>25 <Card title="Cloud instances" className="lg:col-span-2" pad={false} action={<Link href="/console/instances" className="text-xs text-accent hover:underline">Manage</Link>}>26 {insts.length === 0 ? <Empty title="No cloud instances yet" desc="Create one and choose whether it runs on your own VPS or Zloud Compute (managed)." action={<Link className="btn btn-primary" href="/console/instances">Create instance</Link>} /> :27 <ul className="divide-y divide-line text-sm">{insts.map(i => <li key={i.id} className="flex items-center justify-between gap-2 px-4 py-3"><div><div className="font-medium">{i.name}</div><div className="text-xs text-muted">{i.target === "managed" ? "Zloud Compute (managed)" : "External VPS"}</div></div><Pill s={i.status} /></li>)}</ul>}</Card>28 <Card title="Servers" pad={false} action={<Link href="/console/servers" className="text-xs text-accent hover:underline">Open</Link>}>{nodes.length === 0 ? <p className="p-4 text-sm text-muted">No servers connected.</p> : <ul className="divide-y divide-line text-sm">{nodes.map(n => <li key={n.id} className="flex items-center justify-between gap-2 px-4 py-2"><span className="truncate">{n.label}</span><Pill s={n.state} /></li>)}</ul>}</Card>29 <Card title="Recent activity" className="lg:col-span-2" pad={false}>{events.length === 0 ? <p className="p-4 text-sm text-muted">No activity yet.</p> : <ul className="divide-y divide-line text-sm">{events.map(e => <li key={e.seq} className="flex items-center justify-between gap-2 px-4 py-2"><span className="mono truncate text-xs">{e.action}</span><span className="whitespace-nowrap text-xs text-muted">{ago(e.ts)}</span></li>)}</ul>}</Card></div>30 <p className="mt-4 text-xs text-muted"><Cloud size={12} className="mr-1 inline" aria-hidden />Everything shown is scoped to <b>{ctx.orgName}</b>. <Badge tone="info">pre-release</Badge> Metering only — nothing is billed.</p></>;31}32
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.