quadwork 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +189 -82
- package/out/404.html +1 -1
- package/out/__next.__PAGE__.txt +3 -3
- package/out/__next._full.txt +12 -12
- package/out/__next._head.txt +4 -4
- package/out/__next._index.txt +6 -6
- package/out/__next._tree.txt +2 -2
- package/out/_next/static/chunks/006g3lco-9xqf.js +1 -0
- package/out/_next/static/chunks/035rt-n0oid7d.js +1 -0
- package/out/_next/static/chunks/{0e~ue9ca5zrep.js → 05ok82hwk0x-c.js} +1 -1
- package/out/_next/static/chunks/0u~7e4fgf-u06.css +2 -0
- package/out/_next/static/chunks/{0swlbn4q4u71z.js → 0zqyw6q.jp~1i.js} +14 -14
- package/out/_next/static/chunks/17y2walb2um9w.js +1 -0
- package/out/_next/static/chunks/{134b1p_egmf1c.js → 18cmux34jwe.p.js} +1 -1
- package/out/_not-found/__next._full.txt +11 -11
- package/out/_not-found/__next._head.txt +4 -4
- package/out/_not-found/__next._index.txt +6 -6
- package/out/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/out/_not-found/__next._not-found.txt +3 -3
- package/out/_not-found/__next._tree.txt +2 -2
- package/out/_not-found.html +1 -1
- package/out/_not-found.txt +11 -11
- package/out/app-shell/__next._full.txt +11 -11
- package/out/app-shell/__next._head.txt +4 -4
- package/out/app-shell/__next._index.txt +6 -6
- package/out/app-shell/__next._tree.txt +2 -2
- package/out/app-shell/__next.app-shell.__PAGE__.txt +2 -2
- package/out/app-shell/__next.app-shell.txt +3 -3
- package/out/app-shell.html +1 -1
- package/out/app-shell.txt +11 -11
- package/out/index.html +1 -1
- package/out/index.txt +12 -12
- package/out/project/_/__next._full.txt +12 -12
- package/out/project/_/__next._head.txt +4 -4
- package/out/project/_/__next._index.txt +6 -6
- package/out/project/_/__next._tree.txt +2 -2
- package/out/project/_/__next.project.$d$id.__PAGE__.txt +3 -3
- package/out/project/_/__next.project.$d$id.txt +3 -3
- package/out/project/_/__next.project.txt +3 -3
- package/out/project/_/memory/__next._full.txt +12 -12
- package/out/project/_/memory/__next._head.txt +4 -4
- package/out/project/_/memory/__next._index.txt +6 -6
- package/out/project/_/memory/__next._tree.txt +2 -2
- package/out/project/_/memory/__next.project.$d$id.memory.__PAGE__.txt +3 -3
- package/out/project/_/memory/__next.project.$d$id.memory.txt +3 -3
- package/out/project/_/memory/__next.project.$d$id.txt +3 -3
- package/out/project/_/memory/__next.project.txt +3 -3
- package/out/project/_/memory.html +1 -1
- package/out/project/_/memory.txt +12 -12
- package/out/project/_/queue/__next._full.txt +12 -12
- package/out/project/_/queue/__next._head.txt +4 -4
- package/out/project/_/queue/__next._index.txt +6 -6
- package/out/project/_/queue/__next._tree.txt +2 -2
- package/out/project/_/queue/__next.project.$d$id.queue.__PAGE__.txt +3 -3
- package/out/project/_/queue/__next.project.$d$id.queue.txt +3 -3
- package/out/project/_/queue/__next.project.$d$id.txt +3 -3
- package/out/project/_/queue/__next.project.txt +3 -3
- package/out/project/_/queue.html +1 -1
- package/out/project/_/queue.txt +12 -12
- package/out/project/_.html +1 -1
- package/out/project/_.txt +12 -12
- package/out/settings/__next._full.txt +12 -12
- package/out/settings/__next._head.txt +4 -4
- package/out/settings/__next._index.txt +6 -6
- package/out/settings/__next._tree.txt +2 -2
- package/out/settings/__next.settings.__PAGE__.txt +3 -3
- package/out/settings/__next.settings.txt +3 -3
- package/out/settings.html +1 -1
- package/out/settings.txt +12 -12
- package/out/setup/__next._full.txt +12 -12
- package/out/setup/__next._head.txt +4 -4
- package/out/setup/__next._index.txt +6 -6
- package/out/setup/__next._tree.txt +2 -2
- package/out/setup/__next.setup.__PAGE__.txt +3 -3
- package/out/setup/__next.setup.txt +3 -3
- package/out/setup.html +1 -1
- package/out/setup.txt +12 -12
- package/package.json +5 -2
- package/server/index.js +248 -12
- package/server/routes.js +364 -10
- package/out/_next/static/chunks/06mbme.sc_26-.css +0 -2
- package/out/_next/static/chunks/0caq73v0knw_w.js +0 -1
- package/out/_next/static/chunks/0md7hgvwnovzq.js +0 -1
- package/out/_next/static/chunks/0omuxbg.tg-il.js +0 -1
- /package/out/_next/static/{na3L7KeOGKGsbamYVibRj → 6uvV3nUfwr_t_JKrZJSP8}/_buildManifest.js +0 -0
- /package/out/_next/static/{na3L7KeOGKGsbamYVibRj → 6uvV3nUfwr_t_JKrZJSP8}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{na3L7KeOGKGsbamYVibRj → 6uvV3nUfwr_t_JKrZJSP8}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,69513,e=>{"use strict";var t=e.i(85899),r=e.i(4232),a=e.i(16353);let s={head:{display_name:"Head",command:"claude",cwd:"",model:"opus",agents_md:""},reviewer1:{display_name:"Reviewer1",command:"claude",cwd:"",model:"sonnet",agents_md:""},reviewer2:{display_name:"Reviewer2",command:"claude",cwd:"",model:"sonnet",agents_md:""},dev:{display_name:"Dev",command:"claude",cwd:"",model:"sonnet",agents_md:""}},n=[{value:"claude",label:"Claude Code"},{value:"codex",label:"Codex"}],l=["opus","sonnet","haiku"];function c({label:e,value:r,onChange:a,type:s="text",placeholder:n}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:e}),(0,t.jsx)("input",{type:s,value:r,onChange:e=>a(e.target.value),placeholder:n,className:"bg-transparent border border-border px-2 py-1.5 text-[12px] text-text outline-none focus:border-accent"})]})}function d({label:e,value:r,onChange:a,options:s}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:e}),(0,t.jsx)("select",{value:r,onChange:e=>a(e.target.value),className:"bg-transparent border border-border px-2 py-1.5 text-[12px] text-text outline-none focus:border-accent cursor-pointer",children:s.map(e=>(0,t.jsx)("option",{value:e.value,className:"bg-bg-surface",children:e.label},e.value))})]})}e.s(["default",0,function(){let e=(0,a.useSearchParams)(),[o,i]=(0,r.useState)(null),[x,p]=(0,r.useState)(!1),[u,m]=(0,r.useState)(!1),[h,b]=(0,r.useState)({}),[g,j]=(0,r.useState)(null),[v,f]=(0,r.useState)(!1),[N,y]=(0,r.useState)(null),w=(0,r.useCallback)(()=>{fetch("/api/config").then(e=>{if(!e.ok)throw Error(`${e.status}`);return e.json()}).then(e=>i({port:e.port||8400,agentchattr_url:e.agentchattr_url||"http://127.0.0.1:8300",agentchattr_token:e.agentchattr_token||"",default_backend:e.default_backend||"claude",reviewer_github_user:e.reviewer_github_user||"",operator_name:e.operator_name||"user",projects:e.projects||[]})).catch(()=>{})},[]);(0,r.useEffect)(()=>{w()},[w]),(0,r.useEffect)(()=>{fetch("/api/cli-status").then(e=>e.json()).then(e=>y(e)).catch(()=>{})},[]);let[k,C]=(0,r.useState)(null),[_,S]=(0,r.useState)(""),[T,R]=(0,r.useState)(!1),[P,A]=(0,r.useState)(!1),[O,$]=(0,r.useState)(!1),E=(0,r.useCallback)(()=>{fetch("/api/setup/reviewer-token-status").then(e=>e.ok?e.json():{exists:!1}).then(e=>C(!!e.exists)).catch(()=>C(!1))},[]),I=(0,r.useCallback)(()=>{fetch("/api/caffeinate/status").then(e=>e.ok?e.json():{active:!1}).then(e=>A(!!e.active)).catch(()=>{})},[]);(0,r.useEffect)(()=>{E(),I()},[E,I]);let D=async()=>{if(_.trim()){R(!0);try{(await fetch("/api/setup/save-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:_.trim()})})).ok&&(S(""),E())}finally{R(!1)}}},U=async()=>{$(!0);try{(await fetch(P?"/api/caffeinate/stop":"/api/caffeinate/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})).ok&&I()}finally{$(!1)}};(0,r.useEffect)(()=>{o&&"true"===e.get("add")&&!v&&(f(!0),M())},[o,e,v]);let L=async()=>{if(o){p(!0);try{let e=await fetch("/api/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!e.ok)throw Error(`${e.status}`);m(!0),setTimeout(()=>m(!1),2e3)}catch(e){console.error(e)}p(!1)}},G=(e,t)=>{o&&i({...o,[e]:t})},B=(e,t)=>{if(!o)return;let r=[...o.projects];r[e]={...r[e],...t},i({...o,projects:r})},H=(e,t,r)=>{if(!o)return;let a=[...o.projects],s={...a[e].agents};s[t]={...s[t],...r},a[e]={...a[e],agents:s},i({...o,projects:a})},M=()=>{if(!o)return;let e=`project-${Date.now()}`,t=o.default_backend||"claude",r=N&&!1===N[t]?N&&N.claude&&!N.codex?"claude":N&&!N.claude&&N.codex?"codex":"claude":t,a={};for(let[e,t]of Object.entries(s))a[e]={...t,command:r};i({...o,projects:[...o.projects,{id:e,name:"New Project",repo:"owner/repo",working_dir:"",agents:a}]}),b({...h,[e]:!0})},W=(0,r.useRef)({}),q=(0,r.useRef)({}),J=e=>{o&&B(e,{archived:!1})},K=e=>{if(!o)return;let t=o.projects.filter((t,r)=>r!==e);i({...o,projects:t}),j(null)};return o?(0,t.jsxs)("div",{className:"h-full w-full overflow-y-auto p-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,t.jsx)("h1",{className:"text-lg font-semibold text-text tracking-tight",children:"Settings"}),(0,t.jsx)("button",{onClick:L,disabled:x,className:"px-4 py-1.5 bg-accent text-bg text-[12px] font-semibold hover:bg-accent-dim transition-colors disabled:opacity-50",children:x?"Saving...":u?"Saved":"Save"})]}),(0,t.jsxs)("section",{className:"mb-8",children:[(0,t.jsx)("h2",{className:"text-[11px] text-text-muted uppercase tracking-wider mb-3",children:"Operator Identity"}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:(0,t.jsx)(c,{label:"Your name in chat",value:o.operator_name||"user",onChange:e=>G("operator_name",e),placeholder:"user"})}),(0,t.jsxs)("p",{className:"mt-2 text-[10px] text-text-muted leading-snug",children:["Shows next to your messages in the AgentChattr chat panel. Defaults to ",(0,t.jsx)("code",{children:"user"}),"if blank. Allowed: 1–32 letters, digits, dash, underscore (matches AgentChattr's name rules; other characters are stripped server-side). Reserved agent names like ",(0,t.jsx)("code",{children:"head"}),", ",(0,t.jsx)("code",{children:"dev"}),", ",(0,t.jsx)("code",{children:"reviewer1"}),", ",(0,t.jsx)("code",{children:"reviewer2"}),", and ",(0,t.jsx)("code",{children:"system"})," are rejected and fall back to ",(0,t.jsx)("code",{children:"user"}),"."]})]}),(0,t.jsxs)("section",{className:"mb-8",children:[(0,t.jsx)("h2",{className:"text-[11px] text-text-muted uppercase tracking-wider mb-3",children:"Global"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,t.jsx)(c,{label:"QuadWork Dashboard Port",value:String(o.port),onChange:e=>G("port",parseInt(e,10)||8400),type:"number"}),(0,t.jsx)(c,{label:"AgentChattr URL (global override)",value:o.agentchattr_url,onChange:e=>G("agentchattr_url",e),placeholder:"http://127.0.0.1:8300"})]}),(0,t.jsx)("p",{className:"mt-2 text-[10px] text-text-muted leading-snug",children:"The dashboard binds to the QuadWork port. The AgentChattr URL is the v1 fallback; new projects use a per-project AgentChattr clone (master #181) and ignore this field."})]}),(0,t.jsxs)("section",{className:"mb-8",children:[(0,t.jsx)("h2",{className:"text-[11px] text-text-muted uppercase tracking-wider mb-3",children:"Defaults"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3 items-end",children:[(0,t.jsx)(d,{label:"Default agent CLI",value:o.default_backend||"claude",onChange:e=>G("default_backend",e),options:n.map(e=>({value:e.value,label:e.label+(N&&!N[e.value]?" (not installed)":"")}))}),(0,t.jsx)(c,{label:"Reviewer GitHub user",value:o.reviewer_github_user||"",onChange:e=>G("reviewer_github_user",e),placeholder:"reviewer-bot"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Reviewer GitHub token"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${k?"bg-accent":"bg-text-muted"}`}),(0,t.jsx)("span",{className:"text-[11px] text-text-muted",children:null===k?"…":k?"Configured":"Not configured"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-1",children:[(0,t.jsx)("input",{type:"password",value:_,onChange:e=>S(e.target.value),placeholder:"Paste new token",className:"flex-1 bg-transparent border border-border px-2 py-1 text-[11px] text-text outline-none focus:border-accent font-mono"}),(0,t.jsx)("button",{onClick:D,disabled:T||!_.trim(),className:"px-2 py-1 text-[11px] font-semibold text-bg bg-accent hover:bg-accent-dim disabled:opacity-50 transition-colors",children:T?"Saving…":"Save"})]})]})]}),(0,t.jsxs)("p",{className:"mt-2 text-[10px] text-text-muted leading-snug",children:["The default CLI seeds new project agents. The reviewer GitHub user/token are used by Reviewer1/Reviewer2 to post PR review comments without your personal token. The token is written to"," ",(0,t.jsx)("code",{className:"bg-bg-surface px-1 rounded",children:"~/.quadwork/reviewer-token"})," ","(mode 0600) and is never returned by the API."]})]}),(0,t.jsxs)("section",{className:"mb-8",children:[(0,t.jsx)("h2",{className:"text-[11px] text-text-muted uppercase tracking-wider mb-3",children:"System"}),(0,t.jsxs)("div",{className:"border border-border p-3 flex items-center gap-3",children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${P?"bg-accent":"bg-text-muted"}`}),(0,t.jsxs)("span",{className:"text-[11px] text-text",children:["Keep Awake — ",P?"on":"off"]}),(0,t.jsx)("button",{onClick:U,disabled:O,className:"px-2 py-1 text-[11px] border border-border text-text-muted hover:text-text hover:border-accent disabled:opacity-50 transition-colors",children:O?"…":P?"Stop":"Start"}),(0,t.jsxs)("span",{className:"text-[10px] text-text-muted",children:["Prevents this machine from sleeping while agents are running. Machine-level (not per-project) — uses ",(0,t.jsx)("code",{children:"caffeinate"})," on macOS."]})]})]}),(0,t.jsxs)("section",{className:"mb-8",children:[(0,t.jsx)("h2",{className:"text-[11px] text-text-muted uppercase tracking-wider mb-3",children:"Cleanup"}),(0,t.jsxs)("div",{className:"border border-border p-3 text-[11px] text-text-muted space-y-1",children:[(0,t.jsxs)("p",{children:["Each project now has its own AgentChattr clone at"," ",(0,t.jsx)("code",{className:"bg-bg-surface px-1 rounded",children:"~/.quadwork/{id}/agentchattr"})," ","(~77 MB). After all projects are migrated, the legacy global install can be removed:"]}),(0,t.jsx)("pre",{className:"mt-1 p-2 bg-bg-surface text-text rounded font-mono text-[11px]",children:"npx quadwork cleanup --legacy"}),(0,t.jsx)("p",{className:"mt-2",children:"To remove a single project's clone and config entry:"}),(0,t.jsx)("pre",{className:"mt-1 p-2 bg-bg-surface text-text rounded font-mono text-[11px]",children:"npx quadwork cleanup --project <id>"}),(0,t.jsxs)("p",{className:"mt-2 text-text-muted/80",children:["Both commands prompt for confirmation. Worktrees and source repos are never touched. See ",(0,t.jsx)("code",{children:"npx quadwork --help"}),"or the README's Disk Usage section for details."]})]})]}),(0,t.jsx)("hr",{className:"border-border mb-6"}),(0,t.jsxs)("section",{className:"mb-6",children:[(0,t.jsx)("h2",{className:"text-[11px] text-text-muted uppercase tracking-wider mb-3",children:"Active Projects"}),o.projects.filter(e=>!e.archived).map(e=>{let r=o.projects.indexOf(e);return(0,t.jsxs)("div",{className:"border border-border mb-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-between px-3 py-2",children:(0,t.jsx)("span",{className:"text-[12px] text-text font-semibold",children:e.name})}),(0,t.jsxs)("div",{className:"px-3 pb-3 border-t border-border",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3 mt-3",children:[(0,t.jsx)(c,{label:"Project Name",value:e.name,onChange:e=>((e,t)=>{if(!o)return;let r=o.projects[e],a=`project:${r.id}`;a in W.current||(W.current[a]=r.name),B(e,{name:t}),q.current[a]&&clearTimeout(q.current[a]),q.current[a]=setTimeout(()=>{let e=W.current[a];e&&e!==t&&fetch("/api/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"project",projectId:r.id,oldName:e,newName:t})}).then(()=>w()).catch(()=>{}),delete W.current[a],delete q.current[a]},800)})(r,e)}),(0,t.jsx)(c,{label:"GitHub Repo",value:e.repo,onChange:e=>B(r,{repo:e}),placeholder:"owner/repo"}),(0,t.jsx)(c,{label:"Working Directory",value:e.working_dir||"",onChange:e=>B(r,{working_dir:e}),placeholder:"/path/to/project"})]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("h3",{className:"text-[10px] text-text-muted uppercase tracking-wider mb-2",children:"Agents"}),N&&(N.claude?!N.codex:N.codex)&&(0,t.jsxs)("div",{className:"border border-accent/20 bg-accent/5 p-2 mb-2 text-[10px]",children:[(0,t.jsxs)("span",{className:"text-text",children:[N.claude?"Only Claude Code":"Only Codex CLI"," is installed."]}),(0,t.jsxs)("span",{className:"text-text-muted ml-1",children:["Install ",N.claude?"Codex":"Claude Code"," for more backend options:"]}),(0,t.jsx)("code",{className:"text-accent ml-1",children:N.claude?"npm install -g codex":"npm install -g @anthropic-ai/claude-code"})]}),(0,t.jsxs)("div",{className:"border border-border",children:[(0,t.jsxs)("div",{className:"grid grid-cols-5 gap-0 px-2 py-1 border-b border-border text-[10px] text-text-muted uppercase",children:[(0,t.jsx)("span",{children:"Name"}),(0,t.jsx)("span",{children:"Command"}),(0,t.jsx)("span",{children:"Model"}),(0,t.jsx)("span",{children:"CWD"}),(0,t.jsx)("span",{children:"AGENTS.md"})]}),Object.entries(e.agents||{}).map(([a,s])=>(0,t.jsxs)("div",{className:"border-b border-border/50 last:border-b-0",children:[(0,t.jsxs)("div",{className:"grid grid-cols-5 gap-0 px-2 py-1",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("input",{value:s.display_name||a.toUpperCase(),onChange:e=>((e,t,r)=>{if(!o)return;let a=o.projects[e],s=a.agents?.[t],n=`agent:${a.id}:${t}`;n in W.current||(W.current[n]=s?.display_name||t.toUpperCase()),H(e,t,{display_name:r}),q.current[n]&&clearTimeout(q.current[n]),q.current[n]=setTimeout(()=>{let e=W.current[n];e&&e!==r&&fetch("/api/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"agent",projectId:a.id,agentId:t,oldName:e,newName:r})}).then(()=>w()).catch(()=>{}),delete W.current[n],delete q.current[n]},800)})(r,a,e.target.value),className:"bg-transparent text-[11px] text-text font-semibold outline-none border border-border px-1 py-0.5 focus:border-accent"}),(0,t.jsx)("span",{className:"text-[9px] text-text-muted px-1",children:"head"===a?"Owner":a.startsWith("reviewer")?"Reviewer":"Builder"})]}),(0,t.jsx)("select",{value:s.command||"claude",onChange:e=>H(r,a,{command:e.target.value}),className:"bg-transparent text-[11px] text-text outline-none border border-border px-1 py-0.5 focus:border-accent",title:N&&1===Object.values(N).filter(Boolean).length?"Only one CLI installed — install the other for more options":void 0,children:n.map(e=>(0,t.jsxs)("option",{value:e.value,className:"bg-bg-surface",disabled:!!N&&!N[e.value],children:[e.label,N&&!N[e.value]?" (not installed)":""]},e.value))}),(0,t.jsx)("select",{value:s.model||"sonnet",onChange:e=>H(r,a,{model:e.target.value}),className:"bg-transparent text-[11px] text-text outline-none border border-border px-1 py-0.5 focus:border-accent",children:l.map(e=>(0,t.jsx)("option",{value:e,className:"bg-bg-surface",children:e},e))}),(0,t.jsx)("input",{value:s.cwd||"",onChange:e=>H(r,a,{cwd:e.target.value}),placeholder:"/path/to/worktree",className:"bg-transparent text-[11px] text-text outline-none border border-border px-1 py-0.5 focus:border-accent"}),(0,t.jsx)("button",{onClick:()=>b({...h,[`${e.id}-${a}-md`]:!h[`${e.id}-${a}-md`]}),className:"text-[10px] text-text-muted hover:text-accent transition-colors text-left px-1",children:h[`${e.id}-${a}-md`]?"▾ edit":"▸ edit"})]}),h[`${e.id}-${a}-md`]&&(0,t.jsx)("div",{className:"px-2 pb-2",children:(0,t.jsx)("textarea",{value:s.agents_md||"",onChange:e=>H(r,a,{agents_md:e.target.value}),placeholder:"# AGENTS.md seed content for this agent...",rows:8,className:"w-full bg-transparent border border-border px-2 py-1.5 text-[11px] text-text outline-none focus:border-accent resize-y"})})]},a))]})]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("h3",{className:"text-[10px] text-text-muted uppercase tracking-wider mb-2",children:"AgentChattr"}),(0,t.jsx)("div",{className:"border border-border p-3",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[(0,t.jsx)(c,{label:"AgentChattr URL",value:e.agentchattr_url||"",onChange:e=>B(r,{agentchattr_url:e}),placeholder:"http://127.0.0.1:8300"}),(0,t.jsx)(c,{label:"Session Token",value:e.agentchattr_token||"",onChange:e=>B(r,{agentchattr_token:e}),placeholder:"(optional)"}),(0,t.jsx)(c,{label:"MCP HTTP Port",value:String(e.mcp_http_port||""),onChange:e=>B(r,{mcp_http_port:parseInt(e,10)||void 0}),type:"number",placeholder:"8200"}),(0,t.jsx)(c,{label:"MCP SSE Port",value:String(e.mcp_sse_port||""),onChange:e=>B(r,{mcp_sse_port:parseInt(e,10)||void 0}),type:"number",placeholder:"8201"})]})})]}),(0,t.jsxs)("div",{className:"mt-4 flex justify-end gap-3",children:[e.archived?(0,t.jsx)("button",{onClick:()=>J(r),className:"text-[11px] text-accent hover:underline",children:"Restore Project"}):(0,t.jsx)("button",{onClick:()=>{o&&B(r,{archived:!0})},className:"text-[11px] text-text-muted hover:text-text transition-colors",children:"Archive"}),g===e.id?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[11px] text-error",children:"Remove?"}),(0,t.jsx)("button",{onClick:()=>K(r),className:"px-2 py-1 text-[11px] bg-error text-bg font-semibold",children:"Confirm"}),(0,t.jsx)("button",{onClick:()=>j(null),className:"px-2 py-1 text-[11px] text-text-muted border border-border",children:"Cancel"})]}):(0,t.jsx)("button",{onClick:()=>j(e.id),className:"text-[11px] text-error hover:text-text transition-colors",children:"Remove"})]})]})]},e.id)}),(0,t.jsx)("button",{onClick:M,className:"w-full border border-dashed border-border py-2 text-[12px] text-text-muted hover:text-text hover:border-text-muted transition-colors",children:"+ Add Project"}),o.projects.some(e=>e.archived)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("hr",{className:"border-border my-4"}),(0,t.jsx)("h2",{className:"text-[11px] text-text-muted uppercase tracking-wider mb-3",children:"Archived"}),o.projects.filter(e=>e.archived).map(e=>{let r=o.projects.indexOf(e);return(0,t.jsx)("div",{className:"border border-border mb-3 opacity-60",children:(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 py-2",children:[(0,t.jsx)("span",{className:"text-[12px] text-text-muted",children:e.name}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{onClick:()=>J(r),className:"text-[11px] text-accent hover:underline",children:"Restore"}),(0,t.jsx)("button",{onClick:()=>{g===e.id?K(r):j(e.id)},className:"text-[11px] text-error hover:underline",children:g===e.id?"Confirm Remove":"Remove"})]})]})},e.id)})]})]}),(0,t.jsx)("div",{className:"flex justify-end pb-6",children:(0,t.jsx)("button",{onClick:L,disabled:x,className:"px-4 py-1.5 bg-accent text-bg text-[12px] font-semibold hover:bg-accent-dim transition-colors disabled:opacity-50",children:x?"Saving...":u?"Saved":"Save"})})]}):(0,t.jsx)("div",{className:"p-6 text-text-muted text-xs",children:"Loading..."})}])}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|