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)/engines/controls.tsx
1"use client";2import { useRouter } from "next/navigation";3import { useState } from "react";4async function post(body: object) { const r = await fetch("/api/engines", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(body) }); const j = await r.json().catch(() => ({})); return { ok: r.ok, error: j.error as string | undefined }; }5export function EngineControls({ def, consent, fallback, order, usable, projects }: { def: string; consent: boolean; fallback: boolean; order: string[]; usable: string[]; projects: { id: string; name: string; authorized: boolean }[] }) {6 const r = useRouter(); const [msg, setMsg] = useState(""); const [phrase, setPhrase] = useState(""); const [proj, setProj] = useState(projects[0]?.id ?? ""); const [ord, setOrd] = useState(order.join(","));7 const go = async (b: object, label: string) => { const x = await post(b); setMsg(x.ok ? `${label}: saved` : x.error ?? "failed"); if (x.ok) r.refresh(); };8 const cur = projects.find(p => p.id === proj);9 return <div className="space-y-5 text-sm">10 <div><label className="font-medium" htmlFor="defeng">Default engine</label><select id="defeng" className="input mt-1" value={def} onChange={e => go({ default: e.target.value }, "Default engine")}><option value="">None (choose per session)</option>{usable.map(u => <option key={u} value={u}>{u}</option>)}</select><p className="mt-1 text-xs text-muted">Only engines that are ready can be the default. Projects can override it in the wizard.</p></div>11 <div className="rounded-lg border border-line p-3"><div className="font-medium">OpenCode external-service consent</div><p className="mt-1 text-xs text-muted">OpenCode's free models run on OpenCode's hosted service. Prompts and any files an agent reads are sent there. Do not enable for confidential projects.</p>12 {consent ? <button className="btn btn-sm mt-2" onClick={() => go({ consent: false }, "Consent")}>Revoke consent</button> : <div className="mt-2 flex flex-wrap gap-2"><input className="input !w-40" aria-label="Consent phrase" placeholder='type "I CONSENT"' value={phrase} onChange={e => setPhrase(e.target.value)} /><button className="btn btn-primary btn-sm" disabled={phrase !== "I CONSENT"} onClick={() => go({ consent: true, confirm: phrase }, "Consent")}>Record consent</button></div>}</div>13 <div className="rounded-lg border border-line p-3"><div className="font-medium">Authorized fallback</div><p className="mt-1 text-xs text-muted">When enabled, a run that fails on one engine is handed to the next ready engine in this order, continuing from the stored session history instead of restarting. Off by default.</p>14 <label className="mt-2 flex items-center gap-2"><input type="checkbox" checked={fallback} onChange={e => go({ fallbackEnabled: e.target.checked }, "Fallback")} />Enable fallback handoff</label>15 <div className="mt-2 flex gap-2"><input className="input" aria-label="Fallback order" value={ord} onChange={e => setOrd(e.target.value)} /><button className="btn btn-sm" onClick={() => go({ fallbackOrder: ord.split(",").map(s => s.trim()) }, "Order")}>Save order</button></div></div>16 <div className="rounded-lg border border-line p-3"><div className="font-medium">Experimental file-editing execution (per project)</div><p className="mt-1 text-xs text-muted">Off by default: agents then run in an empty scratch directory with no tools. When authorized, an agent may read and edit files <b>only inside a per-run git worktree</b> of that project, under a project lock, and changes are merged back only if clean. OpenCode is not a security sandbox; shell, network and out-of-workspace access stay denied by policy.</p>17 {projects.length === 0 ? <p className="mt-2 text-xs text-muted">No projects yet.</p> : <div className="mt-2 flex flex-wrap items-center gap-2"><select className="input !w-auto" aria-label="Project to authorize" value={proj} onChange={e => setProj(e.target.value)}>{projects.map(p => <option key={p.id} value={p.id}>{p.name}{p.authorized ? " ✓ authorized" : ""}</option>)}</select>18 {cur?.authorized ? <button className="btn btn-sm" onClick={() => go({ authorizeProject: proj, enabled: false }, "Authorization")}>Revoke</button> : <><input className="input !w-64" aria-label="Authorization phrase" placeholder='type "AUTHORIZE EXPERIMENTAL EXECUTION"' value={phrase} onChange={e => setPhrase(e.target.value)} /><button className="btn btn-primary btn-sm" disabled={phrase !== "AUTHORIZE EXPERIMENTAL EXECUTION"} onClick={() => go({ authorizeProject: proj, enabled: true, confirm: phrase }, "Authorization")}>Authorize</button></>}</div>}</div>19 <button className="btn btn-sm" onClick={() => go({ refresh: true }, "Rescan")}>Re-scan engines</button><div role="status" className="text-xs text-muted">{msg}</div></div>;20}21
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.