copilot-operator 0.1.15 → 0.1.17

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.
Files changed (44) hide show
  1. package/dist/src/api/operator.controller.js +34 -0
  2. package/dist/src/api/operator.service.js +112 -1
  3. package/dist/src/plan/brief.js +34 -0
  4. package/dist/src/plan/importPlan.js +8 -1
  5. package/dist/src/plan/schema.js +24 -0
  6. package/dist/src/plan/systemGuide.js +63 -0
  7. package/dist/src/session/exports.js +2 -0
  8. package/dist/src/session/store.js +68 -6
  9. package/dist/src/transport/copilotTransport.js +39 -1
  10. package/dist/src/vcs/snapshot.js +354 -0
  11. package/dist/src/vcs/taskVcs.js +68 -23
  12. package/dist/web/404.html +2 -2
  13. package/dist/web/_next/static/chunks/549-a13ae394c5e6a837.js +1 -0
  14. package/dist/web/_next/static/chunks/867-7f27ef819d251cc5.js +1 -0
  15. package/dist/web/_next/static/chunks/app/defaults/page-fd819bbfa7f33982.js +1 -0
  16. package/dist/web/_next/static/chunks/app/page-409e37e208dc12e5.js +1 -0
  17. package/dist/web/_next/static/chunks/app/sessions/view/page-d28825430ca280de.js +1 -0
  18. package/dist/web/_next/static/css/{e2a2c9eb3c226313.css → c37978b44194c37b.css} +1 -1
  19. package/dist/web/appearance.html +2 -2
  20. package/dist/web/appearance.txt +12 -12
  21. package/dist/web/defaults.html +2 -2
  22. package/dist/web/defaults.txt +12 -12
  23. package/dist/web/history.html +2 -2
  24. package/dist/web/history.txt +12 -12
  25. package/dist/web/import.html +2 -2
  26. package/dist/web/import.txt +12 -12
  27. package/dist/web/index.html +2 -2
  28. package/dist/web/index.txt +12 -12
  29. package/dist/web/level1.html +2 -2
  30. package/dist/web/level1.txt +12 -12
  31. package/dist/web/presets.html +2 -2
  32. package/dist/web/presets.txt +12 -12
  33. package/dist/web/sessions/view.html +2 -2
  34. package/dist/web/sessions/view.txt +12 -12
  35. package/dist/web/system.html +2 -2
  36. package/dist/web/system.txt +12 -12
  37. package/package.json +6 -3
  38. package/dist/web/_next/static/chunks/549-9548d9a132c8c7d4.js +0 -1
  39. package/dist/web/_next/static/chunks/867-8b95ae984befc0e2.js +0 -1
  40. package/dist/web/_next/static/chunks/app/defaults/page-71a43ed69134b48d.js +0 -1
  41. package/dist/web/_next/static/chunks/app/page-13572a726de0b7db.js +0 -1
  42. package/dist/web/_next/static/chunks/app/sessions/view/page-886f5fc99e146408.js +0 -1
  43. /package/dist/web/_next/static/{IwNZiBrEMAcXEUFj2miiU → kkxFcGzA9Uo1uRAgcoDti}/_buildManifest.js +0 -0
  44. /package/dist/web/_next/static/{IwNZiBrEMAcXEUFj2miiU → kkxFcGzA9Uo1uRAgcoDti}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[189],{1035:(e,l,t)=>{"use strict";t.d(l,{DialogHost:()=>d,Z:()=>c});var n=t(3365),s=t(1521),a=t(867),r=t(4969);let i=null,o=[];function c(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(t=>{var n;return n={kind:"confirm",message:e,...l,resolve:t},void(i?i(n):o.push(n))})}function d(e){var l,t;let{children:c}=e,{t:d}=(0,a.kj)(),[m,u]=(0,s.useState)([]),h=(0,s.useRef)(null),x=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(i=e=>u(l=>[...l,e]),o.length>0){let e=o.splice(0,o.length);u(l=>[...l,...e])}return()=>{i=null}},[]);let p=m[0],j=(0,s.useCallback)(e=>{p&&(p.resolve(e),u(e=>e.slice(1)))},[p]);return(0,r.V)(x,!!p,h),(0,s.useEffect)(()=>{if(!p)return;let e=e=>{"Escape"===e.key&&(e.preventDefault(),j(!1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[p,j]),(0,n.jsxs)(n.Fragment,{children:[c,p&&(0,n.jsx)("div",{className:"modal-backdrop",onClick:()=>j(!1),role:"presentation",children:(0,n.jsxs)("div",{ref:x,className:"modal".concat(p.danger?" danger":""),role:"confirm"===p.kind?"alertdialog":"dialog","aria-modal":"true","aria-labelledby":"modal-title","aria-describedby":"modal-body",onClick:e=>e.stopPropagation(),children:[(0,n.jsx)("h2",{id:"modal-title",children:null!=(l=p.title)?l:d("confirm"===p.kind?"dialog.confirmTitle":"dialog.noticeTitle")}),(0,n.jsx)("div",{id:"modal-body",className:"modal-body",children:p.message}),(0,n.jsxs)("div",{className:"row modal-actions",children:["confirm"===p.kind&&(0,n.jsx)("button",{type:"button",className:"quiet",onClick:()=>j(!1),children:d("dialog.cancel")}),(0,n.jsx)("button",{ref:h,type:"button",className:p.danger?"danger":"primary",onClick:()=>j(!0),children:null!=(t=p.okLabel)?t:d("dialog.ok")})]})]})})]})}},1896:(e,l,t)=>{Promise.resolve().then(t.bind(t,3197))},2285:(e,l,t)=>{"use strict";t.d(l,{b:()=>i});var n=t(3365),s=t(1521),a=t(5549),r=t(867);function i(e){var l,t;let{dir:i}=e,{t:o}=(0,r.kj)(),c=(0,r.W3)(),[d,m]=(0,s.useState)(null),[u,h]=(0,s.useState)(""),[x,p]=(0,s.useState)(""),j=async()=>{h("");try{m(await a.FH.syncPlan(i))}catch(e){h(e.message)}},v=async(e,l)=>{try{await navigator.clipboard.writeText(l),p(e),window.setTimeout(()=>p(""),2500)}catch(e){h(o("plan.copyFailed"))}},f=e=>(0,n.jsxs)("ul",{style:{margin:"2px 0 6px",paddingLeft:20},children:[e.slice(0,30).map(e=>(0,n.jsx)("li",{children:(0,n.jsx)("code",{children:e})},e)),e.length>30&&(0,n.jsx)("li",{className:"muted",children:o("sync.more",{n:e.length-30})})]});return(0,n.jsxs)("div",{className:"sync-command small",style:{marginTop:8},children:[(0,n.jsx)("button",{type:"button",onClick:()=>void j(),children:o("sync.show")}),u&&(0,n.jsx)("p",{className:"err",children:u}),d&&!d.ok&&(0,n.jsx)("p",{className:"err",children:d.problem}),(null==d?void 0:d.ok)&&(0,n.jsxs)("div",{className:"notice caution",style:{marginTop:8},children:[(0,n.jsxs)("p",{children:[o("sync.what",{branch:null!=(l=d.branch)?l:"",target:null!=(t=d.target)?t:""})," ",(0,n.jsx)("span",{className:"muted",children:d.lastFetched?o("sync.fetchedAt",{when:c(d.lastFetched)}):o("sync.neverFetched")})]}),d.willLose.commits.length+d.willLose.changed.length+d.willLose.untracked.length===0?(0,n.jsx)("p",{children:o("sync.nothingLost")}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("strong",{children:o("sync.loses")}),d.willLose.commits.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{children:o("sync.commits",{n:d.willLose.commits.length})}),f(d.willLose.commits)]}),d.willLose.changed.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{children:o("sync.changed",{n:d.willLose.changed.length})}),f(d.willLose.changed)]}),d.willLose.untracked.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{children:o("sync.untracked",{n:d.willLose.untracked.length})}),f(d.willLose.untracked)]})]}),(0,n.jsx)("p",{className:"muted",children:o("sync.keeps")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("button",{type:"button",onClick:()=>void v("preview",d.preview),children:o("sync.copyPreview")}),"preview"===x&&(0,n.jsx)("span",{className:"badge done",children:o("plan.copied")})]}),(0,n.jsx)("pre",{className:"sync-cmd",children:d.preview}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("button",{type:"button",className:"danger",onClick:()=>void v("command",d.command),children:o("sync.copyCommand")}),"command"===x&&(0,n.jsx)("span",{className:"badge done",children:o("plan.copied")})]}),(0,n.jsx)("pre",{className:"sync-cmd",children:d.command}),(0,n.jsx)("p",{className:"muted",children:o("sync.howToRun")})]})]})}},3197:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>u});var n=t(3365),s=t(1521),a=t(2285),r=t(8197),i=t.n(r),o=t(5549),c=t(867),d=t(1035),m=t(4784);function u(){let{t:e}=(0,c.kj)(),[l,t]=(0,s.useState)(null),[a,r]=(0,s.useState)(!1),[i,m]=(0,s.useState)("");(0,s.useEffect)(()=>{o.FH.models().then(t).catch(()=>void 0)},[]);let u=async()=>{if(await (0,d.Z)(e("model.refreshConfirm"))){r(!0),m(e("model.refreshing"));try{var l;let n=await o.FH.models().then(()=>o.FH.refreshModels());t(n),m(0===n.options.length?null!=(l=n.note)?l:e("model.none"):e("model.refreshed",{n:n.options.length}))}catch(e){m(e.message)}finally{r(!1)}}},h={catalogue:l,setCatalogue:t,refreshModels:u,refreshing:a,refreshMsg:i};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"panel",children:[(0,n.jsx)("h2",{children:e("def.title")}),(0,n.jsx)("p",{className:"muted small",children:e("def.intro")}),(0,n.jsx)("p",{className:"why",children:e("def.autoSave")})]}),(0,n.jsx)(v,{}),(0,n.jsx)(g,{}),(0,n.jsx)(w,{...h}),(0,n.jsx)(b,{...h}),(0,n.jsx)(y,{})]})}function h(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:900,t=(0,s.useRef)(null),n=(0,s.useRef)(null),a=(0,s.useRef)(e);return a.current=e,(0,s.useEffect)(()=>()=>{t.current&&clearTimeout(t.current),n.current&&a.current(n.current.value)},[]),e=>{t.current&&clearTimeout(t.current),n.current={value:e},t.current=setTimeout(()=>{n.current=null,a.current(e)},l)}}function x(e){let{id:l,value:t,min:a,max:r,onChange:i,disabled:o}=e,[c,d]=(0,s.useState)(String(t));return(0,s.useEffect)(()=>d(e=>p(e)===t?e:String(t)),[t]),(0,n.jsx)("input",{id:l,type:"number",min:a,max:r,step:1,value:c,onChange:e=>{d(e.target.value);let l=p(e.target.value);null!==l&&l>=a&&l<=r&&i(l)},onBlur:()=>{let e=p(c),l=null===e?t:Math.max(a,Math.min(r,e));d(String(l)),l!==t&&i(l)},style:{width:"9ch"},disabled:o})}function p(e){if(""===e.trim())return null;let l=Number(e);return Number.isInteger(l)?l:null}function j(e){let{msg:l,onSave:t}=e,{t:s}=(0,c.kj)();return(0,n.jsxs)("div",{className:"row",style:{marginTop:6},children:[t&&(0,n.jsx)("button",{className:"quiet",onClick:t,title:s("def.saveAnywayWhy"),children:s("def.saveAnyway")}),(0,n.jsx)("span",{className:"muted small",role:"status",children:l||s("def.savedAutomatically")})]})}function v(){var e;let{t:l}=(0,c.kj)(),[t,a]=(0,s.useState)(null),[r,i]=(0,s.useState)(""),[d,m]=(0,s.useState)(""),[u,x]=(0,s.useState)(""),[p,v]=(0,s.useState)(""),[y,g]=(0,s.useState)(!1),[w,b]=(0,s.useState)(""),[N,k]=(0,s.useState)(""),S=(0,s.useCallback)(async()=>{try{let e=await o.FH.project();a(e),i(e.rootDir),m(e.name),v("")}catch(e){v(e.message)}},[]);(0,s.useEffect)(()=>{S()},[S]);let F=async(e,l)=>{g(!0),x("");try{let t=await o.FH.setProject(e);return a(t),i(t.rootDir),x(l(t)),v(""),!0}catch(e){return v(e.message),!1}finally{g(!1)}},C=e=>F({rootDir:e},e=>e.rootDir?l("proj.saved",{dir:e.rootDir}):l("proj.cleared")),R=e=>F({name:e},()=>l("proj.nameSaved")),T=h(C),D=h(R),E=async(e,l)=>{g(!0);try{var t;let n=await o.FH.browseFolder(l.trim()||void 0);n.ok?e(n.path):n.cancelled||v(null!=(t=n.reason)?t:"")}catch(e){v(e.message)}finally{g(!1)}},M=null!=(e=null==t?void 0:t.others)?e:[],A=e=>e.map(e=>({name:e.name,rootDir:e.rootDir})),L=async()=>{await F({others:[...A(M),{name:w.trim(),rootDir:N.trim()}]},e=>l("proj.othersSaved",{n:e.others.length}))&&(b(""),k(""))};return(0,n.jsxs)("div",{className:"panel",id:"project",children:[(0,n.jsx)("h2",{children:l("proj.title")}),(0,n.jsx)("p",{className:"muted small",children:l("proj.intro")}),p&&(0,n.jsx)("div",{className:"err",children:p}),(0,n.jsx)("p",{className:"muted small",children:l("proj.listIntro")}),(0,n.jsx)(f,{name:d,dir:r,repoOk:!!(null==t?void 0:t.repoOk),repoProblem:null==t?void 0:t.repoProblem,isDefault:!0,busy:y,onNameInput:e=>{m(e),D(e)},onName:e=>void R(e),onDirInput:e=>{i(e),T(e)},onDir:e=>void C(e),onBrowse:()=>void E(e=>void C(e),r),onRemove:(null==t?void 0:t.rootDir)?()=>void C(""):void 0,removeLabel:l("proj.clear")}),(0,n.jsx)(j,{msg:u}),t&&!t.rootDir&&(0,n.jsx)("p",{className:"muted small",style:{marginTop:8},children:l("proj.none")}),M.map((e,t)=>(0,n.jsx)(f,{name:e.name,dir:e.rootDir,repoOk:e.repoOk,repoProblem:e.repoProblem,busy:y,onName:t=>void F({others:A(M.map(l=>l.name===e.name?{...l,name:t}:l))},()=>l("proj.nameSaved")),onDir:t=>void F({others:A(M.map(l=>l.name===e.name?{...l,rootDir:t}:l))},()=>l("proj.othersSaved",{n:M.length})),onBrowse:()=>void E(t=>void F({others:A(M.map(l=>l.name===e.name?{...l,rootDir:t}:l))},()=>l("proj.othersSaved",{n:M.length})),e.rootDir),onRemove:()=>{let t;t=e.name,F({others:A(M.filter(e=>e.name!==t))},e=>l("proj.othersSaved",{n:e.others.length}))},removeLabel:l("proj.otherRemove")},"other-".concat(t))),(0,n.jsx)("h3",{id:"others",children:l("proj.addTitle")}),(0,n.jsx)("p",{className:"muted small",children:l("proj.othersIntro")}),(0,n.jsxs)("div",{className:"row",style:{marginTop:8},children:[(0,n.jsx)("input",{type:"text","aria-label":l("proj.entryName"),value:w,onChange:e=>b(e.target.value),placeholder:l("proj.entryName"),disabled:y,style:{width:160}}),(0,n.jsx)("input",{type:"text",className:"grow","aria-label":l("proj.entryDir"),value:N,onChange:e=>k(e.target.value),placeholder:"C:\\Projects\\my-app-tests",disabled:y}),(0,n.jsx)("button",{onClick:()=>void E(e=>k(e),N),disabled:y,children:l("mirror.browse")}),(0,n.jsx)("button",{className:"primary",onClick:()=>void L(),disabled:y||!w.trim()||!N.trim(),children:l("proj.otherAdd")})]}),(0,n.jsx)("h3",{children:l("proj.affects")}),(0,n.jsxs)("ul",{className:"muted small",style:{margin:0,paddingLeft:20},children:[(0,n.jsx)("li",{children:l("proj.affectsNew")}),(0,n.jsx)("li",{children:l("proj.affectsExisting")}),(0,n.jsx)("li",{children:l("proj.affectsPlan")}),(0,n.jsx)("li",{children:l("proj.affectsNever")})]})]})}function f(e){var l;let{name:t,dir:r,repoOk:i,repoProblem:o,isDefault:d=!1,busy:m,onNameInput:u,onName:h,onDirInput:x,onDir:p,onBrowse:j,onRemove:v,removeLabel:f}=e,{t:y}=(0,c.kj)(),g=(0,s.useId)(),[w,b]=(0,s.useState)(t),[N,k]=(0,s.useState)(r);return(0,s.useEffect)(()=>b(t),[t]),(0,s.useEffect)(()=>k(r),[r]),(0,n.jsxs)("div",{className:"panel inner",style:{marginTop:10},children:[(0,n.jsxs)("div",{className:"row",children:[(0,n.jsxs)("div",{style:{width:"min(200px, 100%)"},children:[(0,n.jsx)("label",{htmlFor:"".concat(g,"-name"),children:y("proj.entryName")}),(0,n.jsx)("input",{id:"".concat(g,"-name"),type:"text",value:w,onChange:e=>{b(e.target.value),null==u||u(e.target.value)},onBlur:()=>{(w!==t||u)&&h(w)},placeholder:r?null!=(l=r.replace(/[\/]+$/,"").split(/[\/]/).pop())?l:"":y("proj.namePlaceholder")})]}),(0,n.jsxs)("div",{className:"grow",children:[(0,n.jsx)("label",{htmlFor:"".concat(g,"-dir"),children:y("proj.entryDir")}),(0,n.jsx)("input",{id:"".concat(g,"-dir"),type:"text",value:N,onChange:e=>{k(e.target.value),null==x||x(e.target.value)},onBlur:()=>{(N!==r||x)&&p(N)},placeholder:"C:\\Projects\\my-app"})]}),(0,n.jsx)("button",{onClick:j,disabled:m,children:y("mirror.browse")}),v&&(0,n.jsx)("button",{className:"quiet",onClick:v,disabled:m,children:f})]}),(0,n.jsxs)("div",{className:"row small",style:{marginTop:6},children:[d&&(0,n.jsx)("span",{className:"chip",title:y("proj.isDefaultWhy"),children:y("proj.isDefault")}),r&&(0,n.jsx)("span",{className:"badge ".concat(i?"done":""),title:i?y("proj.isRepo"):o,children:y(i?"proj.otherRepo":"proj.otherNotRepo")}),r&&!i&&(0,n.jsx)("span",{className:"muted",children:o||y("proj.notRepoWhy")})]}),r&&i&&(0,n.jsx)(a.b,{dir:r})]})}function y(){let{t:e}=(0,c.kj)(),[l,t]=(0,s.useState)(null),a=(0,s.useRef)(null),r=(0,s.useRef)(Promise.resolve()),[i,d]=(0,s.useState)(2),[m,u]=(0,s.useState)(2),[p,v]=(0,s.useState)(60),[f,y]=(0,s.useState)(240),[g,w]=(0,s.useState)(900),[b,N]=(0,s.useState)("none"),[k,S]=(0,s.useState)("confirm"),[F,C]=(0,s.useState)("ask"),[R,T]=(0,s.useState)(""),[D,E]=(0,s.useState)("");(0,s.useEffect)(()=>{o.FH.settings().then(e=>{var l,n,s,r,i,o;a.current=e.raw,t(e.raw);let c=null!=(l=e.raw.limits)?l:{};d("number"==typeof c.retryBlockedInFreshChat?c.retryBlockedInFreshChat:2),u("number"==typeof c.minApproachesBeforeBlocked?c.minApproachesBeforeBlocked:2),v("number"==typeof c.maxIterations?c.maxIterations:60),y("number"==typeof c.maxRunMinutes?c.maxRunMinutes:240);let m=null!=(n=e.raw.copilot)?n:{};w("number"==typeof m.replyTimeoutSec?m.replyTimeoutSec:900);let h=null!=(s=e.raw.execution)?s:{};N(null!=(r=h.isolation)?r:"none"),S(null!=(i=h.mode)?i:"confirm"),C(null!=(o=h.networkFetch)?o:"ask")}).catch(e=>E(e.message))},[]);let M=(l,n,s)=>{let i=async()=>{var r;if(!a.current)return;let i=await o.FH.settings().then(e=>e.raw).catch(()=>a.current),c={...i,[l]:{...null!=(r=i[l])?r:{},[n]:s}};T("");try{await o.FH.saveSettings(c),a.current=c,t(c),T(e("exec.saved")),E("")}catch(e){E(e.message)}},c=r.current.then(i);return r.current=c.catch(()=>void 0),c},A=h(e=>M("limits","retryBlockedInFreshChat",e)),L=h(e=>M("limits","minApproachesBeforeBlocked",e)),B=h(e=>M("limits","maxIterations",e)),I=h(e=>M("limits","maxRunMinutes",e)),H=h(e=>M("copilot","replyTimeoutSec",e)),P=(e,l)=>M("execution",e,l);return(0,n.jsxs)("div",{className:"panel",id:"execution",children:[(0,n.jsx)("h2",{children:e("exec.title")}),(0,n.jsx)("p",{className:"muted small",children:e("exec.intro")}),D&&(0,n.jsx)("div",{className:"err",children:D}),(0,n.jsx)("label",{htmlFor:"min-approaches",children:e("exec.minApproaches")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)(x,{id:"min-approaches",value:m,min:2,max:20,onChange:e=>{u(e),L(e)},disabled:!l}),(0,n.jsx)("span",{className:"muted small",children:e("exec.minApproachesUnit")})]}),(0,n.jsx)("p",{className:"why",children:e("exec.minApproachesWhy")}),(0,n.jsx)("label",{htmlFor:"retry-blocked",children:e("exec.retryBlocked")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)(x,{id:"retry-blocked",value:i,min:0,max:5,onChange:e=>{d(e),A(e)},disabled:!l}),(0,n.jsx)("span",{className:"muted small",children:e("exec.retryBlockedTimes")})]}),(0,n.jsx)("p",{className:"why",children:e("exec.retryBlockedWhy")}),(0,n.jsx)("label",{htmlFor:"max-iterations",children:e("exec.maxIterations")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)(x,{id:"max-iterations",value:p,min:5,max:200,onChange:e=>{v(e),B(e)},disabled:!l}),(0,n.jsx)("span",{className:"muted small",children:e("exec.maxIterationsUnit")})]}),(0,n.jsx)("p",{className:"why",children:e("exec.maxIterationsWhy")}),(0,n.jsx)("label",{htmlFor:"max-minutes",children:e("exec.maxRunMinutes")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)(x,{id:"max-minutes",value:f,min:10,max:1440,onChange:e=>{y(e),I(e)},disabled:!l}),(0,n.jsx)("span",{className:"muted small",children:e("exec.maxRunMinutesUnit")})]}),(0,n.jsx)("p",{className:"why",children:e("exec.maxRunMinutesWhy")}),(0,n.jsx)("label",{htmlFor:"reply-timeout",children:e("exec.replyTimeout")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)(x,{id:"reply-timeout",value:g,min:60,max:10800,onChange:e=>{w(e),H(e)},disabled:!l}),(0,n.jsx)("span",{className:"muted small",children:e("exec.replyTimeoutUnit")})]}),(0,n.jsx)("p",{className:"why",children:e("exec.replyTimeoutWhy")}),(0,n.jsx)("label",{htmlFor:"isolation",children:e("exec.isolation")}),(0,n.jsxs)("select",{id:"isolation",value:b,onChange:e=>{let l=e.target.value;N(l),P("isolation",l)},disabled:!l,children:[(0,n.jsx)("option",{value:"none",children:e("exec.isolationNone")}),(0,n.jsx)("option",{value:"none-accepted",children:e("exec.isolationNoneAccepted")}),(0,n.jsx)("option",{value:"separate-account",children:e("exec.isolationAccount")}),(0,n.jsx)("option",{value:"sandbox",children:e("exec.isolationSandbox")}),(0,n.jsx)("option",{value:"vm",children:e("exec.isolationVm")})]}),(0,n.jsx)("p",{className:"why",children:e("exec.isolationWhy")}),(0,n.jsx)("label",{htmlFor:"start-mode",children:e("exec.startMode")}),(0,n.jsxs)("select",{id:"start-mode",value:k,onChange:e=>{let l=e.target.value;S(l),P("mode",l)},disabled:!l,children:[(0,n.jsx)("option",{value:"confirm",children:e("exec.startModeAsk")}),(0,n.jsx)("option",{value:"unattended",children:e("exec.startModeAuto")})]}),(0,n.jsx)("p",{className:"why",children:e("exec.startModeWhy")}),(0,n.jsx)("label",{htmlFor:"network-fetch",children:e("exec.networkFetch")}),(0,n.jsxs)("select",{id:"network-fetch",value:F,onChange:e=>{let l=e.target.value;C(l),P("networkFetch",l)},disabled:!l,children:[(0,n.jsx)("option",{value:"ask",children:e("exec.networkFetchAsk")}),(0,n.jsx)("option",{value:"refuse",children:e("exec.networkFetchRefuse")}),(0,n.jsx)("option",{value:"run",children:e("exec.networkFetchRun")})]}),(0,n.jsx)(j,{msg:R}),(0,n.jsx)("p",{className:"why",children:e("exec.networkFetchWhy")})]})}function g(){let{t:e}=(0,c.kj)(),[l,t]=(0,s.useState)(""),[a,r]=(0,s.useState)(!1),[i,d]=(0,s.useState)(""),[m,u]=(0,s.useState)(""),h=async()=>{r(!0),u(""),d(e("login.waiting"));try{let e=await o.FH.login(l);e.ok?d(e.message):(d(""),u(e.message))}catch(e){d(""),u(e.message)}finally{r(!1)}};return(0,n.jsxs)("div",{className:"panel",id:"login",children:[(0,n.jsx)("h2",{children:e("login.title")}),(0,n.jsx)("p",{className:"muted small",children:e("login.intro")}),m&&(0,n.jsx)("div",{className:"err",children:m}),(0,n.jsx)("label",{htmlFor:"login-account",children:e("login.account")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("input",{id:"login-account",type:"email",className:"grow",value:l,onChange:e=>t(e.target.value),placeholder:"name@company.com",disabled:a}),(0,n.jsx)("button",{className:"primary",onClick:()=>void h(),disabled:a,children:a?e("login.busy"):e("login.button")})]}),(0,n.jsx)("p",{className:"why",children:e("login.accountWhy")}),i&&(0,n.jsx)("div",{className:"small",role:"status",children:i})]})}function w(e){var l;let{catalogue:t,setCatalogue:a,refreshModels:r,refreshing:i,refreshMsg:d}=e,{t:u}=(0,c.kj)(),h=(0,c.W3)(),[x,p]=(0,s.useState)(""),[v,f]=(0,s.useState)(""),[y,g]=(0,s.useState)(!1),w=null!=(l=null==t?void 0:t.defaultModel)?l:"",b=async e=>{g(!0),p("");try{let l=await o.FH.setDefaultModel(e);t&&a({...t,defaultModel:l.defaultModel}),p(l.defaultModel?u("def.modelSaved",{name:l.defaultModel}):u("def.modelCleared")),f("")}catch(e){f(e.message)}finally{g(!1)}};return(0,n.jsxs)("div",{className:"panel",id:"model",children:[(0,n.jsx)("h2",{children:u("def.modelTitle")}),(0,n.jsx)("p",{className:"muted small",children:u("def.modelIntro")}),v&&(0,n.jsx)("div",{className:"err",children:v}),(0,n.jsx)("label",{htmlFor:"default-model",children:u("def.modelField")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)(m.Y,{id:"default-model",chosen:w,onChange:e=>void b(e),none:u("def.modelNone"),catalogue:t,disabled:y||i}),(0,n.jsx)("button",{className:"quiet",onClick:()=>void b(""),disabled:y||!w,children:u("proj.clear")}),(0,n.jsx)("button",{onClick:()=>void r(),disabled:y||i,children:u("model.refresh")})]}),(0,n.jsx)(j,{msg:x||d}),(0,n.jsx)("p",{className:"muted small",style:{marginTop:8},children:(null==t?void 0:t.readAt)?u("model.readAt",{t:h(t.readAt),n:t.options.length}):u("model.neverRead")}),(0,n.jsx)("h3",{children:u("proj.affects")}),(0,n.jsxs)("ul",{className:"muted small",style:{margin:0,paddingLeft:20},children:[(0,n.jsx)("li",{children:u("def.modelAffectsNew")}),(0,n.jsx)("li",{children:u("def.modelAffectsExisting")}),(0,n.jsx)("li",{children:u("def.modelAffectsBatch")})]})]})}function b(e){var l,t;let{catalogue:a,setCatalogue:r,refreshModels:d,refreshing:u,refreshMsg:h}=e,{t:x}=(0,c.kj)(),[p,v]=(0,s.useState)(""),[f,y]=(0,s.useState)(""),[g,w]=(0,s.useState)(!1),b=null!=(l=null==a?void 0:a.defaultReviewModel)?l:"",N=async e=>{w(!0),v("");try{let l=await o.FH.setDefaultReviewModel(e);a&&r({...a,defaultReviewModel:l.defaultReviewModel}),v(l.defaultReviewModel?x("def.reviewSaved",{name:l.defaultReviewModel}):x("def.reviewCleared")),y("")}catch(e){y(e.message)}finally{w(!1)}},k=""!==b&&b===(null!=(t=null==a?void 0:a.defaultModel)?t:"");return(0,n.jsxs)("div",{className:"panel",id:"review",children:[(0,n.jsx)("h2",{children:x("def.reviewTitle")}),(0,n.jsx)("p",{className:"muted small",children:x("def.reviewIntro")}),f&&(0,n.jsx)("div",{className:"err",children:f}),(0,n.jsx)("label",{htmlFor:"default-review-model",children:x("def.reviewField")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)(m.Y,{id:"default-review-model",chosen:b,onChange:e=>void N(e),none:x("def.reviewNone"),catalogue:a,disabled:g||u}),(0,n.jsx)("button",{className:"quiet",onClick:()=>void N(""),disabled:g||!b,children:x("proj.clear")}),(0,n.jsx)("button",{onClick:()=>void d(),disabled:g||u,children:x("model.refresh")})]}),k&&(0,n.jsx)("p",{className:"why",style:{color:"var(--warn)"},children:x("def.reviewSame")}),(0,n.jsx)(j,{msg:p||h}),(0,n.jsx)("h3",{children:x("proj.affects")}),(0,n.jsxs)("ul",{className:"muted small",style:{margin:0,paddingLeft:20},children:[(0,n.jsx)("li",{children:x("def.reviewAffectsNew")}),(0,n.jsx)("li",{children:x("def.reviewAffectsExisting")}),(0,n.jsx)("li",{children:x("def.reviewAffectsBatch")})]}),(0,n.jsxs)("div",{className:"row",style:{marginTop:12},children:[(0,n.jsx)(i(),{href:"/",className:"button-link plain",children:x("proj.toSessions")}),(0,n.jsx)(i(),{href:"/import",className:"button-link quiet",children:x("proj.toImport")})]})]})}},4784:(e,l,t)=>{"use strict";t.d(l,{Y:()=>i});var n=t(3365),s=t(1521),a=t(5549),r=t(867);function i(e){var l,t;let{id:i,chosen:o,onChange:c,none:d,catalogue:m,disabled:u=!1,style:h}=e,{t:x}=(0,r.kj)(),p=function(e){let[l,t]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(void 0!==e)return;let l=!0;return a.FH.models().then(e=>{l&&t(e)}).catch(()=>void 0),()=>{l=!1}},[e]),void 0!==e?e:l}(m),j=null!=(l=null==p?void 0:p.options)?l:[],v=j.some(e=>e.name===o),f=j.filter(e=>!e.group),y=new Map;for(let e of j)e.group&&y.set(e.group,[...null!=(t=y.get(e.group))?t:[],e]);return(0,n.jsxs)("select",{id:i,value:o,onChange:e=>c(e.target.value),disabled:u,style:{width:"auto",minWidth:280,...h},children:[(0,n.jsx)("option",{value:"",children:d}),o&&!v&&(0,n.jsx)("option",{value:o,children:x("model.notInList",{name:o})}),f.map(e=>(0,n.jsxs)("option",{value:e.name,disabled:e.disabled,children:[e.name,e.disabled?" — ".concat(x("model.unavailable")):""]},e.name)),[...y.entries()].map(e=>{let[l,t]=e;return(0,n.jsx)("optgroup",{label:l,children:t.map(e=>(0,n.jsxs)("option",{value:e.name,disabled:e.disabled,children:[e.name,e.disabled?" — ".concat(x("model.unavailable")):""]},e.name))},l)})]})}},4969:(e,l,t)=>{"use strict";t.d(l,{V:()=>a});var n=t(1521);let s='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function a(e,l,t){(0,n.useEffect)(()=>{var n,a;if(!l)return;let r=document.activeElement instanceof HTMLElement?document.activeElement:null,i=e.current,o=null!=(a=null!=(n=null==t?void 0:t.current)?n:null==i?void 0:i.querySelector(s))?a:null;null==o||o.focus();let c=e=>{if("Tab"!==e.key||!i)return;let l=Array.from(i.querySelectorAll(s)).filter(e=>null!==e.offsetParent);if(0===l.length)return;let t=l[0],n=l[l.length-1],a=i.contains(document.activeElement);e.shiftKey&&(document.activeElement===t||!a)?(e.preventDefault(),n.focus()):e.shiftKey||document.activeElement!==n&&a||(e.preventDefault(),t.focus())};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c),r&&document.contains(r)&&r.focus()}},[e,l,t])}}},e=>{e.O(0,[197,867,549,347,131,358],()=>e(e.s=1896)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{1035:(e,t,n)=>{"use strict";n.d(t,{DialogHost:()=>o,Z:()=>c});var l=n(3365),a=n(1521),s=n(867),i=n(4969);let r=null,d=[];function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(n=>{var l;return l={kind:"confirm",message:e,...t,resolve:n},void(r?r(l):d.push(l))})}function o(e){var t,n;let{children:c}=e,{t:o}=(0,s.kj)(),[h,m]=(0,a.useState)([]),u=(0,a.useRef)(null),p=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(r=e=>m(t=>[...t,e]),d.length>0){let e=d.splice(0,d.length);m(t=>[...t,...e])}return()=>{r=null}},[]);let g=h[0],x=(0,a.useCallback)(e=>{g&&(g.resolve(e),m(e=>e.slice(1)))},[g]);return(0,i.V)(p,!!g,u),(0,a.useEffect)(()=>{if(!g)return;let e=e=>{"Escape"===e.key&&(e.preventDefault(),x(!1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[g,x]),(0,l.jsxs)(l.Fragment,{children:[c,g&&(0,l.jsx)("div",{className:"modal-backdrop",onClick:()=>x(!1),role:"presentation",children:(0,l.jsxs)("div",{ref:p,className:"modal".concat(g.danger?" danger":""),role:"confirm"===g.kind?"alertdialog":"dialog","aria-modal":"true","aria-labelledby":"modal-title","aria-describedby":"modal-body",onClick:e=>e.stopPropagation(),children:[(0,l.jsx)("h2",{id:"modal-title",children:null!=(t=g.title)?t:o("confirm"===g.kind?"dialog.confirmTitle":"dialog.noticeTitle")}),(0,l.jsx)("div",{id:"modal-body",className:"modal-body",children:g.message}),(0,l.jsxs)("div",{className:"row modal-actions",children:["confirm"===g.kind&&(0,l.jsx)("button",{type:"button",className:"quiet",onClick:()=>x(!1),children:o("dialog.cancel")}),(0,l.jsx)("button",{ref:u,type:"button",className:g.danger?"danger":"primary",onClick:()=>x(!0),children:null!=(n=g.okLabel)?n:o("dialog.ok")})]})]})})]})}},2114:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var l=n(3365),a=n(1521),s=n(8197),i=n.n(s),r=n(5549),d=n(7527),c=n(867),o=n(1035),h=n(4811),m=n(8848);function u(){let{t:e}=(0,c.kj)(),t=(0,c.W3)(),[n,s]=(0,a.useState)(null),[h,m]=(0,a.useState)(null),[u,g]=(0,a.useState)([]),[x,b]=(0,a.useState)([]),[j,f]=(0,a.useState)([]),[v,y]=(0,a.useState)("stop"),[w,N]=(0,a.useState)(!1),[k,S]=(0,a.useState)(""),[C,F]=(0,a.useState)(""),[E,H]=(0,a.useState)(""),[T,D]=(0,a.useState)(null),[W,I]=(0,a.useState)(!1),R=(0,a.useCallback)(async()=>{try{let[e,t,n]=await Promise.all([r.FH.sessions(),r.FH.batch().catch(()=>null),r.FH.approvals().catch(()=>[])]);s(e),m(t),g(n),b(t=>t.filter(t=>e.some(e=>e.id===t))),D(!0),I(!1),H("")}catch(e){I(!(0,r.AV)()),D(!1),H(e.message)}},[]);(0,d.z)(R,3e3),(0,a.useEffect)(()=>{var e;let t=new URLSearchParams(window.location.search),n=(null!=(e=t.get("run"))?e:"").split(",").map(e=>e.trim()).filter(Boolean);0!==n.length&&(b(n),y("continue"===t.get("fail")?"continue":"stop"),N(!0),window.history.replaceState(null,"",window.location.pathname))},[]);let[U,O]=(0,a.useState)(!1),P=(0,a.useRef)(!1),q=async()=>{if(!P.current){P.current=!0,O(!0);try{let e=await r.FH.createSession(k||"session");S(""),window.location.href=(0,r.aT)(e.id)}catch(e){H(e.message),P.current=!1,O(!1)}}},L=async t=>{if(t.running)return void F(e("home.deleteRunning"));if(await (0,o.Z)(e("home.deleteConfirm",{name:t.name,n:t.tasks.length})))try{await r.FH.deleteSession(t.id),F(e("home.deleted",{name:t.name})),b(e=>e.filter(e=>e!==t.id)),await R()}catch(e){F(e.message)}},M=async()=>{let t=(null!=n?n:[]).filter(e=>j.includes(e.id)&&!e.running);if(0===t.length)return;let l=t.map(e=>"• ".concat(e.name," (").concat(e.tasks.length,")")).join("\n");if(!await (0,o.Z)(e("home.deleteSelectedConfirm",{n:t.length,names:l})))return;let a=0,s=[];for(let e of t)try{await r.FH.deleteSession(e.id),a+=1}catch(t){s.push("".concat(e.name,": ").concat(t.message))}F(0===s.length?e("home.deletedMany",{n:a}):e("home.deleteSomeFailed",{n:a,m:s.length,why:s.join("; ")})),b(e=>e.filter(e=>!t.some(t=>t.id===e))),f([]),await R()},A=async t=>{let l=(null!=n?n:[]).filter(e=>j.includes(e.id)&&!e.running);if(0===l.length)return;let a=[];for(let e of l)try{await r.FH.updateSession(e.id,{active:t})}catch(t){a.push("".concat(e.name,": ").concat(t.message))}F(0===a.length?e(t?"home.madeActive":"home.madeInactive",{n:l.length}):e("home.statusSomeFailed",{n:l.length-a.length,m:a.length,why:a.join("; ")})),t||b(e=>e.filter(e=>!l.some(t=>t.id===e))),f([]),await R()},B=t=>{if(t.running)return{label:e("state.running"),badge:"running"};let n=t.tasks.some(e=>"queued"===e.status||"running"===e.status);if("idle"!==t.status||n||0===t.tasks.length)return{label:e("state.".concat(t.status)),badge:""};let l=t.tasks.filter(e=>"done"!==e.status).length;return 0===l?{label:e("state.completed"),badge:"done",title:e("state.completedTitle")}:{label:e("state.ended"),badge:"failed",title:e("state.endedTitle",{n:l})}},_=async e=>{if(!n)return;let t=new Map(n.map(e=>[e.id,e]));s(e.map(e=>t.get(e)).filter(e=>!!e));try{s(await r.FH.reorderSessions(e)),H("")}catch(e){H(e.message),R()}},K=(e,t)=>{let l=(null!=n?n:[]).map(e=>e.id),a=l.indexOf(e),s=a+t;a<0||s<0||s>=l.length||([l[a],l[s]]=[l[s],l[a]],_(l))},[Z,z]=(0,a.useState)(null),[V,Q]=(0,a.useState)(null),G=(null!=n?n:[]).filter(e=>!e.running),J=G.filter(e=>j.includes(e.id));return(0,l.jsxs)(l.Fragment,{children:[W&&(0,l.jsxs)("div",{className:"panel",children:[(0,l.jsx)("strong",{children:e("home.noToken")}),(0,l.jsx)("div",{className:"muted small",children:e("home.noTokenHint",{cmd:"npm start"})})]}),!1===T&&!W&&(0,l.jsxs)("div",{className:"panel",children:[(0,l.jsx)("strong",{children:e("home.apiDown")}),(0,l.jsx)("div",{className:"muted small",children:e("home.apiHint",{cmd:"npm start",url:"/api"})}),E&&(0,l.jsx)("div",{className:"err",children:E})]}),(0,l.jsxs)("div",{className:"panel",id:"new-session",children:[(0,l.jsx)("h2",{children:e("home.new")}),(0,l.jsx)("p",{className:"muted small",children:e("home.newHint")}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("input",{type:"text",className:"grow","aria-label":e("home.col.name"),placeholder:e("home.namePlaceholder"),value:k,onChange:e=>S(e.target.value),onKeyDown:e=>{"Enter"===e.key&&q()}}),(0,l.jsx)("button",{className:"primary",onClick:()=>void q(),disabled:U||!1===T,children:e("home.create")})]})]}),n&&n.length>0&&(0,l.jsx)(p,{sessions:n,selected:x,setSelected:b,onFailure:v,setOnFailure:y,fromPlan:w,batch:h,approvals:u,onChange:R,move:(e,t)=>{b(n=>{let l=n.indexOf(e),a=l+t;if(l<0||a<0||a>=n.length)return n;let s=[...n];return[s[l],s[a]]=[s[a],s[l]],s})}}),(0,l.jsxs)("div",{className:"panel",children:[(0,l.jsx)("h2",{children:e("home.sessions")}),null===n&&(0,l.jsx)("div",{className:"muted",children:e("home.loading")}),n&&0===n.length&&(0,l.jsx)("div",{className:"muted",children:e("home.none")}),n&&n.length>0&&(0,l.jsxs)("div",{className:"row",style:{marginBottom:10},children:[(0,l.jsx)("strong",{className:"small",children:e("home.managed",{n:J.length})}),(0,l.jsx)("button",{onClick:()=>void A(!0),disabled:0===J.length,children:e("home.makeActive")}),(0,l.jsx)("button",{onClick:()=>void A(!1),disabled:0===J.length,children:e("home.makeInactive")}),(0,l.jsx)("button",{className:"danger",onClick:()=>void M(),disabled:0===J.length,children:e("home.deleteSelected",{n:J.length})}),(0,l.jsx)("span",{className:"muted small",children:e("home.tickForBoth")})]}),n&&n.length>0&&(0,l.jsx)("p",{className:"muted small",children:e("home.deleteWhy")}),n&&n.length>1&&(0,l.jsx)("p",{className:"muted small",children:e("home.orderWhy")}),C&&(0,l.jsx)("div",{className:"muted small",role:"status",children:C}),n&&n.length>0&&(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:(0,l.jsx)("input",{type:"checkbox","aria-label":e("home.manageAll"),title:e("home.manageAll"),checked:G.length>0&&G.every(e=>j.includes(e.id)),onChange:e=>f(e.target.checked?G.map(e=>e.id):[]),disabled:0===G.length})}),(0,l.jsx)("th",{children:(0,l.jsx)("input",{type:"checkbox","aria-label":e("home.selectAll"),checked:n.length>0&&x.length===n.filter(e=>!1!==e.active).length,onChange:e=>b(e.target.checked?n.filter(e=>!1!==e.active).map(e=>e.id):[]),disabled:(null==h?void 0:h.running)===!0})}),(0,l.jsx)("th",{children:e("home.col.order")}),(0,l.jsx)("th",{children:e("home.col.name")}),(0,l.jsx)("th",{children:e("home.col.tasks")}),(0,l.jsx)("th",{children:e("home.col.state")}),(0,l.jsx)("th",{children:e("home.col.chat")}),(0,l.jsx)("th",{children:e("home.col.created")}),(0,l.jsx)("th",{children:(0,l.jsx)("span",{className:"visually-hidden",children:e("home.col.remove")})})]})}),(0,l.jsx)("tbody",{children:n.map((a,s)=>{let d=a.tasks.filter(e=>"done"===e.status).length,c=a.tasks.filter(e=>"queued"===e.status).length,o=[!1===a.active?"inactive":"",Z===a.id?"dragging":"",V===a.id&&Z!==a.id?"drop-target":""].filter(Boolean).join(" ");return(0,l.jsxs)("tr",{className:o||void 0,draggable:!0,onDragStart:e=>{e.dataTransfer.setData("text/plain",a.id),e.dataTransfer.effectAllowed="move",z(a.id)},onDragOver:e=>{Z&&(e.preventDefault(),e.dataTransfer.dropEffect="move",V!==a.id&&Q(a.id))},onDrop:e=>{e.preventDefault();let t=e.dataTransfer.getData("text/plain")||Z;z(null),Q(null),t&&((e,t)=>{let l=(null!=n?n:[]).map(e=>e.id),a=l.indexOf(e),s=l.indexOf(t);a<0||s<0||a===s||(l.splice(a,1),l.splice(s,0,e),_(l))})(t,a.id)},onDragEnd:()=>{z(null),Q(null)},children:[(0,l.jsx)("td",{children:(0,l.jsx)("input",{type:"checkbox",checked:j.includes(a.id),onChange:()=>f(e=>e.includes(a.id)?e.filter(e=>e!==a.id):[...e,a.id]),disabled:!!a.running,"aria-label":e("home.manageRow",{name:a.name}),title:a.running?e("home.manageRunning"):e("home.manageRow",{name:a.name})})}),(0,l.jsx)("td",{children:(0,l.jsx)("input",{type:"checkbox",checked:x.includes(a.id),onChange:()=>{var e;return e=a.id,void b(t=>{if(t.includes(e))return t.filter(t=>t!==e);let l=(null!=n?n:[]).map(e=>e.id);return[...t,e].sort((e,t)=>l.indexOf(e)-l.indexOf(t))})},disabled:(null==h?void 0:h.running)===!0||!1===a.active,"aria-label":a.name,title:!1===a.active?e("home.inactiveWhy"):void 0})}),(0,l.jsxs)("td",{className:"order-cell",children:[(0,l.jsx)("span",{className:"drag-handle","aria-hidden":"true",title:e("home.dragHint"),children:"⠿"}),(0,l.jsx)("button",{className:"quiet small",onClick:()=>K(a.id,-1),disabled:0===s,"aria-label":e("home.moveUp",{name:a.name}),title:e("home.moveUp",{name:a.name}),children:"↑"}),(0,l.jsx)("button",{className:"quiet small",onClick:()=>K(a.id,1),disabled:s===n.length-1,"aria-label":e("home.moveDown",{name:a.name}),title:e("home.moveDown",{name:a.name}),children:"↓"})]}),(0,l.jsx)("td",{children:(0,l.jsx)(i(),{href:(0,r.aT)(a.id),children:a.name})}),(0,l.jsxs)("td",{children:[a.tasks.length," ",(0,l.jsx)("span",{className:"muted small",children:e("home.tasksDetail",{done:d,queued:c})})]}),(0,l.jsxs)("td",{children:[(0,l.jsx)("span",{className:"badge ".concat(B(a).badge),title:B(a).title,children:B(a).label})," ",(0,l.jsx)("span",{className:"chip".concat(!1===a.active?" inactive":""),title:e(!1===a.active?"home.inactiveWhy":"home.activeWhy"),children:e(!1===a.active?"home.statusInactive":"home.statusActive")})]}),(0,l.jsx)("td",{children:a.chat?(0,l.jsx)("a",{href:a.chat.url,target:"_blank",rel:"noreferrer",children:a.chat.name}):(0,l.jsx)("span",{className:"muted",children:e("home.notOpened")})}),(0,l.jsx)("td",{className:"muted small",children:t(a.createdAt)}),(0,l.jsx)("td",{children:(0,l.jsx)("button",{className:"quiet",onClick:()=>void L(a),disabled:!!a.running,title:e("home.delete"),children:e("home.delete")})})]},a.id)})})]})]})]})}function p(e){var t,n,s,d,u,p,g;let{sessions:x,selected:b,setSelected:j,onFailure:f,setOnFailure:v,fromPlan:y,batch:w,approvals:N,onChange:k,move:S}=e,{t:C}=(0,c.kj)(),[F,E]=(0,a.useState)(""),[H,T]=(0,a.useState)(""),[D,W]=(0,a.useState)(""),[I,R]=(0,a.useState)(""),[U,O]=(0,a.useState)(""),[P,q]=(0,a.useState)(null),[L,M]=(0,a.useState)([]);(0,a.useEffect)(()=>{r.FH.models().then(e=>{q(e),W(t=>t||e.defaultModel),R(t=>t||e.defaultReviewModel)}).catch(()=>void 0)},[]);let A=b.join(",");(0,a.useEffect)(()=>{let e=!1,t=A.split(",").filter(Boolean);if(0===t.length)return void M([]);let n=async()=>{let n=await Promise.all(t.map(async e=>{let t=await r.FH.vcsStatus(e).catch(()=>null);return{id:e,status:t}}));e||M(n.filter(e=>e.status&&!e.status.ok&&"off"!==e.status.problem).map(e=>{var t,n,l,a;return{name:null!=(l=null==(t=x.find(t=>t.id===e.id))?void 0:t.name)?l:e.id,problem:null!=(a=null==(n=e.status)?void 0:n.problem)?a:""}}))};n();let l=setInterval(()=>void n(),1e4);return()=>{e=!0,clearInterval(l)}},[A]);let B=new Map(x.map(e=>[e.id,e])),_=e=>e.tasks.filter(e=>"queued"===e.status).length,K=b.map(e=>B.get(e)).filter(e=>!!e),Z=K.filter(e=>_(e)>0&&!1!==e.active),z=Z.reduce((e,t)=>e+_(t),0),V=(null==w?void 0:w.running)===!0,Q=x.some(e=>e.running),G=V||0===Z.length||Q,J=Q?{title:"batch.oneRunning",why:"batch.oneRunningWhy"}:0===K.length?{title:"batch.pickFirst",why:"batch.pickFirstWhy"}:0===Z.length?{title:"batch.nothingRunnable",why:"batch.nothingRunnableWhy"}:null,X=(0,h.p)(),[Y,$]=(0,a.useState)(!1),ee=(0,a.useRef)(!1),et=async e=>{if(!ee.current){ee.current=!0,$(!0);try{await e()}catch(e){T(e.message)}finally{ee.current=!1,$(!1),k()}}},en=async e=>{("unattended"!==e||X||await (0,o.Z)(C("batch.unattendedConfirm",{n:Z.length})))&&await et(async()=>{var t;let n=await r.FH.startBatch(Z.map(e=>e.id),e,f,D||void 0,I||void 0,U.trim()||Z.map(e=>e.planName).find(Boolean)||void 0);E(""),T(n.started?"":null!=(t=n.reason)?t:"")})},el=K.filter(e=>{var t;return(null!=(t=e.model)?t:"")!==D}).length,ea=K.filter(e=>{var t;return(null==(t=e.review)?void 0:t.enabled)===!1}).length,es=null!=(s=null==P?void 0:P.options)?s:[],ei=es.filter(e=>!e.group),er=new Map;for(let e of es)e.group&&er.set(e.group,[...null!=(d=er.get(e.group))?d:[],e]);let ed=w?{done:w.sessions.filter(e=>"done"===e.state).length,failed:w.sessions.filter(e=>"failed"===e.state).length,skipped:w.sessions.filter(e=>"skipped"===e.state||"stopped"===e.state).length}:null,ec=null==w?void 0:w.sessions.find(e=>"running"===e.state);return(0,l.jsxs)("div",{className:"panel",children:[(0,l.jsx)("h2",{children:C("batch.title")}),(0,l.jsx)("p",{className:"muted small",children:C("batch.hint")}),!V&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("strong",{className:"small",children:C("batch.selected",{n:Z.length,tasks:z})}),(0,l.jsx)("button",{className:"quiet",onClick:()=>j(x.filter(e=>_(e)>0).map(e=>e.id)),children:C("batch.selectQueued")}),(0,l.jsx)("button",{className:"quiet",onClick:()=>j([]),disabled:0===K.length,children:C("batch.selectNone")})]}),y&&(0,l.jsx)("p",{className:"muted small",children:C("batch.fromPlan")}),K.length>Z.length&&(0,l.jsx)("p",{className:"muted small",children:C("batch.notRunnable",{n:K.length-Z.length})}),Z.length>0&&(0,l.jsx)("ol",{className:"run-order",children:Z.map((e,t)=>(0,l.jsxs)("li",{children:[(0,l.jsxs)("span",{children:[e.name," ",(0,l.jsxs)("span",{className:"muted small",children:["(",_(e),")"]})]}),(0,l.jsxs)("span",{children:[(0,l.jsx)("button",{className:"quiet",onClick:()=>S(e.id,-1),disabled:0===t,"aria-label":C("batch.moveUp",{name:e.name}),children:"↑"}),(0,l.jsx)("button",{className:"quiet",onClick:()=>S(e.id,1),disabled:t===Z.length-1,"aria-label":C("batch.moveDown",{name:e.name}),children:"↓"})]})]},e.id))}),(0,l.jsx)("label",{htmlFor:"batch-run-name",children:C("batch.runName")}),(0,l.jsx)("input",{id:"batch-run-name",type:"text",value:U,onChange:e=>O(e.target.value),placeholder:null!=(u=Z.map(e=>e.planName).find(Boolean))?u:C("batch.runNamePlaceholder")}),(0,l.jsx)("p",{className:"why",children:C("batch.runNameWhy")}),(0,l.jsx)("label",{htmlFor:"batch-model",children:C("batch.model")}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("select",{id:"batch-model",value:D,onChange:e=>W(e.target.value),style:{width:"auto",minWidth:260},children:[(0,l.jsx)("option",{value:"",children:C("batch.modelKeep")}),ei.map(e=>(0,l.jsx)("option",{value:e.name,disabled:e.disabled,children:e.name},e.name)),[...er.entries()].map(e=>{let[t,n]=e;return(0,l.jsx)("optgroup",{label:t,children:n.map(e=>(0,l.jsx)("option",{value:e.name,disabled:e.disabled,children:e.name},e.name))},t)})]}),(null!=(p=null==P?void 0:P.options.length)?p:0)===0&&(0,l.jsx)("span",{className:"muted small",children:C("batch.modelNone")})]}),(0,l.jsx)("p",{className:"why",children:C("batch.modelWhy")}),(0,l.jsx)(m.L,{current:D,onUse:e=>W(e)}),D&&el>0&&(0,l.jsx)("p",{className:"why",style:{color:"var(--warn)"},children:C("batch.modelOverrides",{n:el})}),(0,l.jsx)("label",{htmlFor:"batch-review-model",children:C("batch.reviewModel")}),(0,l.jsx)("div",{className:"row",children:(0,l.jsxs)("select",{id:"batch-review-model",value:I,onChange:e=>R(e.target.value),style:{width:"auto",minWidth:260},children:[(0,l.jsx)("option",{value:"",children:C("batch.reviewModelKeep")}),ei.map(e=>(0,l.jsx)("option",{value:e.name,disabled:e.disabled,children:e.name},e.name)),[...er.entries()].map(e=>{let[t,n]=e;return(0,l.jsx)("optgroup",{label:t,children:n.map(e=>(0,l.jsx)("option",{value:e.name,disabled:e.disabled,children:e.name},e.name))},t)})]})}),(0,l.jsx)("p",{className:"why",children:C("batch.reviewModelWhy")}),""!==I&&I===D&&(0,l.jsx)("p",{className:"why",style:{color:"var(--warn)"},children:C("batch.reviewSame")}),ea>0&&(0,l.jsx)("p",{className:"why",children:C("batch.reviewOffIn",{n:ea})}),(0,l.jsxs)("fieldset",{style:{border:0,padding:0,margin:"10px 0 14px"},children:[(0,l.jsx)("legend",{className:"muted small",style:{padding:0},children:C("batch.onFailure")}),(0,l.jsxs)("div",{className:"option",children:[(0,l.jsxs)("label",{children:[(0,l.jsx)("input",{type:"radio",name:"batch-fail",checked:"stop"===f,onChange:()=>v("stop")}),(0,l.jsx)("span",{children:C("batch.chain")})]}),(0,l.jsx)("p",{className:"why",children:C("batch.chainWhy")})]}),(0,l.jsxs)("div",{className:"option",children:[(0,l.jsxs)("label",{children:[(0,l.jsx)("input",{type:"radio",name:"batch-fail",checked:"continue"===f,onChange:()=>v("continue")}),(0,l.jsx)("span",{children:C("batch.independent")})]}),(0,l.jsx)("p",{className:"why",children:C("batch.independentWhy")})]})]}),J&&(0,l.jsxs)("div",{className:"notice caution",children:[(0,l.jsx)("strong",{children:C(J.title)}),(0,l.jsx)("div",{className:"small",style:{marginTop:4},children:C(J.why)})]}),L.length>0&&(0,l.jsxs)("div",{className:"notice caution",children:[(0,l.jsx)("strong",{children:C("batch.vcsProblem")}),(0,l.jsx)("ul",{children:L.map(e=>(0,l.jsx)("li",{children:C("batch.vcsProblemRow",{name:e.name,problem:e.problem})},e.name))}),(0,l.jsx)("div",{className:"muted small",children:C("batch.vcsProblemWhy")})]}),H&&(0,l.jsxs)("div",{className:"notice caution",role:"alert",children:[(0,l.jsx)("strong",{children:C("batch.notStartedTitle")}),(0,l.jsx)("div",{className:"small",style:{marginTop:4},children:H}),/execution\.isolation/.test(H)&&(0,l.jsx)("div",{className:"small",style:{marginTop:4},children:(0,l.jsx)(i(),{href:"/defaults",children:C("batch.notStartedIsolation")})})]}),(0,l.jsxs)("div",{className:"run-choice",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("button",{className:"primary",onClick:()=>void en("unattended"),disabled:Y||G,children:C("batch.run",{n:Z.length})}),(0,l.jsx)("p",{className:"why",children:C("batch.runWhy")})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("button",{onClick:()=>void en("confirm"),disabled:Y||G,children:C("batch.runStep")}),(0,l.jsx)("p",{className:"why",children:C("batch.runStepWhy")})]})]})]}),V&&(0,l.jsxs)("div",{className:"row",children:[(null==w?void 0:w.pausing)?(0,l.jsx)("button",{className:"primary",onClick:()=>void et(async()=>{await r.FH.resumeBatch(),E("")}),disabled:Y||(null==w?void 0:w.stopping),title:C("batch.resumeWhy"),children:C("batch.resume")}):(0,l.jsx)("button",{onClick:()=>void et(async()=>{await r.FH.pauseBatch(),E(C("batch.pausing"))}),disabled:Y||(null==w?void 0:w.stopping),title:C("batch.pauseWhy"),children:C("batch.pause")}),(0,l.jsx)("button",{onClick:()=>void et(async()=>{await r.FH.stopBatch(),E(C("batch.stopping"))}),disabled:Y||(null==w?void 0:w.stopping),title:C("batch.stopWhy"),children:C("batch.stop")}),(null==w?void 0:w.pausing)&&!(null==w?void 0:w.stopping)&&(0,l.jsx)("span",{className:"muted small",children:C("batch.pausing")}),(0,l.jsx)("span",{className:"badge",children:C("batch.modelRunning",{name:(ec?(null==(t=B.get(ec.sessionId))?void 0:t.modelInUse)||(null==(n=B.get(ec.sessionId))?void 0:n.model):"")||C("model.default")})}),N.length>0&&(0,l.jsx)("span",{className:"badge waiting-approval",children:C("batch.waiting",{n:N.length})}),ec&&(0,l.jsx)("span",{className:"small",children:C("batch.progress",{name:ec.name,done:w.sessions.filter(e=>"waiting"!==e.state&&"running"!==e.state).length,total:w.sessions.length})})]}),V&&(0,l.jsx)("p",{className:"muted small",children:C("batch.hiddenWhileRunning")}),F&&(0,l.jsx)("div",{className:"muted small",role:"status",children:F}),(K.length>0||w)&&(0,l.jsxs)("div",{className:"row",style:{marginTop:12},children:[(0,l.jsx)("a",{className:"button-link",href:r.FH.debugExportUrl(K.length>0?K.map(e=>e.id):(null!=(g=null==w?void 0:w.sessions)?g:[]).map(e=>e.sessionId)),children:C("batch.debug")}),(0,l.jsx)("span",{className:"muted small",children:K.length>0?C("batch.debugSelected",{n:K.length}):C("batch.debugLast")})]}),(K.length>0||w)&&(0,l.jsx)("p",{className:"why",children:C("batch.debugWhy")}),w&&(0,l.jsxs)(l.Fragment,{children:[!V&&ed&&(0,l.jsx)("div",{className:"notice calm",style:{marginTop:12},children:(0,l.jsx)("strong",{children:C("batch.finished",ed)})}),(0,l.jsxs)("table",{style:{marginTop:10},children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:C("batch.col.session")}),(0,l.jsx)("th",{children:C("batch.col.state")}),(0,l.jsx)("th",{children:C("batch.col.ran")}),(0,l.jsx)("th",{children:C("batch.col.why")})]})}),(0,l.jsx)("tbody",{children:w.sessions.map(e=>{var t,n;return(0,l.jsxs)("tr",{className:"batch-row ".concat(e.state),children:[(0,l.jsx)("td",{children:(0,l.jsx)(i(),{href:(0,r.aT)(e.sessionId),children:e.name})}),(0,l.jsx)("td",{children:(0,l.jsx)("span",{className:"badge ".concat("running"===(n=e.state)?"running":"done"===n?"done":"failed"===n?"failed":"stopped"===n?"aborted":""),children:C("batch.state.".concat(e.state))})}),(0,l.jsx)("td",{className:"small",children:C("batch.ranOf",{ran:e.ran,failed:e.failed})}),(0,l.jsx)("td",{className:"muted small",children:null!=(t=e.reason)?t:""})]},e.sessionId)})})]})]})]})}},4811:(e,t,n)=>{"use strict";n.d(t,{p:()=>s});var l=n(1521),a=n(5549);function s(){let[e,t]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{let e=!0;return a.FH.settings().then(n=>{var l;let a=null!=(l=n.raw.execution)?l:{};e&&t("unattended"===a.mode)}).catch(()=>void 0),()=>{e=!1}},[]),e}},4969:(e,t,n)=>{"use strict";n.d(t,{V:()=>s});var l=n(1521);let a='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function s(e,t,n){(0,l.useEffect)(()=>{var l,s;if(!t)return;let i=document.activeElement instanceof HTMLElement?document.activeElement:null,r=e.current,d=null!=(s=null!=(l=null==n?void 0:n.current)?l:null==r?void 0:r.querySelector(a))?s:null;null==d||d.focus();let c=e=>{if("Tab"!==e.key||!r)return;let t=Array.from(r.querySelectorAll(a)).filter(e=>null!==e.offsetParent);if(0===t.length)return;let n=t[0],l=t[t.length-1],s=r.contains(document.activeElement);e.shiftKey&&(document.activeElement===n||!s)?(e.preventDefault(),l.focus()):e.shiftKey||document.activeElement!==l&&s||(e.preventDefault(),n.focus())};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c),i&&document.contains(i)&&i.focus()}},[e,t,n])}},5704:(e,t,n)=>{Promise.resolve().then(n.bind(n,2114))},7527:(e,t,n)=>{"use strict";n.d(t,{z:()=>a});var l=n(1521);function a(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=(0,l.useRef)(e);a.current=e,(0,l.useEffect)(()=>{let e;if(!n)return;let l=!1,s=async()=>{try{await a.current()}catch(e){}finally{l||(e=setTimeout(()=>void s(),t))}};return s(),()=>{l=!0,e&&clearTimeout(e)}},[t,n])}},8848:(e,t,n)=>{"use strict";n.d(t,{H4:()=>c,L:()=>o,z4:()=>h});var l=n(3365),a=n(8197),s=n.n(a),i=n(1521),r=n(5549),d=n(867);function c(e){let{current:t,onUse:n}=e,{t:a}=(0,d.kj)(),[s,c]=(0,i.useState)(null);if((0,i.useEffect)(()=>{let e=!1;return r.FH.project().then(t=>{e||c(t)}).catch(()=>void 0),()=>{e=!0}},[]),!s)return null;let o=s.rootDir.trim(),h=t.trim().toLowerCase(),m=n?s.others.filter(e=>e.rootDir.trim().toLowerCase()!==h):[];return(0,l.jsx)(u,{label:o?a("proj.defaultIs",{dir:o}):a("proj.noneShort"),offer:o&&n&&h!==o.toLowerCase()?{text:a("proj.useIt"),onUse:()=>n(o)}:void 0,more:m.map(e=>({text:a("proj.otherUse",{name:e.name}),title:e.rootDir,onUse:()=>null==n?void 0:n(e.rootDir)})),link:o?a("proj.change"):a("proj.setIt"),anchor:"project"})}function o(e){let{current:t,onUse:n}=e,a=m(),{t:s}=(0,d.kj)();if(!a)return null;let i=a.defaultModel.trim();return(0,l.jsx)(u,{label:i?s("def.modelDefaultIs",{name:i}):s("def.modelNoneShort"),offer:i&&n&&t.trim()!==i?{text:s("def.modelUseIt"),onUse:()=>n(i)}:void 0,link:s(i?"proj.change":"proj.setIt"),anchor:"model"})}function h(e){let{current:t,onUse:n}=e,a=m(),{t:s}=(0,d.kj)();if(!a)return null;let i=a.defaultReviewModel.trim();return(0,l.jsx)(u,{label:i?s("def.reviewDefaultIs",{name:i}):s("def.reviewNoneShort"),offer:i&&n&&t.trim()!==i?{text:s("def.modelUseIt"),onUse:()=>n(i)}:void 0,link:s(i?"proj.change":"proj.setIt"),anchor:"review"})}function m(){let[e,t]=(0,i.useState)(null);return(0,i.useEffect)(()=>{let e=!1;return r.FH.models().then(n=>{e||t(n)}).catch(()=>void 0),()=>{e=!0}},[]),e}function u(e){let{label:t,offer:n,more:a=[],link:i,anchor:r}=e;return(0,l.jsxs)("p",{className:"muted small",style:{marginTop:4},children:[t," ",n&&(0,l.jsxs)(l.Fragment,{children:["\xb7"," ",(0,l.jsx)("button",{type:"button",className:"linkish",onClick:n.onUse,children:n.text})," "]}),a.map(e=>(0,l.jsxs)("span",{children:["\xb7"," ",(0,l.jsx)("button",{type:"button",className:"linkish",onClick:e.onUse,title:e.title,children:e.text})," "]},e.text)),"\xb7 ",(0,l.jsx)(s(),{href:"/defaults#".concat(r),children:i})]})}}},e=>{e.O(0,[197,867,549,347,131,358],()=>e(e.s=5704)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[66],{1205:(e,s,n)=>{"use strict";n.d(s,{AppearanceProvider:()=>h,KP:()=>m,themeScript:()=>c});var a=n(3365),t=n(1521);let l=["small","normal","large","huge","giant"],i={theme:"light",textSize:"normal",highContrast:!1,reduceMotion:!1,underlineLinks:!1,strongFocus:!1},r="cop.appearance",c="\n(function () {\n try {\n var d = document.documentElement;\n var raw = localStorage.getItem('".concat(r,"');\n var a = raw ? JSON.parse(raw) : {};\n if (!a || typeof a !== 'object') a = {};\n d.dataset.theme = a.theme === 'dark' ? 'dark' : 'light';\n d.dataset.textsize = ").concat(JSON.stringify(l),".indexOf(a.textSize) >= 0 ? a.textSize : 'normal';\n d.dataset.contrast = a.highContrast ? 'high' : 'normal';\n d.dataset.motion = a.reduceMotion ? 'reduced' : 'normal';\n d.dataset.links = a.underlineLinks ? 'underline' : 'plain';\n d.dataset.focus = a.strongFocus ? 'strong' : 'normal';\n } catch (e) {}\n})();\n");function d(e){let s=document.documentElement;s.dataset.theme=e.theme,s.dataset.textsize=e.textSize,s.dataset.contrast=e.highContrast?"high":"normal",s.dataset.motion=e.reduceMotion?"reduced":"normal",s.dataset.links=e.underlineLinks?"underline":"plain",s.dataset.focus=e.strongFocus?"strong":"normal"}let o=(0,t.createContext)({appearance:i,set:()=>void 0,reset:()=>void 0,loaded:!1});function h(e){let{children:s}=e,[n,c]=(0,t.useState)(i),[h,m]=(0,t.useState)(!1);(0,t.useEffect)(()=>{let e=i;try{let s=window.localStorage.getItem(r);s?e=function(e){let s=e&&"object"==typeof e?e:{},n=(e,s)=>"boolean"==typeof e?e:s;return{theme:"dark"===s.theme?"dark":"light"===s.theme?"light":i.theme,textSize:l.includes(s.textSize)?s.textSize:i.textSize,highContrast:n(s.highContrast,i.highContrast),reduceMotion:n(s.reduceMotion,i.reduceMotion),underlineLinks:n(s.underlineLinks,i.underlineLinks),strongFocus:n(s.strongFocus,i.strongFocus)}}(JSON.parse(s)):window.matchMedia("(prefers-color-scheme: dark)").matches&&(e={...e,theme:"dark"}),window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!s&&(e={...e,reduceMotion:!0})}catch(e){}c(e),d(e),m(!0)},[]);let u=(0,t.useCallback)(e=>{c(s=>{let n={...s,...e};d(n);try{window.localStorage.setItem(r,JSON.stringify(n))}catch(e){}return n})},[]),p=(0,t.useCallback)(()=>{c(i),d(i);try{window.localStorage.removeItem(r)}catch(e){}},[]);return(0,a.jsx)(o.Provider,{value:{appearance:n,set:u,reset:p,loaded:h},children:s})}function m(){return(0,t.useContext)(o)}},1702:(e,s,n)=>{"use strict";var a=n(9962);n.o(a,"usePathname")&&n.d(s,{usePathname:function(){return a.usePathname}}),n.o(a,"useSearchParams")&&n.d(s,{useSearchParams:function(){return a.useSearchParams}})},1772:(e,s,n)=>{Promise.resolve().then(n.bind(n,2438))},2285:(e,s,n)=>{"use strict";n.d(s,{b:()=>r});var a=n(3365),t=n(1521),l=n(5549),i=n(867);function r(e){var s,n;let{dir:r}=e,{t:c}=(0,i.kj)(),d=(0,i.W3)(),[o,h]=(0,t.useState)(null),[m,u]=(0,t.useState)(""),[p,v]=(0,t.useState)(""),x=async()=>{u("");try{h(await l.FH.syncPlan(r))}catch(e){u(e.message)}},j=async(e,s)=>{try{await navigator.clipboard.writeText(s),v(e),window.setTimeout(()=>v(""),2500)}catch(e){u(c("plan.copyFailed"))}},g=e=>(0,a.jsxs)("ul",{style:{margin:"2px 0 6px",paddingLeft:20},children:[e.slice(0,30).map(e=>(0,a.jsx)("li",{children:(0,a.jsx)("code",{children:e})},e)),e.length>30&&(0,a.jsx)("li",{className:"muted",children:c("sync.more",{n:e.length-30})})]});return(0,a.jsxs)("div",{className:"sync-command small",style:{marginTop:8},children:[(0,a.jsx)("button",{type:"button",onClick:()=>void x(),children:c("sync.show")}),m&&(0,a.jsx)("p",{className:"err",children:m}),o&&!o.ok&&(0,a.jsx)("p",{className:"err",children:o.problem}),(null==o?void 0:o.ok)&&(0,a.jsxs)("div",{className:"notice caution",style:{marginTop:8},children:[(0,a.jsxs)("p",{children:[c("sync.what",{branch:null!=(s=o.branch)?s:"",target:null!=(n=o.target)?n:""})," ",(0,a.jsx)("span",{className:"muted",children:o.lastFetched?c("sync.fetchedAt",{when:d(o.lastFetched)}):c("sync.neverFetched")})]}),o.willLose.commits.length+o.willLose.changed.length+o.willLose.untracked.length===0?(0,a.jsx)("p",{children:c("sync.nothingLost")}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("strong",{children:c("sync.loses")}),o.willLose.commits.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{children:c("sync.commits",{n:o.willLose.commits.length})}),g(o.willLose.commits)]}),o.willLose.changed.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{children:c("sync.changed",{n:o.willLose.changed.length})}),g(o.willLose.changed)]}),o.willLose.untracked.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{children:c("sync.untracked",{n:o.willLose.untracked.length})}),g(o.willLose.untracked)]})]}),(0,a.jsx)("p",{className:"muted",children:c("sync.keeps")}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("button",{type:"button",onClick:()=>void j("preview",o.preview),children:c("sync.copyPreview")}),"preview"===p&&(0,a.jsx)("span",{className:"badge done",children:c("plan.copied")})]}),(0,a.jsx)("pre",{className:"sync-cmd",children:o.preview}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("button",{type:"button",className:"danger",onClick:()=>void j("command",o.command),children:c("sync.copyCommand")}),"command"===p&&(0,a.jsx)("span",{className:"badge done",children:c("plan.copied")})]}),(0,a.jsx)("pre",{className:"sync-cmd",children:o.command}),(0,a.jsx)("p",{className:"muted",children:c("sync.howToRun")})]})]})}},2438:(e,s,n)=>{"use strict";n.r(s),n.d(s,{default:()=>S});var a=n(3365),t=n(1521),l=n(1702),i=n(8197),r=n.n(i),c=n(5549),d=n(867),o=n(1910),h=n(3523),m=n(3374),u=n(1205),p=n(8848),v=n(4784),x=n(2876),j=n(5132),g=n(1035),y=n(8934),f=n(4811),b=n(3041),k=n(7527),N=n(1366),w=n(2285);function S(){return(0,a.jsx)(t.Suspense,{fallback:null,children:(0,a.jsx)(C,{})})}function C(){var e;let{t:s}=(0,d.kj)(),n=null!=(e=(0,l.useSearchParams)().get("id"))?e:"",[i,o]=(0,t.useState)(null),[h,m]=(0,t.useState)([]),[u,p]=(0,t.useState)([]),[v,x]=(0,t.useState)(null),[j,g]=(0,t.useState)(""),[y,f]=(0,t.useState)(!1),b=(0,t.useRef)(null),N=(0,t.useRef)(0),w=(0,t.useCallback)(async()=>{if(!n)return;let e=++N.current;try{let s=await c.FH.session(n);if(e!==N.current)return;o(s),g("")}catch(s){if(e!==N.current)return;g(s.message)}},[n]),S=(0,t.useCallback)(()=>{b.current||(b.current=window.setTimeout(()=>{b.current=null,w()},400))},[w]);if((0,t.useEffect)(()=>{if(!n)return;c.FH.presets().then(p).catch(()=>void 0),c.FH.level1().then(x).catch(()=>void 0);let e=new EventSource(c.FH.streamUrl(n));return e.onopen=()=>f(!1),e.onmessage=e=>{let s;try{s=JSON.parse(e.data)}catch(e){return}"ping"!==s.type&&(m(e=>[...e.slice(-400),s]),S())},e.onerror=()=>{e.readyState===EventSource.CLOSED&&f(!0)},()=>{e.close()}},[n,S]),(0,k.z)(w,8e3,!!n),!n)return(0,a.jsx)("div",{className:"panel err",children:s("session.noId")});if(j&&!i)return(0,a.jsx)("div",{className:"panel err",children:j});if(!i)return(0,a.jsx)("div",{className:"panel muted",children:s("home.loading")});let C=i.tasks.filter(e=>"queued"===e.status).length;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"crumbs",children:[(0,a.jsx)(r(),{href:"/",children:s("session.crumb")})," / ",i.name]}),j&&(0,a.jsx)("div",{className:"panel err",role:"alert",children:s("session.stale",{err:j})}),y&&!j&&(0,a.jsx)("div",{className:"panel muted small",role:"status",children:s("session.streamClosed")}),(0,a.jsx)(F,{session:i,queued:C,onChange:w}),(0,a.jsx)(U,{tasks:i.tasks}),(0,a.jsx)(T,{session:i,onChange:w}),(0,a.jsx)(L,{level1:v,sent:i.contractSent}),(0,a.jsx)(M,{session:i,onChange:w}),(0,a.jsx)(I,{session:i,onChange:w}),(0,a.jsxs)("div",{className:"panel",children:[(0,a.jsx)("h2",{children:s("tasks.title")}),(0,a.jsx)("p",{className:"muted small",children:s("tasks.hint")}),(0,a.jsx)(W,{session:i,onChange:w}),0===i.tasks.length&&(0,a.jsx)("div",{className:"muted",children:s("tasks.none")}),i.tasks.map((e,s)=>(0,a.jsx)(A,{session:i,task:e,index:s+1,presets:u,onChange:w},e.id))]}),(0,a.jsx)(R,{session:i}),(0,a.jsx)(B,{session:i,presets:u,onAdded:w,onPresetsChanged:()=>c.FH.presets().then(p)}),(0,a.jsx)(O,{events:h})]})}function F(e){var s;let{session:n,queued:l,onChange:i}=e,{t:r}=(0,d.kj)(),[o,h]=(0,t.useState)(""),[m,u]=(0,t.useState)("");(0,t.useEffect)(()=>{c.FH.models().then(e=>{var s;return u(null!=(s=e.defaultModel)?s:"")}).catch(()=>void 0)},[]);let[p,v]=(0,t.useState)(n.name),[x,j]=(0,t.useState)(null!=(s=n.conversationGroup)?s:"");(0,t.useEffect)(()=>v(n.name),[n.name]),(0,t.useEffect)(()=>{var e;return j(null!=(e=n.conversationGroup)?e:"")},[n.conversationGroup]);let y=(0,f.p)(),[b,k]=(0,t.useState)(!1),N=(0,t.useRef)(!1),w=async e=>{if(!N.current){N.current=!0,k(!0);try{await e()}catch(e){h(e.message)}finally{N.current=!1,k(!1),i()}}},S=async e=>{("unattended"!==e||y||await (0,g.Z)(r("session.unattendedConfirm")))&&await w(async()=>{var s;let a=await c.FH.start(n.id,e,n.planName);h(a.started?r("unattended"===e?"session.startedAuto":"session.startedStep"):r("session.notStarted",{reason:null!=(s=a.reason)?s:""}))})},C=async()=>{if(n.running)return void h(r("home.deleteRunning"));if(await (0,g.Z)(r("home.deleteConfirm",{name:n.name,n:n.tasks.length})))try{await c.FH.deleteSession(n.id),window.location.href="/"}catch(e){h(e.message)}},F=async()=>{var e;if(x.trim()!==(null!=(e=n.conversationGroup)?e:""))try{await c.FH.updateSession(n.id,{conversationGroup:x.trim()}),h(r("session.groupSaved")),i()}catch(e){h(e.message)}},L=n.running?r("state.running"):r("state.".concat(n.status));return(0,a.jsxs)("div",{className:"panel",children:[(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("input",{type:"text",className:"grow","aria-label":r("home.col.name"),value:p,onChange:e=>v(e.target.value),onBlur:()=>void w(async()=>{p.trim()&&p!==n.name&&await c.FH.updateSession(n.id,{name:p})})}),(0,a.jsx)("span",{className:"badge ".concat(n.running?"running":""),children:L})]}),!n.running&&(0,a.jsxs)("div",{className:"run-choice",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("button",{className:"primary",onClick:()=>void S("unattended"),disabled:b||0===l,children:r("session.run",{n:l})}),(0,a.jsx)("p",{className:"why",children:r("session.runWhy")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("button",{onClick:()=>void S("confirm"),disabled:b||0===l,children:r("session.runStep")}),(0,a.jsx)("p",{className:"why",children:r("session.runStepWhy")})]})]}),(0,a.jsxs)("div",{className:"row",style:{marginTop:10},children:[n.running&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{className:"danger",onClick:()=>void w(async()=>{await c.FH.stop(n.id),h(r("session.stopping"))}),disabled:b,children:r("session.stop")}),"unattended"===n.runMode&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"badge waiting-approval",children:r("session.modeUnattended")}),(0,a.jsx)("button",{onClick:()=>void w(async()=>{await c.FH.setRunMode(n.id,"confirm"),h(r("session.askingAgain"))}),disabled:b,children:r("session.askAgain")})]})]}),(0,a.jsx)("span",{className:"muted small",children:o}),(0,a.jsx)("span",{className:"grow"}),(0,a.jsx)("button",{className:"quiet",onClick:()=>void C(),disabled:n.running,children:r("home.delete")}),n.chat?(0,a.jsx)("a",{href:n.chat.url,target:"_blank",rel:"noreferrer",className:"small",children:r("session.openChat",{name:n.chat.name})}):(0,a.jsx)("span",{className:"muted small",children:r("session.noChat")})]}),(0,a.jsx)("label",{htmlFor:"session-group",children:r("session.group")}),(0,a.jsx)("div",{className:"row",children:(0,a.jsx)("input",{id:"session-group",type:"text",className:"grow",value:x,placeholder:r("session.groupPlaceholder"),onChange:e=>j(e.target.value),onBlur:()=>void F(),disabled:n.running})}),(0,a.jsxs)("p",{className:"why",children:[r("session.groupWhy"),n.chat&&" ".concat(r("session.groupHasChat"))]}),(0,a.jsx)("div",{className:"muted small",style:{marginTop:10},children:r("session.willUseModel",{name:n.model||(m?r("model.followsDefault",{name:m}):r("model.default"))})})]})}function L(e){var s;let{level1:n,sent:t}=e,{t:l}=(0,d.kj)();return(0,a.jsxs)("div",{className:"panel",children:[(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("h2",{className:"grow",style:{margin:0},children:l("l1.title")}),(0,a.jsx)("span",{className:"badge",children:l(t?"l1.sent":"l1.notSent")}),(0,a.jsx)(r(),{href:"/level1",className:"small",children:l("l1.edit")})]}),(0,a.jsxs)("p",{className:"muted small",style:{marginBottom:6},children:[l("l1.hint"),(null==n?void 0:n.customised)?" ".concat(l("l1.customised")):""]}),(0,a.jsxs)("details",{children:[(0,a.jsx)("summary",{children:l("l1.show")}),(0,a.jsx)("pre",{className:"tall",children:null!=(s=null==n?void 0:n.content)?s:"…"})]})]})}function T(e){var s,n,l,i;let{session:r,onChange:o}=e,{t:h}=(0,d.kj)(),m=(0,d.W3)(),[u,v]=(0,t.useState)(null),[x,j]=(0,t.useState)(!1),[y,f]=(0,t.useState)("");(0,t.useEffect)(()=>{c.FH.models().then(v).catch(()=>void 0)},[]);let b=async e=>{try{await c.FH.updateSession(r.id,{model:e}),f(e?h("model.saved",{name:e}):h("model.savedDefault")),o()}catch(e){f(e.message)}},k=async()=>{try{let e=await c.FH.setDefaultModel(w);v(s=>s?{...s,defaultModel:e.defaultModel}:s),f(e.defaultModel?h("model.defaultSaved",{name:e.defaultModel}):h("model.defaultCleared"))}catch(e){f(e.message)}},N=async()=>{if(await (0,g.Z)(h("model.refreshConfirm"))){j(!0),f(h("model.refreshing"));try{var e;let s=await c.FH.refreshModels();v(s),f(0===s.options.length?null!=(e=s.note)?e:h("model.none"):h("model.refreshed",{n:s.options.length}))}catch(e){f(e.message)}finally{j(!1)}}},w=null!=(s=r.model)?s:"",S=null!=(n=null==u?void 0:u.options)?n:[],C=S.some(e=>e.name===w),F=S.filter(e=>!e.group),L=new Map;for(let e of S)e.group&&L.set(e.group,[...null!=(l=L.get(e.group))?l:[],e]);return(0,a.jsxs)("div",{className:"panel",children:[(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("h2",{className:"grow",style:{margin:0},children:h("model.title")}),r.modelInUse&&(0,a.jsx)("span",{className:"chip",children:h("model.lastUsed",{name:r.modelInUse})})]}),(0,a.jsx)("p",{className:"muted small",children:h("model.hint")}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsxs)("select",{"aria-label":h("model.title"),value:w,disabled:r.running,onChange:e=>void b(e.target.value),style:{width:"auto",minWidth:260},children:[(0,a.jsx)("option",{value:"",children:(null==u?void 0:u.defaultModel)?h("model.followsDefault",{name:u.defaultModel}):h("model.default")}),w&&!C&&(0,a.jsx)("option",{value:w,children:h("model.notInList",{name:w})}),F.map(e=>(0,a.jsxs)("option",{value:e.name,disabled:e.disabled,children:[e.name,e.disabled?" — ".concat(h("model.unavailable")):""]},e.name)),[...L.entries()].map(e=>{let[s,n]=e;return(0,a.jsx)("optgroup",{label:s,children:n.map(e=>(0,a.jsxs)("option",{value:e.name,disabled:e.disabled,children:[e.name,e.disabled?" — ".concat(h("model.unavailable")):""]},e.name))},s)})]}),(0,a.jsx)("button",{onClick:()=>void N(),disabled:x||r.running,children:h("model.refresh")}),(0,a.jsx)("span",{className:"muted small",role:"status",children:y})]}),(0,a.jsx)(p.L,{current:w,onUse:e=>void b(e)}),(0,a.jsxs)("div",{className:"row",style:{marginTop:8},children:[(0,a.jsx)("span",{className:"muted small",children:(null==u?void 0:u.defaultModel)?h("model.defaultIs",{name:u.defaultModel}):h("model.defaultIsNone")}),(0,a.jsx)("button",{onClick:()=>void k(),disabled:w===(null!=(i=null==u?void 0:u.defaultModel)?i:""),children:w?h("model.makeDefault",{name:w}):h("model.clearDefault")})]}),(null==u?void 0:u.readAt)?(0,a.jsxs)("p",{className:"muted small",style:{marginTop:8},children:[h("model.readAt",{t:m(u.readAt),n:u.options.length}),u.current?" ".concat(h("model.chatWasOn",{name:u.current})):"",u.note?" ".concat(u.note):""]}):(0,a.jsx)("p",{className:"muted small",style:{marginTop:8},children:h("model.neverRead")}),S.length>0&&(0,a.jsxs)("details",{children:[(0,a.jsx)("summary",{children:h("model.showDetails")}),(0,a.jsx)("pre",{className:"tall",children:S.map(e=>"".concat(e.selected?"*":" "," ").concat(e.group?"".concat(e.group," > "):"").concat(e.name)+"".concat(e.disabled?" [unavailable]":"","\n ").concat(e.raw.replace(/\n/g," | "))).join("\n")})]})]})}function I(e){var s,n;let{session:l,onChange:i}=e,{t:r}=(0,d.kj)(),o=null!=(s=l.review)?s:{enabled:!0,model:""},[h,m]=(0,t.useState)(o.enabled),[u,x]=(0,t.useState)(null!=(n=o.model)?n:""),[j,g]=(0,t.useState)(""),[y,f]=(0,t.useState)(!1),[b,k]=(0,t.useState)("");(0,t.useEffect)(()=>{c.FH.models().then(e=>{var s;return k(null!=(s=e.defaultReviewModel)?s:"")}).catch(()=>void 0)},[]);let N=async()=>{f(!0),g("");try{await c.FH.updateSession(l.id,{review:{enabled:h,model:u}}),g(r("review.saved")),i()}catch(e){g(e.message)}finally{f(!1)}};return(0,a.jsxs)("div",{className:"panel",children:[(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("h2",{className:"grow",style:{margin:0},children:r("review.title")}),(0,a.jsx)("span",{className:"badge ".concat(h?"done":""),children:h?r("review.on"):r("review.off")})]}),(0,a.jsx)("p",{className:"muted small",children:r("review.hint")}),(0,a.jsxs)("div",{className:"option",children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"checkbox",checked:h,onChange:e=>m(e.target.checked),disabled:l.running}),(0,a.jsx)("span",{children:r("review.enable")})]}),(0,a.jsx)("p",{className:"why",children:r("review.enableWhy")})]}),(0,a.jsx)("label",{htmlFor:"review-model",children:r("review.modelField")}),(0,a.jsx)("div",{className:"row",children:(0,a.jsx)(v.Y,{id:"review-model",chosen:u,onChange:x,none:b?r("model.followsDefault",{name:b}):r("review.modelSame"),disabled:l.running||!h})}),(0,a.jsx)("p",{className:"why",children:r("review.modelWhy")}),(0,a.jsx)(p.z4,{current:u,onUse:e=>x(e)}),(0,a.jsxs)("div",{className:"row",style:{marginTop:10},children:[(0,a.jsx)("button",{className:"primary",onClick:()=>void N(),disabled:y||l.running,children:r("review.save")}),j&&(0,a.jsx)("span",{className:"muted small",children:j})]})]})}function H(e){var s;let{session:n,plan:l,onDone:i}=e,{t:r}=(0,d.kj)(),o=()=>Object.fromEntries(l.entries.filter(e=>e.choice).map(e=>[e.path,e.choice])),h=JSON.stringify(l.entries.map(e=>[e.path,e.choice])),[m,u]=(0,t.useState)(o);(0,t.useEffect)(()=>u(o()),[h]);let[p,v]=(0,t.useState)(!1),[x,j]=(0,t.useState)(""),g=l.entries.filter(e=>"include"===m[e.path]).length,y=async()=>{v(!0),j("");try{var e,s,a;let t=await c.FH.vcsSnapshot(n.id,m);j(t.ok?r("vcs.snapshotTaken",{branch:null!=(e=t.branch)?e:"",commit:(null!=(s=t.commit)?s:"").slice(0,8)}):null!=(a=t.problem)?a:""),i()}catch(e){j(e.message)}finally{v(!1)}};return(0,a.jsxs)("div",{className:"option",children:[(0,a.jsx)("p",{className:"small",children:r("vcs.snapshotList",{n:l.entries.length,branch:null!=(s=l.baselineBranch)?s:"—"})}),(0,a.jsx)("ul",{style:{margin:"4px 0",paddingLeft:0,listStyle:"none"},children:l.entries.map(e=>{var s;return(0,a.jsxs)("li",{style:{marginBottom:4,overflowWrap:"anywhere"},children:[(0,a.jsx)("code",{children:e.path})," ",(0,a.jsxs)("span",{className:"muted small",children:["(",r("vcs.snapshotKind.".concat(e.kind)),")"]})," ",0===e.allowed.length?(0,a.jsx)("span",{className:"err small",children:r("vcs.snapshotBlocked")}):(0,a.jsx)("select",{"aria-label":e.path,value:null!=(s=m[e.path])?s:"",onChange:s=>u({...m,[e.path]:s.target.value}),disabled:p||n.running||e.allowed.length<2,children:e.allowed.map(e=>(0,a.jsx)("option",{value:e,children:r("include"===e?"vcs.snapshotInclude":"vcs.snapshotLeaveOut")},e))}),e.reason&&(0,a.jsx)("div",{className:"muted small",children:e.reason})]},e.path)})}),(0,a.jsx)("button",{className:"primary",onClick:()=>void y(),disabled:p||n.running||!l.ok||0===g,children:r("vcs.snapshotTake")}),(0,a.jsx)("p",{className:"why",children:r("vcs.snapshotCancelWhy")}),x&&(0,a.jsx)("p",{className:"small",role:"status",children:x})]})}function M(e){var s,n,l,i,r,o,h,m,u,v,x,j,g,y,f,b,k,N,S,C,F,L,T,I,M,W,P,R;let{session:D,onChange:B}=e,{t:A}=(0,d.kj)(),O=null!=(m=D.vcs)?m:{enabled:!0,repoDir:"",branchMode:"per-task",commitOnFinish:!0,branchPrefix:"cop/"},[E,U]=(0,t.useState)(O.repoDir),[q,z]=(0,t.useState)(null),[G,J]=(0,t.useState)(""),[Z,_]=(0,t.useState)(!1),K=JSON.stringify(O),[Y,Q]=(0,t.useState)(null),[V,X]=(0,t.useState)(null!=(u=O.branchName)?u:"");(0,t.useEffect)(()=>{var e;return X(null!=(e=JSON.parse(K).branchName)?e:"")},[K]);let[$,ee]=(0,t.useState)(null!=(v=O.baseBranch)?v:"");(0,t.useEffect)(()=>{var e;return ee(null!=(e=JSON.parse(K).baseBranch)?e:"")},[K]);let[es,en]=(0,t.useState)(null!=(x=O.existingBranch)?x:"");(0,t.useEffect)(()=>{var e;return en(null!=(e=JSON.parse(K).existingBranch)?e:"")},[K]);let ea=null!=(j=O.startFrom)?j:"head";(0,t.useEffect)(()=>{U(JSON.parse(K).repoDir)},[K]);let et=JSON.parse(K).repoDir||D.projectDir||"";(0,t.useEffect)(()=>{let e=!1;return et.trim()?(c.FH.repoCheck(et).then(s=>{var n;e||Q(s.ok?null:null!=(n=s.problem)?n:null)}).catch(()=>{e||Q(null)}),()=>{e=!0}):void Q(null)},[et]);let el=(0,t.useCallback)(()=>{c.FH.vcsStatus(D.id).then(z).catch(()=>z(null))},[D.id]);(0,t.useEffect)(el,[el,K]);let ei=async e=>{try{await c.FH.updateSession(D.id,{vcs:e}),J(A("vcs.saved")),B(),el()}catch(e){J(e.message)}},er=async()=>{_(!0),J(A("mirror.browsing"));try{let s=await c.FH.browseFolder(E.trim()||D.projectDir||void 0);if(s.ok)U(s.path),await ei({repoDir:s.path});else{var e;J(s.cancelled?A("mirror.browseCancelled"):null!=(e=s.reason)?e:"")}}catch(e){J(e.message)}finally{_(!1)}},ec=O.repoDir||D.projectDir||"",ed=""!==ec.trim()&&null===Y;return(0,a.jsxs)("div",{className:"panel",children:[(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("h2",{className:"grow",style:{margin:0},children:A("vcs.title")}),(0,a.jsx)("span",{className:"badge ".concat(O.enabled?"done":""),children:O.enabled?A("vcs.on"):A("vcs.off")})]}),(0,a.jsx)("p",{className:"muted small",children:A("vcs.hint")}),(0,a.jsx)("label",{htmlFor:"vcs-root",children:A("vcs.repoField")}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("input",{id:"vcs-root",type:"text",className:"grow",value:E,onChange:e=>U(e.target.value),onBlur:()=>E.trim()!==O.repoDir&&void ei({repoDir:E.trim()}),placeholder:D.projectDir||"C:\\Projects\\my-app",disabled:D.running}),(0,a.jsx)("button",{onClick:()=>void er(),disabled:Z||D.running,children:A("mirror.browse")})]}),(0,a.jsx)(p.H4,{current:E,onUse:e=>{U(e),ei({repoDir:e})}}),Y&&(0,a.jsxs)("div",{className:"notice caution",style:{marginTop:8},children:[(0,a.jsx)("strong",{children:A("vcs.noRepo")}),(0,a.jsx)("div",{className:"small",style:{marginTop:4},children:Y}),(0,a.jsx)("div",{className:"muted small",style:{marginTop:6},children:A("vcs.noRepoHow")})]}),!Y&&""!==ec.trim()&&(0,a.jsx)("p",{className:"muted small",style:{marginTop:4},children:A("vcs.repoOk")}),""===ec.trim()&&(0,a.jsx)("p",{className:"muted small",style:{marginTop:4},children:A("vcs.pickFirst")}),(0,a.jsxs)("div",{className:"option".concat(ed||O.enabled?"":" warned"),children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"checkbox",checked:O.enabled,onChange:e=>void ei({enabled:e.target.checked}),disabled:D.running||!ed&&!O.enabled}),(0,a.jsx)("span",{children:A("vcs.enable")})]}),(0,a.jsx)("p",{className:"why",children:A("vcs.enableWhy")})]}),O.enabled&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"muted small",style:{marginTop:4},children:ec?A("vcs.repoIs",{dir:ec}):A("vcs.repoNone")}),ec&&!Y&&(0,a.jsx)(w.b,{dir:ec}),(0,a.jsx)("h3",{children:A("vcs.branches")}),"existing-branch"===ea&&(0,a.jsx)("p",{className:"muted small",children:A("vcs.branchesExisting",{branch:O.existingBranch||"…"})}),(0,a.jsxs)("div",{className:"option",children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"radio",name:"branchMode",checked:"per-task"===O.branchMode,onChange:()=>void ei({branchMode:"per-task"}),disabled:D.running}),(0,a.jsx)("span",{children:A("vcs.perTask")})]}),(0,a.jsx)("p",{className:"why",children:A("vcs.perTaskWhy")})]}),(0,a.jsxs)("div",{className:"option",children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"radio",name:"branchMode",checked:"per-session"===O.branchMode,onChange:()=>void ei({branchMode:"per-session"}),disabled:D.running}),(0,a.jsx)("span",{children:A("vcs.perSession")})]}),(0,a.jsx)("p",{className:"why",children:A("vcs.perSessionWhy")})]}),"per-session"===O.branchMode&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("label",{htmlFor:"vcs-branch-name",children:A("vcs.branchName")}),(0,a.jsx)("input",{id:"vcs-branch-name",type:"text",value:V,onChange:e=>X(e.target.value),onBlur:()=>{var e;return V.trim()!==(null!=(e=O.branchName)?e:"")&&void ei({branchName:V.trim()})},placeholder:D.name,disabled:D.running}),(0,a.jsx)("p",{className:"why",children:A("vcs.branchNameWhy")})]}),(0,a.jsx)("h3",{children:A("vcs.startFrom")}),(0,a.jsxs)("div",{className:"option",children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"radio",name:"startFrom",checked:"branch"===ea,onChange:()=>void ei({startFrom:"branch"}),disabled:D.running}),(0,a.jsx)("span",{children:A("vcs.startBranch")})]}),(0,a.jsx)("p",{className:"why",children:A("vcs.startBranchWhy")})]}),(0,a.jsxs)("div",{className:"option",children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"radio",name:"startFrom",checked:"previous-session"===ea,onChange:()=>void ei({startFrom:"previous-session"}),disabled:D.running}),(0,a.jsx)("span",{children:A("vcs.startPrevious")})]}),(0,a.jsx)("p",{className:"why",children:A("vcs.startPreviousWhy")})]}),(0,a.jsxs)("div",{className:"option",children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"radio",name:"startFrom",checked:"head"===ea,onChange:()=>void ei({startFrom:"head"}),disabled:D.running}),(0,a.jsx)("span",{children:A("vcs.startHead")})]}),(0,a.jsx)("p",{className:"why",children:A("vcs.startHeadWhy")})]}),(0,a.jsxs)("div",{className:"option",children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"radio",name:"startFrom",checked:"existing-branch"===ea,onChange:()=>void ei({startFrom:"existing-branch"}),disabled:D.running}),(0,a.jsx)("span",{children:A("vcs.startExisting")})]}),(0,a.jsx)("p",{className:"why",children:A("vcs.startExistingWhy")})]}),"existing-branch"===ea&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("label",{htmlFor:"vcs-existing-branch",children:A("vcs.existingBranch")}),(0,a.jsx)("input",{id:"vcs-existing-branch",type:"text",list:"vcs-local-branches",value:es,onChange:e=>en(e.target.value),onBlur:()=>{var e;return es.trim()!==(null!=(e=O.existingBranch)?e:"")&&void ei({existingBranch:es.trim()})},disabled:D.running}),(0,a.jsx)("datalist",{id:"vcs-local-branches",children:(null!=(g=null==q?void 0:q.branches)?g:[]).map(e=>(0,a.jsx)("option",{value:e},e))}),(0,a.jsx)("p",{className:"why",children:A("vcs.existingBranchWhy")}),O.existingBranch&&(null==q?void 0:q.branches)&&!q.branches.includes(O.existingBranch)&&(0,a.jsx)("p",{className:"err small",children:A("vcs.existingBranchMissing",{branch:O.existingBranch})})]}),("branch"===ea||"previous-session"===ea)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("label",{htmlFor:"vcs-base-branch",children:A("vcs.baseBranch")}),(0,a.jsx)("input",{id:"vcs-base-branch",type:"text",value:$,onChange:e=>ee(e.target.value),onBlur:()=>{var e;return $.trim()!==(null!=(e=O.baseBranch)?e:"")&&void ei({baseBranch:$.trim()})},placeholder:"main",disabled:D.running}),(0,a.jsx)("p",{className:"why",children:A("vcs.baseBranchWhy")})]}),D.vcsStart&&(0,a.jsxs)("p",{className:"muted small",children:["existing-branch"===D.vcsStart.kind?A("vcs.startedExisting",{branch:null!=(y=D.vcsStart.branch)?y:"",commit:D.vcsStart.commit.slice(0,8)}):"previous-session"===D.vcsStart.kind?A("vcs.startedPrevious",{name:null!=(f=null==(s=D.vcsStart.fromSession)?void 0:s.name)?f:"",branch:null!=(b=D.vcsStart.branch)?b:"",commit:D.vcsStart.commit.slice(0,8)}):"branch"===D.vcsStart.kind?A("vcs.startedBranch",{branch:null!=(k=D.vcsStart.branch)?k:"",commit:D.vcsStart.commit.slice(0,8)}):"snapshot"===D.vcsStart.kind?A("vcs.startedSnapshot",{branch:null!=(N=D.vcsStart.branch)?N:"",commit:D.vcsStart.commit.slice(0,8),from:null!=(S=null==(n=D.vcsStart.snapshot)?void 0:n.fromBranch)?S:"HEAD",n:null!=(C=null==(l=D.vcsStart.snapshot)?void 0:l.included.length)?C:0,out:null!=(F=null==(i=D.vcsStart.snapshot)?void 0:i.leftOut.length)?F:0}):A("vcs.startedHead",{commit:D.vcsStart.commit.slice(0,8)}),D.vcsStart.note?" — ".concat(D.vcsStart.note):"",D.vcsStart.update&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("br",{}),"updated"===D.vcsStart.update.outcome?A("vcs.updated",{branch:D.vcsStart.update.branch,remote:null!=(L=D.vcsStart.update.remote)?L:"",from:(null!=(T=D.vcsStart.update.from)?T:"").slice(0,8),to:(null!=(I=D.vcsStart.update.to)?I:"").slice(0,8)}):"up-to-date"===D.vcsStart.update.outcome?A("vcs.upToDate",{branch:D.vcsStart.update.branch,remote:null!=(M=D.vcsStart.update.remote)?M:""}):A("vcs.notUpdated",{branch:D.vcsStart.update.branch,why:null!=(W=D.vcsStart.update.detail)?W:D.vcsStart.update.outcome})]})]}),"head"!==ea&&(0,a.jsxs)("div",{className:"option",children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"checkbox",checked:!1!==O.updateFromRemote,onChange:e=>void ei({updateFromRemote:e.target.checked}),disabled:D.running}),(0,a.jsx)("span",{children:A("vcs.updateFromRemote")})]}),(0,a.jsx)("p",{className:"why",children:A("vcs.updateFromRemoteWhy")})]}),(0,a.jsxs)("div",{className:"option",children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"checkbox",checked:O.commitOnFinish,onChange:e=>void ei({commitOnFinish:e.target.checked}),disabled:D.running}),(0,a.jsx)("span",{children:A("vcs.commit")})]}),(0,a.jsx)("p",{className:"why",children:A("vcs.commitWhy")})]}),"existing-branch"!==ea&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{children:A("vcs.dirty")}),["reject","snapshot","tracked-only-snapshot"].map(e=>{var s,n;return(0,a.jsxs)("div",{className:"option",children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"radio",name:"vcs-dirty-".concat(D.id),checked:(null!=(n=null==(s=O.dirtyWorktree)?void 0:s.policy)?n:"reject")===e,onChange:()=>{var s;ei({dirtyWorktree:{policy:e,requireApproval:null==(s=O.dirtyWorktree)?void 0:s.requireApproval}})},disabled:D.running}),(0,a.jsx)("span",{children:A("reject"===e?"vcs.dirtyReject":"snapshot"===e?"vcs.dirtySnapshot":"vcs.dirtyTracked")})]}),(0,a.jsx)("p",{className:"why",children:A("reject"===e?"vcs.dirtyRejectWhy":"snapshot"===e?"vcs.dirtySnapshotWhy":"vcs.dirtyTrackedWhy")})]},e)}),(null!=(P=null==(r=O.dirtyWorktree)?void 0:r.policy)?P:"reject")!=="reject"&&(0,a.jsxs)("div",{className:"option",children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"checkbox",checked:(null==(o=O.dirtyWorktree)?void 0:o.requireApproval)!==!1,onChange:e=>{var s,n;ei({dirtyWorktree:{policy:null!=(n=null==(s=O.dirtyWorktree)?void 0:s.policy)?n:"snapshot",requireApproval:e.target.checked}})},disabled:D.running}),(0,a.jsx)("span",{children:A("vcs.dirtyApproval")})]}),(0,a.jsx)("p",{className:"why",children:A("vcs.dirtyApprovalWhy")})]})]}),q&&!q.ok&&(0,a.jsxs)("div",{className:"notice caution",role:"status",children:[(0,a.jsx)("strong",{children:A("vcs.notReady")})," ",q.problem]}),(null==q||null==(h=q.snapshot)?void 0:h.needed)&&q.snapshot.entries.length>0&&(0,a.jsx)(H,{session:D,plan:q.snapshot,onDone:()=>{B(),el()}}),(null==q?void 0:q.ok)&&(0,a.jsx)("div",{className:"muted small",children:A("vcs.ready",{branch:null!=(R=q.branch)?R:"—",dir:q.repoDir})}),(null==q?void 0:q.ok)&&q.work&&q.work.branches.length>0&&(0,a.jsxs)("div",{className:"muted small",children:["per-session"===q.work.mode&&q.work.complete?A("vcs.completeOn",{branch:q.work.complete}):A("vcs.noSingleBranch",{n:q.work.branches.length}),"per-task"===q.work.mode&&(0,a.jsx)("ul",{style:{margin:"4px 0",paddingLeft:20},children:q.work.branches.map(e=>(0,a.jsxs)("li",{children:[(0,a.jsx)("code",{children:e.branch})," — ",e.title,e.commit?"":" (".concat(A("vcs.taskNoFiles"),")")]},e.branch))})]}),(0,a.jsx)("p",{className:"muted small",children:A("vcs.pushIsYours")})]}),(0,a.jsx)("div",{className:"muted small",role:"status",children:G})]})}function W(e){var s;let{session:n,onChange:l}=e,{t:i}=(0,d.kj)(),[r,o]=(0,t.useState)(""),h=null!=(s=n.onFailure)?s:"stop",m=async e=>{if(e!==h)try{await c.FH.updateSession(n.id,{onFailure:e}),o(i("stop"===e?"chain.savedStop":"chain.savedContinue")),l()}catch(e){o(e.message)}};return(0,a.jsxs)("fieldset",{style:{border:0,padding:0,margin:"10px 0 14px"},children:[(0,a.jsx)("legend",{className:"muted small",style:{padding:0},children:i("chain.title")}),(0,a.jsxs)("div",{className:"option",children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"radio",name:"chain",checked:"stop"===h,onChange:()=>void m("stop"),disabled:n.running}),(0,a.jsx)("span",{children:i("chain.stop")})]}),(0,a.jsx)("p",{className:"why",children:i("chain.stopWhy")})]}),(0,a.jsxs)("div",{className:"option",children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"radio",name:"chain",checked:"continue"===h,onChange:()=>void m("continue"),disabled:n.running}),(0,a.jsx)("span",{children:i("chain.continue")})]}),(0,a.jsx)("p",{className:"why",children:i("chain.continueWhy")})]}),r&&(0,a.jsx)("div",{className:"muted small",role:"status",children:r}),n.running&&(0,a.jsx)("div",{className:"muted small",children:i("chain.locked")})]})}function P(e){let{value:s,onChange:n,presets:l,onPresetsChanged:i}=e,{t:r}=(0,d.kj)(),o=(0,t.useId)(),[h,m]=(0,t.useState)(""),u=async()=>{let e=prompt(r("l2.saveAsPrompt"));if(e)try{await c.FH.savePreset(e,s),m(r("l2.savedAs",{name:e})),null==i||i()}catch(e){m(e.message)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("label",{className:"grow",style:{margin:0},htmlFor:"".concat(o,"-text"),children:r("l2.label")}),(0,a.jsxs)("select",{value:"","aria-label":r("l2.loadPreset"),onChange:e=>{let s=l.find(s=>s.name===e.target.value);s&&n(s.content)},children:[(0,a.jsx)("option",{value:"",children:r("l2.loadPreset")}),l.map(e=>(0,a.jsx)("option",{value:e.name,children:e.name},e.name))]}),(0,a.jsx)("button",{onClick:()=>void u(),disabled:!s.trim(),children:r("l2.saveAs")})]}),(0,a.jsx)("textarea",{id:"".concat(o,"-text"),className:"prose",value:s,onChange:e=>n(e.target.value),placeholder:r("l2.placeholder"),style:{minHeight:140,marginTop:10}}),h&&(0,a.jsx)("div",{className:"muted small",children:h})]})}function R(e){let{session:s}=e,{t:n}=(0,d.kj)(),l=(0,d.W3)(),i=s.tasks.filter(e=>"queued"!==e.status),[r,o]=(0,t.useState)([]),h=r.length>0?r:i.map(e=>e.id),m=e=>(0,c.ub)("".concat(c.nC,"/sessions/").concat(s.id,"/export?variant=").concat(e)+(r.length>0?"&tasks=".concat(encodeURIComponent(r.join(","))):""));return(0,a.jsxs)("div",{className:"panel",children:[(0,a.jsx)("h2",{children:n("export.title")}),(0,a.jsx)("p",{className:"muted small",children:n("export.hint")}),0===i.length?(0,a.jsx)("div",{className:"empty",children:n("export.nothing")}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"row",style:{marginBottom:6},children:[(0,a.jsx)("button",{className:"quiet",onClick:()=>o(i.map(e=>e.id)),children:n("export.all")}),(0,a.jsx)("button",{className:"quiet",onClick:()=>o([]),children:n("export.none")}),(0,a.jsx)("span",{className:"muted small",children:r.length>0?n("export.selected",{n:r.length}):n("export.allOf",{n:i.length})})]}),i.map(e=>{var s,t,i,c,d;return(0,a.jsx)("div",{className:"option",style:{margin:"6px 0"},children:(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"checkbox",checked:r.includes(e.id),onChange:()=>{let s;return s=e.id,o(e=>e.includes(s)?e.filter(e=>e!==s):[...e,s])}}),(0,a.jsxs)("span",{children:[e.title," ",(0,a.jsx)("span",{className:"badge ".concat(e.status),children:n("status.".concat(e.status))})," ",e.readOnly&&(0,a.jsx)("span",{className:"chip",children:n("task.readOnly")})," ",(null!=(t=null==(s=e.scope)?void 0:s.length)?t:0)>0&&(0,a.jsx)("span",{className:"chip",children:n("task.scope",{paths:(null!=(i=e.scope)?i:[]).join(", ")})})," ",(0,a.jsx)("span",{className:"muted small",children:l(null!=(d=null!=(c=e.finishedAt)?c:e.startedAt)?d:e.createdAt)})]})]})},e.id)}),(0,a.jsxs)("div",{className:"row",style:{marginTop:10},children:[(0,a.jsx)("a",{className:"button-link",href:m("outcome"),download:!0,children:n("export.outcome",{n:h.length})}),(0,a.jsx)("a",{className:"button-link",href:m("full"),download:!0,children:n("export.full",{n:h.length})})]}),(0,a.jsx)("p",{className:"muted small",style:{marginTop:8},children:n("export.outcomeWhy")})]})]})}function D(e){let{handoff:s}=e,{t:n}=(0,d.kj)(),t=(e,s)=>(0,a.jsxs)("div",{className:"handoff-row",children:[(0,a.jsx)("strong",{children:n(e)})," ",s]}),l=e=>(0,a.jsx)("ul",{children:e.map((e,s)=>(0,a.jsx)("li",{children:e},s))}),i=s.validation.filter(e=>e.passed).length;return(0,a.jsxs)("div",{className:"summary handoff",children:[(0,a.jsx)("strong",{children:n("handoff.title")}),t("handoff.outcome",(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"badge ".concat(s.outcome.status),children:n("status.".concat(s.outcome.status))}),s.outcome.reason?" ".concat(s.outcome.reason):""]})),t("handoff.files",0===s.changedFiles.length?(0,a.jsx)("span",{className:"muted",children:n("handoff.noFiles")}):(0,a.jsx)("code",{children:s.changedFiles.map(e=>"".concat(e.path).concat(e.added>=0?" +".concat(e.added,"/-").concat(e.removed):"")).join(", ")})),s.validation.length>0&&t("handoff.validation",(0,a.jsxs)(a.Fragment,{children:[n("handoff.passed",{n:i,of:s.validation.length}),s.review?" \xb7 ".concat(n("handoff.review",{verdict:s.review.verdict,open:s.review.open})):""]})),t("handoff.issues",0===s.knownIssues.length?(0,a.jsx)("span",{className:"muted",children:n("handoff.noIssues")}):l(s.knownIssues)),s.evidence.runId&&t("handoff.evidence",(0,a.jsx)("code",{children:s.evidence.runId})),(s.vcs.branch||s.vcs.problem)&&t("handoff.vcs",(0,a.jsxs)(a.Fragment,{children:[s.vcs.branch&&(0,a.jsx)("code",{children:s.vcs.branch}),s.vcs.commit?" @ ".concat(s.vcs.commit.slice(0,8)," \xb7 ").concat(n("handoff.notPushed")):s.vcs.branch?" \xb7 ".concat(n("handoff.noCommit")):"",s.vcs.problem?" — ".concat(s.vcs.problem):""]})),s.manual.length>0&&t("handoff.manual",l(s.manual)),s.notExecuted.length>0&&t("handoff.notRun",l(s.notExecuted))]})}function B(e){var s;let{session:n,presets:l,onAdded:i,onPresetsChanged:r}=e,{t:o}=(0,d.kj)(),h=[...n.tasks].reverse()[0],[m,u]=(0,t.useState)(""),[p,v]=(0,t.useState)(null!=(s=null==h?void 0:h.level2)?s:""),[x,j]=(0,t.useState)(""),[g,y]=(0,t.useState)(""),[f,b]=(0,t.useState)(!1),k=(0,t.useRef)(!1),N=async()=>{if(!k.current){k.current=!0,b(!0);try{await c.FH.addTask(n.id,{title:m,level2:p,prompt:x}),u(""),j(""),y(o("form.queued")),i()}catch(e){y(e.message)}finally{k.current=!1,b(!1)}}};return(0,a.jsxs)("div",{className:"panel",id:"new-task",children:[(0,a.jsx)("h2",{children:o("form.title")}),(0,a.jsx)("p",{className:"muted small",children:o("form.hint")}),(0,a.jsx)("label",{htmlFor:"new-task-title",children:o("form.titleLabel")}),(0,a.jsx)("input",{id:"new-task-title",type:"text",value:m,onChange:e=>u(e.target.value),placeholder:o("form.titlePlaceholder")}),(0,a.jsx)("div",{style:{marginTop:10},children:(0,a.jsx)(P,{value:p,onChange:v,presets:l,onPresetsChanged:r})}),(0,a.jsx)("label",{htmlFor:"new-task-prompt",children:o("form.taskLabel")}),(0,a.jsx)("textarea",{id:"new-task-prompt",className:"prose",value:x,onChange:e=>j(e.target.value),placeholder:o("form.taskPlaceholder"),style:{minHeight:140}}),(0,a.jsxs)("div",{className:"row",style:{marginTop:10},children:[(0,a.jsx)("button",{className:"primary",onClick:()=>void N(),disabled:f||!x.trim(),children:o("form.add")}),(0,a.jsx)("span",{className:"muted small",children:g})]})]})}function A(e){var s,n,l,i,r,u,p,v,f,k,w,S,C,F,L,T,I,H,M,W,R,B,A,O,U,J,Z,_,K,Y,Q,V,X,$,ee,es,en,ea,et,el,ei,er,ec,ed,eo,eh,em,eu,ep,ev,ex,ej,eg,ey,ef,eb,ek,eN,ew,eS,eC,eF,eL,eT,eI,eH,eM,eW,eP,eR,eD,eB,eA,eO;let{session:eE,task:eU,index:eq,presets:ez,onChange:eG}=e,{t:eJ}=(0,d.kj)(),eZ=(0,d.W3)(),[e_,eK]=(0,t.useState)(!1),[eY,eQ]=(0,t.useState)(!1),[eV,eX]=(0,t.useState)(eU.title),[e$,e0]=(0,t.useState)(eU.level2),[e1,e2]=(0,t.useState)(eU.prompt),[e8,e4]=(0,t.useState)(null!=(V=null==(s=eU.vcsPlan)?void 0:s.branch)?V:""),[e6,e3]=(0,t.useState)(null!=(X=null==(n=eU.vcsPlan)?void 0:n.commitMessage)?X:""),[e5,e7]=(0,t.useState)(null!=($=eU.checks)?$:[]),[e9,se]=(0,t.useState)(!!eU.readOnly),[ss,sn]=(0,t.useState)((null!=(ee=eU.scope)?ee:[]).join("\n")),sa={readOnly:e9,scope:e9?[]:(0,N.w)(ss)},st=(0,m.c)((0,h.DG)(eU)),[sl,si]=(0,t.useState)(null),[sr,sc]=(0,t.useState)(""),sd=async()=>{try{await c.FH.updateTask(eE.id,eU.id,{title:eV,level2:e$,prompt:e1,vcsPlan:{branch:e8,commitMessage:e6},checks:e5,...sa}),eK(!1),eG()}catch(e){sc(e.message)}},so="running"===eU.status||"waiting-approval"===eU.status,sh=!so&&"queued"!==eU.status,sm=!so&&"queued"!==eU.status,su=!so&&null!=(es=null==(l=eE.vcs)?void 0:l.enabled)&&es&&(!!(null==(i=eU.vcs)?void 0:i.baseCommit)||(null!=(en=eU.attempts)?en:[]).some(e=>{var s;return null==(s=e.vcs)?void 0:s.baseCommit})),sp=!so&&(0,c.Zm)(eU),sv=async()=>{if(await (0,g.Z)(eJ("task.continueConfirm",{title:eU.title})))try{await c.FH.continueTask(eE.id,eU.id),eG()}catch(e){sc(e.message)}},sx=async()=>{if(await (0,g.Z)(eJ("task.rerunConfirm",{title:eU.title})))try{await c.FH.rerunTask(eE.id,eU.id),eG()}catch(e){sc(e.message)}},sj=async()=>{if(await (0,g.Z)(eJ("task.editRanConfirm",{title:eU.title})))try{await c.FH.rerunTask(eE.id,eU.id,{title:eV,level2:e$,prompt:e1,vcsPlan:{branch:e8,commitMessage:e6},checks:e5,...sa},{buildOnFinished:"done"===eU.status}),eK(!1),eG()}catch(e){sc(e.message)}},sg=(0,b.e)(eG),sy=async()=>{let e="queued"===eU.status?"task.deleteConfirm":"task.deleteConfirmRan";if(await (0,g.Z)(eJ(e,{title:eU.title})))try{await c.FH.deleteTask(eE.id,eU.id),eG()}catch(e){sc(e.message)}},sf=async()=>{try{si(await c.FH.taskFiles(eE.id,eU.id))}catch(e){sc(e.message)}},sb=(e,s,n)=>n.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("span",{className:"muted",children:[eJ(e)," "]}),n.map(e=>(0,a.jsx)("span",{style:{marginRight:10},children:(0,a.jsx)(o.u,{label:e,save:()=>c.FH.saveTaskFile(eE.id,eU.id,s,e)})},e))]});return(0,a.jsxs)("div",{className:"task ".concat(eU.status),id:eU.id,children:[(0,a.jsxs)("div",{className:"row",children:[(0,a.jsxs)("h4",{className:"grow",children:[eq,". ",eU.title]}),(0,a.jsx)("span",{className:"badge ".concat(eU.status),children:eJ("status.".concat(eU.status))}),eU.limit&&(0,a.jsx)("span",{className:"chip",title:eJ("reg.limitChipWhy"),children:eJ("reg.limitChip",{limit:eJ("limit.".concat(eU.limit.setting),{n:eU.limit.value})})}),(null!=(ea=eU.attempt)?ea:1)>1&&(0,a.jsx)("span",{className:"chip",children:eJ("task.attemptN",{n:null!=(et=eU.attempt)?et:1})}),eU.iterations>0&&(0,a.jsx)("span",{className:"muted small",children:eJ("task.iterations",{n:eU.iterations})}),eU.runId&&(0,a.jsxs)("button",{className:eY?"":"quiet","aria-expanded":eY,onClick:()=>eQ(e=>!e),title:(0,h.DG)(eU)?eJ("story.showLiveWhy"):eJ("story.why"),children:[(0,h.DG)(eU)&&!eY&&(0,a.jsx)("span",{className:"dot","aria-hidden":"true"}),eY?eJ("story.hide"):(0,h.DG)(eU)?eJ("story.showLive"):eJ("story.show")]}),!so&&(0,a.jsx)("button",{onClick:()=>{if(!e_){var e,s,n,a,t,l;eX(eU.title),e0(eU.level2),e2(eU.prompt),e4(null!=(n=null==(e=eU.vcsPlan)?void 0:e.branch)?n:""),e3(null!=(a=null==(s=eU.vcsPlan)?void 0:s.commitMessage)?a:""),e7(null!=(t=eU.checks)?t:[]),se(!!eU.readOnly),sn((null!=(l=eU.scope)?l:[]).join("\n"))}eK(!e_)},title:eJ("task.editAll"),children:e_?eJ("task.cancel"):eJ("task.edit")}),sp&&(0,a.jsx)("button",{className:"primary",onClick:()=>void sv(),title:eJ("task.continueWhy"),children:eJ("task.continue")}),sm&&(0,a.jsx)("button",{className:sp?"":"primary",onClick:()=>void sx(),title:eJ("task.rerunWhy"),children:eJ("task.rerun")}),su&&(0,a.jsx)("button",{onClick:()=>void sg.restore({sessionId:eE.id,taskId:eU.id,title:eU.title}),disabled:""!==sg.busy||eE.running,title:eJ("restore.why"),children:"restore"===sg.busy?eJ("restore.checking"):eJ("restore.button")}),sh&&(0,a.jsx)("button",{onClick:()=>void sg.restartFrom({sessionId:eE.id,taskId:eU.id,title:eU.title}),disabled:""!==sg.busy||eE.running,title:eJ("restart.why"),children:"restart"===sg.busy?eJ("restart.checking"):eJ("restart.button")}),!so&&(0,a.jsx)("button",{className:"danger",onClick:()=>void sy(),children:eJ("task.delete")}),!e_&&(sr||sg.message)&&(0,a.jsx)("span",{className:"err",role:"alert",children:sr||sg.message})]}),(0,a.jsxs)("div",{className:"muted small",children:[eU.startedAt?eJ("task.started",{t:eZ(eU.startedAt)}):eJ("task.added",{t:eZ(eU.createdAt)}),eU.finishedAt?" \xb7 ".concat(eJ("task.finished",{t:eZ(eU.finishedAt)})):"",eU.startedAt&&eU.finishedAt?" \xb7 ".concat(eJ("task.took",{d:(0,c.c5)((0,h.d5)(eU.startedAt,eU.finishedAt))})):"",(0,h.DG)(eU)?" \xb7 ".concat(eJ("task.runningFor",{d:(0,c.c5)((0,h.d5)(eU.startedAt,void 0,st))})):""]}),"queued"!==eU.status&&(null==(r=eE.vcs)?void 0:r.enabled)&&eU.vcs&&(0,a.jsx)("div",{className:"muted small",children:eU.vcs.problem&&!eU.vcs.branch?(0,a.jsx)("span",{className:"reason",children:eJ("vcs.taskProblem",{problem:eU.vcs.problem})}):(0,a.jsxs)(a.Fragment,{children:[eU.vcs.branch&&eJ("vcs.taskBranch",{branch:eU.vcs.branch}),eU.vcs.baseCommit&&" \xb7 ".concat(eJ("vcs.taskBase",{commit:eU.vcs.baseCommit.slice(0,8)})),eU.vcs.commit?" \xb7 ".concat(eJ("vcs.taskCommit",{commit:eU.vcs.commit.slice(0,8)})):" \xb7 ".concat(eJ("vcs.taskNoFiles")),(null!=(el=null==(u=eU.vcs.files)?void 0:u.length)?el:0)>0&&(0,a.jsxs)("details",{style:{display:"inline"},children:[(0,a.jsxs)("summary",{style:{display:"inline",cursor:"pointer"},children:[" \xb7 ",eJ("vcs.taskFiles",{n:null!=(ei=null==(p=eU.vcs.files)?void 0:p.length)?ei:0})]}),(0,a.jsx)("ul",{style:{margin:"4px 0 4px 0",paddingLeft:20},children:(null!=(er=eU.vcs.files)?er:[]).map(e=>(0,a.jsxs)("li",{children:[(0,a.jsx)("code",{children:e.path})," ",e.added<0||e.removed<0?eJ("vcs.taskBinary"):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{style:{color:"var(--ok)"},children:["+",e.added]})," ",(0,a.jsxs)("span",{style:{color:"var(--bad)"},children:["-",e.removed]})]})]},e.path))})]}),eU.vcs.commit&&eU.vcs.baseCommit&&(0,a.jsxs)(a.Fragment,{children:[" \xb7 ",(0,a.jsx)(y.C,{sessionId:eE.id,taskId:eU.id,title:eU.title,files:null!=(ec=null==(v=eU.vcs.files)?void 0:v.length)?ec:0})]}),(null!=(ed=null==(f=eU.vcs.suspicious)?void 0:f.length)?ed:0)>0&&(0,a.jsxs)("div",{className:"err small",style:{marginTop:4},children:[eJ("vcs.suspicious",{n:null!=(eo=null==(k=eU.vcs.suspicious)?void 0:k.length)?eo:0}),(0,a.jsx)("ul",{style:{margin:"4px 0",paddingLeft:20},children:(null!=(eh=eU.vcs.suspicious)?eh:[]).map(e=>(0,a.jsxs)("li",{children:[(0,a.jsx)("code",{children:e.path})," — ",e.reason]},e.path))})]}),(null!=(em=null==(w=eU.scopeReverted)?void 0:w.length)?em:0)>0&&(0,a.jsx)("div",{className:"small",style:{marginTop:4},children:eJ("task.scopeReverted",{n:null!=(eu=null==(S=eU.scopeReverted)?void 0:S.length)?eu:0,paths:(null!=(ep=eU.scopeReverted)?ep:[]).join(", ")})}),(null!=(ev=null==(C=eU.vcs.foreignCommits)?void 0:C.length)?ev:0)>0&&(0,a.jsxs)("div",{className:"err small",style:{marginTop:4},children:[eJ("vcs.foreignCommits",{n:null!=(ex=null==(F=eU.vcs.foreignCommits)?void 0:F.length)?ex:0}),(0,a.jsx)("ul",{style:{margin:"4px 0",paddingLeft:20},children:(null!=(ej=eU.vcs.foreignCommits)?ej:[]).map(e=>(0,a.jsx)("li",{children:(0,a.jsx)("code",{children:e})},e))})]})]})}),"queued"===eU.status&&(null==(L=eE.vcs)?void 0:L.enabled)&&((null==(T=eU.vcsPlan)?void 0:T.branch)||(null==(I=eU.vcsPlan)?void 0:I.commitMessage))&&(0,a.jsx)("div",{className:"muted small",children:eU.vcsPlan.branch&&eU.vcsPlan.commitMessage?eJ("task.gitNames",{branch:eU.vcsPlan.branch,subject:eU.vcsPlan.commitMessage.split("\n")[0]}):eU.vcsPlan.branch?eJ("task.gitBranchOnly",{branch:eU.vcsPlan.branch}):eJ("task.gitCommitOnly",{subject:(null!=(eg=eU.vcsPlan.commitMessage)?eg:"").split("\n")[0]})}),eY&&eU.runId&&(0,a.jsx)(x.P,{sessionId:eE.id,taskId:eU.id,live:"running"===eU.status||"waiting-approval"===eU.status}),e_?(0,a.jsxs)("div",{style:{marginTop:8},children:[(0,a.jsx)("label",{children:eJ("form.titleLabel")}),(0,a.jsx)("input",{type:"text",value:eV,onChange:e=>eX(e.target.value)}),(0,a.jsx)("div",{style:{marginTop:8},children:(0,a.jsx)(P,{value:e$,onChange:e0,presets:ez})}),(0,a.jsx)("label",{children:eJ("form.taskLabel")}),(0,a.jsx)("textarea",{className:"prose",value:e1,onChange:e=>e2(e.target.value)}),(null==(H=eE.vcs)?void 0:H.enabled)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("label",{htmlFor:"branch-".concat(eU.id),children:eJ("task.branch")}),(0,a.jsx)("input",{id:"branch-".concat(eU.id),type:"text",value:e8,onChange:e=>e4(e.target.value),placeholder:eE.vcs.branchPrefix,disabled:"per-session"===eE.vcs.branchMode}),(0,a.jsx)("p",{className:"why",children:"per-session"===eE.vcs.branchMode?eJ("task.branchIgnored"):eJ("task.branchWhy")}),(0,a.jsx)("label",{htmlFor:"commit-".concat(eU.id),children:eJ("task.commitMessage")}),(0,a.jsx)("textarea",{id:"commit-".concat(eU.id),value:e6,onChange:e=>e3(e.target.value),style:{minHeight:70}}),(0,a.jsx)("p",{className:"why",children:eJ("task.commitWhy")})]}),(0,a.jsx)(E,{checks:e5,onChange:e7}),e1.trim()!==eU.prompt.trim()&&(0,a.jsx)("p",{className:"notice caution small",children:eJ("task.newIntentNote")}),(0,a.jsx)(N.y,{readOnly:e9,scope:ss,onReadOnly:se,onScope:sn}),(0,a.jsxs)("div",{className:"row",style:{marginTop:8},children:[(0,a.jsx)("button",{className:"primary",onClick:()=>void(sh?sj():sd()),children:sh?eJ("task.saveAndRerun"):eJ("task.save")}),(0,a.jsx)("span",{className:"err",children:sr})]}),sh&&(0,a.jsx)("p",{className:"muted small",children:eJ("task.editRanWhy")})]}):(0,a.jsxs)(a.Fragment,{children:[(null!=(ey=null==(M=eU.checks)?void 0:M.length)?ey:0)>0&&(0,a.jsxs)("details",{className:"small",style:{margin:"6px 0"},children:[(0,a.jsxs)("summary",{children:[eJ("checks.title")," — ",eJ("checks.n",{n:null!=(ef=null==(W=eU.checks)?void 0:W.length)?ef:0}),(null!=(eb=null==(R=eU.checkResults)?void 0:R.length)?eb:0)>0&&" \xb7 ".concat((null!=(ek=eU.checkResults)?ek:[]).filter(e=>e.passed).length,"/").concat(null==(B=eU.checkResults)?void 0:B.length," ").concat(eJ("checks.passed"))]}),(0,a.jsx)("ul",{style:{margin:"6px 0",paddingLeft:20},children:(null!=(eN=eU.checks)?eN:[]).map((e,s)=>{var n;let t=(null!=(n=eU.checkResults)?n:[]).find(s=>s.name===e.name);return(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:e.name}),(0,a.jsxs)("span",{className:"muted",children:[" — ",eJ("checks.kind.".concat(e.expect)),e.value?' "'.concat(e.value,'"'):"",e.run?": ".concat(e.run):e.file?": ".concat(e.file):""]}),t&&(0,a.jsxs)("div",{className:t.passed?"muted":"reason",children:[t.passed?eJ("checks.passed"):eJ("checks.failed")," — ",t.detail]})]},"".concat(e.name,"-").concat(s))})})]}),(null!=(ew=null==(A=eU.reviewChecks)?void 0:A.length)?ew:0)>0&&(0,a.jsxs)("details",{className:"small",style:{margin:"6px 0"},children:[(0,a.jsx)("summary",{children:eJ("checks.fromReview",{n:null!=(eS=null==(O=eU.reviewChecks)?void 0:O.length)?eS:0})}),(0,a.jsx)("p",{className:"why",children:eJ("checks.fromReviewWhy")}),(0,a.jsx)("ul",{style:{margin:"6px 0",paddingLeft:20},children:(null!=(eC=eU.reviewChecks)?eC:[]).map(e=>{var s;let n=(null!=(s=eU.checkResults)?s:[]).find(s=>s.name===e.check.name);return(0,a.jsxs)("li",{children:[(0,a.jsx)("code",{children:e.findingId})," ",(0,a.jsx)("strong",{children:e.check.name}),"active"!==e.state&&(0,a.jsx)("span",{className:"chip",style:{marginLeft:6},children:eJ("checks.state.".concat(e.state))}),(0,a.jsx)("div",{className:"muted",children:e.what}),n&&(0,a.jsxs)("div",{className:n.passed?"muted":"reason",children:[n.passed?eJ("checks.passed"):eJ("checks.failed")," — ",n.detail]})]},e.check.name)})})]}),(0,a.jsx)(G,{review:eU.review}),eU.stopCode&&!(0,h.DG)(eU)&&(0,a.jsx)("p",{className:"small",children:(0,a.jsx)("span",{className:"chip",title:eJ("stop.why"),children:eJ("stop.".concat(eU.stopCode))})}),eU.handoff&&!(0,h.DG)(eU)&&(0,a.jsx)(D,{handoff:eU.handoff}),eU.summary&&(0,a.jsxs)("div",{className:"summary",children:[(0,a.jsx)("strong",{children:eJ("task.whatWasDone")}),(0,a.jsx)(j.s,{text:eU.summary})]}),(null!=(eF=null==(U=eU.deviations)?void 0:U.length)?eF:0)>0&&(0,a.jsx)(q,{items:null!=(eL=eU.deviations)?eL:[]}),(null!=(eT=null==(J=eU.disputes)?void 0:J.length)?eT:0)>0&&(0,a.jsx)(z,{items:null!=(eI=eU.disputes)?eI:[]}),eU.environment&&(0,a.jsx)("div",{className:"muted small",style:{margin:"4px 0"},children:eJ("task.ranWith",{node:eU.environment.node,npm:null!=(eH=eU.environment.npm)?eH:"—",git:null!=(eM=eU.environment.git)?eM:"—",pwsh:null!=(eP=null!=(eW=eU.environment.pwsh)?eW:eU.environment.powershell)?eP:"—"})}),(null!=(eR=null==(Z=eU.leftovers)?void 0:Z.length)?eR:0)>0&&(0,a.jsxs)("div",{className:"err small",style:{margin:"6px 0"},children:[eJ("task.leftovers",{n:null!=(eD=null==(_=eU.leftovers)?void 0:_.length)?eD:0}),(0,a.jsx)("ul",{style:{margin:"4px 0",paddingLeft:20},children:(null!=(eB=eU.leftovers)?eB:[]).map(e=>(0,a.jsxs)("li",{children:[(0,a.jsx)("code",{children:e.name})," pid ",e.pid,e.ports.length>0?" \xb7 ".concat(eJ("task.leftoverPorts",{ports:e.ports.join(", ")})):""," \xb7 ",e.by]},"".concat(e.by,"-").concat(e.pid)))})]}),eU.reason&&(0,a.jsx)("div",{className:"reason small",style:{margin:"6px 0"},children:eU.reason}),(null!=(eA=null==(K=eU.attempts)?void 0:K.length)?eA:0)>0&&(0,a.jsxs)("details",{children:[(0,a.jsx)("summary",{children:eJ("task.attempts",{n:null!=(eO=null==(Y=eU.attempts)?void 0:Y.length)?eO:0})}),null==(Q=eU.attempts)?void 0:Q.map((e,s)=>{var n,t,l,i;return(0,a.jsxs)("div",{className:"small",style:{margin:"8px 0 12px"},children:[(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("strong",{children:eJ("task.attemptN",{n:s+1})}),(0,a.jsx)("span",{className:"badge ".concat(e.status),children:eJ("status.".concat(e.status))}),e.iterations>0&&(0,a.jsx)("span",{className:"muted",children:eJ("task.iterations",{n:e.iterations})}),e.runId&&(0,a.jsx)(o.u,{label:eJ("save.attemptLog"),save:()=>c.FH.saveTaskLog(eE.id,eU.id,e.runId)}),e.runId&&(0,a.jsx)(o.H,{sessionId:eE.id,taskId:eU.id,attempt:s+1}),e.runId&&(null==(n=e.vcs)?void 0:n.commit)&&e.vcs.baseCommit&&(0,a.jsx)(y.C,{sessionId:eE.id,taskId:eU.id,runId:e.runId,title:"".concat(eU.title," — ").concat(eJ("task.attemptN",{n:s+1})),files:null!=(l=null==(t=e.vcs.files)?void 0:t.length)?l:0})]}),(0,a.jsxs)("div",{className:"muted",children:[e.startedAt?eJ("task.started",{t:eZ(e.startedAt)}):"",e.finishedAt?" \xb7 ".concat(eJ("task.finished",{t:eZ(e.finishedAt)})):""]}),e.summary&&(0,a.jsx)("div",{children:e.summary}),e.reason&&(0,a.jsx)("div",{className:"err",children:e.reason}),e.prompt&&e.prompt!==eU.prompt&&(0,a.jsxs)("details",{children:[(0,a.jsx)("summary",{children:eJ("task.attemptText")}),(0,a.jsx)("pre",{children:e.prompt})]})]},"".concat(null!=(i=e.runId)?i:s))})]}),"queued"===eU.status?(0,a.jsxs)("div",{style:{marginTop:8},children:[(0,a.jsx)("div",{className:"muted small",children:eJ("task.prompt")}),(0,a.jsx)("pre",{children:eU.prompt}),eU.level2.trim()?(0,a.jsxs)("details",{children:[(0,a.jsx)("summary",{children:eJ("task.l2Show",{n:eU.level2.trim().split("\n").length})}),(0,a.jsx)("pre",{children:eU.level2})]}):(0,a.jsx)("div",{className:"muted small",children:eJ("task.noL2")})]}):(0,a.jsxs)("details",{children:[(0,a.jsx)("summary",{children:eJ("task.promptAndL2")}),eU.level2.trim()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"muted small",children:eJ("task.l2")}),(0,a.jsx)("pre",{children:eU.level2})]}),(0,a.jsx)("div",{className:"muted small",children:eJ("task.prompt")}),(0,a.jsx)("pre",{children:eU.prompt})]}),eU.firstMessage&&(0,a.jsxs)("details",{children:[(0,a.jsx)("summary",{children:eJ("task.firstMessage")}),(0,a.jsx)("pre",{className:"tall",children:eU.firstMessage})]}),eU.runId&&(0,a.jsxs)("details",{onToggle:e=>e.currentTarget.open&&void sf(),children:[(0,a.jsx)("summary",{children:eJ("task.files")}),(0,a.jsx)("div",{className:"row small",style:{margin:"6px 0"},children:(0,a.jsx)(o.u,{label:eJ("save.log"),save:()=>c.FH.saveTaskLog(eE.id,eU.id)})}),sl&&(0,a.jsxs)("div",{className:"small",children:[sb("task.reports","reports",sl.reports),sb("task.artifacts","artifacts",sl.artifacts),sb("task.replies","replies",sl.replies)]})]}),eU.finalReply&&(0,a.jsxs)("details",{children:[(0,a.jsx)("summary",{children:eJ("task.finalReply")}),(0,a.jsx)("pre",{className:"tall",children:eU.finalReply})]})]})]})}function O(e){let{events:s}=e,{t:n}=(0,d.kj)(),{appearance:l}=(0,u.KP)(),i=(0,t.useRef)(null);return(0,t.useEffect)(()=>{!l.reduceMotion&&i.current&&(i.current.scrollTop=i.current.scrollHeight)},[s.length,l.reduceMotion]),(0,a.jsxs)("div",{className:"panel",children:[(0,a.jsx)("h2",{children:n("live.title")}),(0,a.jsxs)("div",{className:"log",ref:i,children:[0===s.length&&(0,a.jsx)("div",{className:"muted",children:n("live.none")}),s.map((e,s)=>{var n;return(0,a.jsxs)("div",{className:e.level,children:[(0,a.jsx)("span",{className:"time",children:new Date(e.at).toLocaleTimeString(void 0,{hour12:!1})}),null!=(n=e.message)?n:e.type]},s)})]})]})}function E(e){let{checks:s,onChange:n}=e,{t}=(0,d.kj)(),l=(e,a)=>n(s.map((s,n)=>e===n?{...s,...a}:s));return(0,a.jsxs)("div",{style:{marginTop:12},children:[(0,a.jsx)("label",{children:t("checks.title")}),(0,a.jsx)("p",{className:"why",style:{marginTop:0},children:t("checks.why")}),0===s.length&&(0,a.jsx)("p",{className:"muted small",children:t("checks.noneWhy")}),s.map((e,i)=>{var r,d,o,h;return(0,a.jsxs)("div",{className:"option",children:[(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("input",{type:"text",className:"grow",value:e.name,placeholder:t("checks.namePlaceholder"),onChange:e=>l(i,{name:e.target.value}),"aria-label":t("checks.name")}),(0,a.jsx)("select",{value:e.expect,onChange:e=>l(i,{expect:e.target.value}),"aria-label":t("checks.kind"),style:{width:"auto"},children:c.FZ.map(e=>(0,a.jsx)("option",{value:e,children:t("checks.kind.".concat(e))},e))}),(0,a.jsx)("button",{className:"quiet",onClick:()=>n(s.filter((e,s)=>s!==i)),children:t("checks.remove")})]}),(0,a.jsxs)("div",{className:"row",style:{marginTop:6},children:[(0,c.rt)(e.expect)?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("input",{type:"text",className:"grow",value:null!=(r=e.run)?r:"",placeholder:t("checks.run"),onChange:e=>l(i,{run:e.target.value}),"aria-label":t("checks.run")}),(0,a.jsx)("input",{type:"text",value:null!=(d=e.cwd)?d:"",placeholder:t("checks.cwd"),onChange:e=>l(i,{cwd:e.target.value}),"aria-label":t("checks.cwd"),style:{width:220}})]}):(0,a.jsx)("input",{type:"text",className:"grow",value:null!=(o=e.file)?o:"",placeholder:t("checks.file"),onChange:e=>l(i,{file:e.target.value}),"aria-label":t("checks.file")}),(0,c.dK)(e.expect)&&(0,a.jsx)("input",{type:"text",value:null!=(h=e.value)?h:"",placeholder:"output-matches"===e.expect?t("checks.valueRegex"):t("checks.value"),onChange:e=>l(i,{value:e.target.value}),"aria-label":t("checks.value"),style:{width:240}})]})]},i)}),(0,a.jsx)("button",{onClick:()=>n([...s,{name:"",expect:"exit-zero",run:""}]),children:t("checks.add")})]})}function U(e){let{tasks:s}=e,{t:n}=(0,d.kj)(),t=(0,h.hH)(s),l=(0,m.c)(!!t&&t.tasks.some(h.DG));if(!t)return null;let i=(0,h.eZ)(t.run,t.tasks,l);return(0,a.jsx)("p",{className:"muted small",style:{margin:"4px 0 10px"},children:n(i.live?"session.runClockLive":"session.runClock",{n:i.tasks,d:(0,c.c5)(i.ms)})})}function q(e){let{items:s}=e,{t:n}=(0,d.kj)();return(0,a.jsxs)("div",{className:"summary",children:[(0,a.jsx)("strong",{children:n("task.deviations",{n:s.length})}),(0,a.jsx)("ol",{style:{margin:"6px 0",paddingLeft:20},children:s.map((e,s)=>(0,a.jsxs)("li",{style:{marginBottom:6},children:[(0,a.jsx)("div",{children:e.instruction}),(0,a.jsxs)("div",{className:"muted",children:[n("task.deviationDid"),": ",e.did]}),(0,a.jsxs)("div",{className:"muted",children:[n("task.deviationWhy"),": ",e.why]})]},s))})]})}function z(e){let{items:s}=e,{t:n}=(0,d.kj)();return(0,a.jsxs)("div",{className:"summary",children:[(0,a.jsx)("strong",{children:n("task.disputes",{n:s.length})}),(0,a.jsx)("ol",{style:{margin:"6px 0",paddingLeft:20},children:s.map((e,s)=>(0,a.jsxs)("li",{style:{marginBottom:6},children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("code",{children:e.finding})," — ",e.why]}),(0,a.jsxs)("div",{className:"muted",children:[n("review.evidence"),": ",e.evidence]})]},s))})]})}function G(e){var s,n,t,l,i;let{review:r}=e,{t:c}=(0,d.kj)();if(!r)return null;if("skipped"===r.verdict)return r.skippedBecause?(0,a.jsx)("p",{className:"muted small",children:c("review.skippedWhy",{why:r.skippedBecause})}):null;let o="pass"===r.verdict?"done":"fail"===r.verdict?"blocked":"waiting-approval";return(0,a.jsxs)("div",{className:"small",style:{margin:"8px 0"},children:[(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("span",{className:"badge ".concat(o),children:c("review.verdict.".concat(r.verdict))}),r.stepsRun>0&&(0,a.jsx)("span",{className:"muted",children:c("review.ran",{n:r.stepsRun})}),r.rounds>1&&(0,a.jsx)("span",{className:"muted",children:c("review.rounds",{n:r.rounds})}),r.model&&(0,a.jsx)("span",{className:"chip",children:c("review.onModel",{model:r.model})})]}),r.problem&&(0,a.jsx)("p",{className:"reason",children:c("review.problem",{problem:r.problem})}),r.summary&&(0,a.jsx)(j.s,{text:r.summary}),(null!=(t=null==(s=r.findings)?void 0:s.length)?t:0)>0&&(0,a.jsxs)("details",{style:{marginTop:4},children:[(0,a.jsx)("summary",{children:c("review.findings",{n:null!=(l=null==(n=r.findings)?void 0:n.length)?l:0})}),(0,a.jsx)("ol",{style:{margin:"6px 0",paddingLeft:20},children:(null!=(i=r.findings)?i:[]).map((e,s)=>(0,a.jsxs)("li",{style:{marginBottom:8},children:[(0,a.jsxs)("div",{children:[e.id&&(0,a.jsx)("code",{style:{marginRight:6},children:e.id}),e.what,"task"===e.about&&(0,a.jsx)("span",{className:"chip",style:{marginLeft:6},children:c("review.aboutTask")}),e.repeated&&(0,a.jsx)("span",{className:"chip",style:{marginLeft:6},children:c("review.repeated")})]}),e.where&&(0,a.jsx)("div",{className:"muted",children:e.where}),(0,a.jsxs)("div",{className:"muted",children:[c("review.evidence"),": ",e.evidence]})]},s))})]})]})}},4784:(e,s,n)=>{"use strict";n.d(s,{Y:()=>r});var a=n(3365),t=n(1521),l=n(5549),i=n(867);function r(e){var s,n;let{id:r,chosen:c,onChange:d,none:o,catalogue:h,disabled:m=!1,style:u}=e,{t:p}=(0,i.kj)(),v=function(e){let[s,n]=(0,t.useState)(null);return(0,t.useEffect)(()=>{if(void 0!==e)return;let s=!0;return l.FH.models().then(e=>{s&&n(e)}).catch(()=>void 0),()=>{s=!1}},[e]),void 0!==e?e:s}(h),x=null!=(s=null==v?void 0:v.options)?s:[],j=x.some(e=>e.name===c),g=x.filter(e=>!e.group),y=new Map;for(let e of x)e.group&&y.set(e.group,[...null!=(n=y.get(e.group))?n:[],e]);return(0,a.jsxs)("select",{id:r,value:c,onChange:e=>d(e.target.value),disabled:m,style:{width:"auto",minWidth:280,...u},children:[(0,a.jsx)("option",{value:"",children:o}),c&&!j&&(0,a.jsx)("option",{value:c,children:p("model.notInList",{name:c})}),g.map(e=>(0,a.jsxs)("option",{value:e.name,disabled:e.disabled,children:[e.name,e.disabled?" — ".concat(p("model.unavailable")):""]},e.name)),[...y.entries()].map(e=>{let[s,n]=e;return(0,a.jsx)("optgroup",{label:s,children:n.map(e=>(0,a.jsxs)("option",{value:e.name,disabled:e.disabled,children:[e.name,e.disabled?" — ".concat(p("model.unavailable")):""]},e.name))},s)})]})}},8848:(e,s,n)=>{"use strict";n.d(s,{H4:()=>d,L:()=>o,z4:()=>h});var a=n(3365),t=n(8197),l=n.n(t),i=n(1521),r=n(5549),c=n(867);function d(e){let{current:s,onUse:n}=e,{t}=(0,c.kj)(),[l,d]=(0,i.useState)(null);if((0,i.useEffect)(()=>{let e=!1;return r.FH.project().then(s=>{e||d(s)}).catch(()=>void 0),()=>{e=!0}},[]),!l)return null;let o=l.rootDir.trim(),h=s.trim().toLowerCase(),m=n?l.others.filter(e=>e.rootDir.trim().toLowerCase()!==h):[];return(0,a.jsx)(u,{label:o?t("proj.defaultIs",{dir:o}):t("proj.noneShort"),offer:o&&n&&h!==o.toLowerCase()?{text:t("proj.useIt"),onUse:()=>n(o)}:void 0,more:m.map(e=>({text:t("proj.otherUse",{name:e.name}),title:e.rootDir,onUse:()=>null==n?void 0:n(e.rootDir)})),link:o?t("proj.change"):t("proj.setIt"),anchor:"project"})}function o(e){let{current:s,onUse:n}=e,t=m(),{t:l}=(0,c.kj)();if(!t)return null;let i=t.defaultModel.trim();return(0,a.jsx)(u,{label:i?l("def.modelDefaultIs",{name:i}):l("def.modelNoneShort"),offer:i&&n&&s.trim()!==i?{text:l("def.modelUseIt"),onUse:()=>n(i)}:void 0,link:l(i?"proj.change":"proj.setIt"),anchor:"model"})}function h(e){let{current:s,onUse:n}=e,t=m(),{t:l}=(0,c.kj)();if(!t)return null;let i=t.defaultReviewModel.trim();return(0,a.jsx)(u,{label:i?l("def.reviewDefaultIs",{name:i}):l("def.reviewNoneShort"),offer:i&&n&&s.trim()!==i?{text:l("def.modelUseIt"),onUse:()=>n(i)}:void 0,link:l(i?"proj.change":"proj.setIt"),anchor:"review"})}function m(){let[e,s]=(0,i.useState)(null);return(0,i.useEffect)(()=>{let e=!1;return r.FH.models().then(n=>{e||s(n)}).catch(()=>void 0),()=>{e=!0}},[]),e}function u(e){let{label:s,offer:n,more:t=[],link:i,anchor:r}=e;return(0,a.jsxs)("p",{className:"muted small",style:{marginTop:4},children:[s," ",n&&(0,a.jsxs)(a.Fragment,{children:["\xb7"," ",(0,a.jsx)("button",{type:"button",className:"linkish",onClick:n.onUse,children:n.text})," "]}),t.map(e=>(0,a.jsxs)("span",{children:["\xb7"," ",(0,a.jsx)("button",{type:"button",className:"linkish",onClick:e.onUse,title:e.title,children:e.text})," "]},e.text)),"\xb7 ",(0,a.jsx)(l(),{href:"/defaults#".concat(r),children:i})]})}}},e=>{e.O(0,[197,867,549,36,347,131,358],()=>e(e.s=1772)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- :root{--bg:#fdf7f0;--bg-tint:#f7ead9;--panel:#fffdfb;--ink:#241a13;--muted:#7a6656;--line:#ecdcc9;--line-strong:#d8c3a9;--accent:#b4500b;--accent-ink:#fffaf5;--accent-soft:#fbe9d8;--ok:#2a6b45;--ok-soft:#e4f1e7;--warn:#8f5500;--warn-soft:#fbedd6;--bad:#a8271c;--bad-soft:#fbe6e2;--code:#f9efe3;--shadow:0 1px 2px rgba(74,45,20,0.06),0 6px 18px rgba(74,45,20,0.05);--radius:12px;--scale:1;--mono:ui-monospace,Consolas,"Cascadia Mono",monospace;--focus-width:2px}:root[data-theme=dark]{--bg:#17120f;--bg-tint:#221a15;--panel:#221b16;--ink:#f2e8df;--muted:#b6a493;--line:#3a2e26;--line-strong:#52412f;--accent:#ff9f45;--accent-ink:#2b1705;--accent-soft:#35251a;--ok:#7ed39f;--ok-soft:#1e2b22;--warn:#f0b96e;--warn-soft:#2f2417;--bad:#ff9081;--bad-soft:#33201d;--code:#1d1713;--shadow:0 1px 2px rgba(0,0,0,0.3),0 8px 24px rgba(0,0,0,0.25)}:root[data-contrast=high]{--ink:#000000;--muted:#4a3a2c;--line:#a88d6c;--line-strong:#6b5236;--accent:#8f3c00;--panel:#ffffff;--bg:#fff9f2;--ok:#17512f;--warn:#6b3f00;--bad:#8a1a11;--shadow:none}:root[data-theme=dark][data-contrast=high]{--ink:#ffffff;--muted:#e0cfbd;--line:#7d6650;--line-strong:#a88a6a;--accent:#ffc27a;--panel:#100c09;--bg:#000000;--code:#0a0705;--ok:#9ff0bd;--warn:#ffd08f;--bad:#ffb0a2;--shadow:none}:root[data-textsize=small]{--scale:0.9}:root[data-textsize=large]{--scale:1.12}:root[data-textsize=huge]{--scale:1.28}:root[data-textsize=giant]{--scale:1.45}:root[data-focus=strong]{--focus-width:4px}*{box-sizing:border-box}body,html{margin:0;background:var(--bg);color:var(--ink);font:calc(15px * var(--scale)) /1.55 system-ui,-apple-system,Segoe UI,sans-serif}a{color:var(--accent);text-decoration:none}:root[data-links=underline] a,a:hover{text-decoration:underline}:focus-visible{outline:var(--focus-width) solid var(--accent);outline-offset:2px;border-radius:4px}:root[data-motion=reduced] *,:root[data-motion=reduced] :after,:root[data-motion=reduced] :before{transition:none!important;animation:none!important;scroll-behavior:auto!important}@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}.skip-link{position:absolute;left:-9999px;top:0;background:var(--accent);color:var(--accent-ink);padding:10px 16px;border-radius:0 0 var(--radius) 0;z-index:10}.skip-link:focus{left:0}.wrap{max-width:calc(1100px * var(--scale));margin:0 auto;padding:24px 16px 80px}.top{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:20px;padding-bottom:14px;border-bottom:1px solid var(--line)}.top h1{font-size:calc(21px * var(--scale));margin:0;letter-spacing:-.01em}.top h1 a{color:var(--accent)}.top nav{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.top nav a{color:var(--muted);padding:6px 10px;border-radius:999px;font-size:calc(14px * var(--scale))}.top nav a:hover{text-decoration:none}.top nav a:hover,.top nav a[aria-current=page]{background:var(--accent-soft);color:var(--accent)}.top nav a[aria-current=page]{font-weight:600}.top nav a .live{display:inline-flex;align-items:center;gap:4px;margin-left:6px;padding:0 6px 0 4px;border-radius:999px;background:var(--ok-soft,var(--accent-soft));color:var(--ok,var(--accent));font-size:calc(10.5px * var(--scale));font-weight:700;letter-spacing:.04em;text-transform:uppercase;vertical-align:middle}.top nav a .live .dot{width:6px;height:6px;border-radius:50%;background:currentColor;animation:live-pulse 1.6s ease-in-out infinite}@keyframes live-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.75)}}.crumbs{color:var(--muted);font-size:calc(13px * var(--scale));margin-bottom:8px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:18px;margin-bottom:16px;box-shadow:var(--shadow)}.panel h2{font-size:calc(16px * var(--scale));margin:0 0 10px}.panel h3{font-size:calc(13px * var(--scale));margin:16px 0 6px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.05em}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.grow{flex:1 1 auto}.muted{color:var(--muted)}.small{font-size:calc(13px * var(--scale))}input[type=number],input[type=text],select,textarea{width:100%;background:var(--code);color:var(--ink);border:1px solid var(--line-strong);border-radius:9px;padding:9px 11px;font:inherit}input[type=number]:focus,input[type=text]:focus,select:focus,textarea:focus{border-color:var(--accent)}textarea{min-height:110px;resize:vertical;font-family:var(--mono);font-size:calc(13px * var(--scale));line-height:1.5}textarea.prose{font-family:inherit;font-size:calc(14px * var(--scale))}label{display:block;font-size:calc(13px * var(--scale));color:var(--muted);margin:12px 0 4px}input[type=checkbox],input[type=radio]{accent-color:var(--accent);width:calc(16px * var(--scale));height:calc(16px * var(--scale))}.option{border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:8px 0;background:var(--bg)}.option>label{display:flex;align-items:flex-start;gap:10px;margin:0;color:var(--ink);font-size:calc(14px * var(--scale));cursor:pointer}.option>label input{margin-top:3px;flex:none}.option .why{margin:6px 0 0 26px;color:var(--muted);font-size:calc(12.5px * var(--scale))}.option.warned{border-color:var(--warn);background:var(--warn-soft)}button{background:var(--panel);color:var(--ink);border:1px solid var(--line-strong);border-radius:9px;padding:8px 13px;font:inherit;cursor:pointer;transition:background .12s ease,border-color .12s ease}button:hover:not(:disabled){border-color:var(--accent);background:var(--accent-soft)}button.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent);font-weight:600}button.primary:hover:not(:disabled){background:var(--accent);filter:brightness(1.08)}button.danger{color:var(--bad);border-color:var(--bad)}button.danger:hover:not(:disabled){background:var(--bad-soft);border-color:var(--bad)}button.quiet{border-color:transparent;background:transparent;color:var(--muted)}button.quiet:hover:not(:disabled){color:var(--accent)}button:disabled{opacity:.45;cursor:not-allowed}.badge{display:inline-block;font-size:calc(12px * var(--scale));padding:2px 9px;border-radius:999px;border:1px solid var(--line-strong);color:var(--muted);white-space:nowrap;max-width:100%;overflow-wrap:anywhere}@media (max-width:600px){.badge{white-space:normal}}.badge.running{color:var(--accent);border-color:var(--accent);background:var(--accent-soft)}.badge.waiting-approval{color:var(--warn);border-color:var(--warn);background:var(--warn-soft)}.badge.done{color:var(--ok);border-color:var(--ok);background:var(--ok-soft)}.badge.blocked{color:var(--warn);border-color:var(--warn);background:var(--warn-soft)}.badge.aborted,.badge.failed,.badge.limit-reached{color:var(--bad);border-color:var(--bad);background:var(--bad-soft)}pre{background:var(--code);border:1px solid var(--line);border-radius:9px;padding:10px 12px;overflow:auto;font-family:var(--mono);font-size:calc(12.5px * var(--scale));line-height:1.5;margin:6px 0;white-space:pre-wrap;word-break:break-word}pre.tall{max-height:420px}details>summary{cursor:pointer;color:var(--muted);font-size:calc(13px * var(--scale));-webkit-user-select:none;-moz-user-select:none;user-select:none}details>summary:hover{color:var(--accent)}details[open]>summary{margin-bottom:6px}.task{border-left:4px solid var(--line-strong);padding-left:14px;margin-bottom:18px}.task.done{border-left-color:var(--ok)}.task.running,.task.waiting-approval{border-left-color:var(--accent)}.task.blocked{border-left-color:var(--warn)}.task.aborted,.task.failed,.task.limit-reached{border-left-color:var(--bad)}.task h4{margin:0 0 4px;font-size:calc(15px * var(--scale))}.task:target{background:var(--accent-soft);border-radius:0 10px 10px 0;padding:8px 8px 8px 14px}.summary{background:var(--ok-soft);border:1px solid var(--ok);border-radius:9px;padding:10px 12px;margin:8px 0;white-space:pre-wrap}.reason{color:var(--bad)}.approval{background:var(--warn-soft);border:2px solid var(--warn);border-radius:var(--radius);padding:12px 14px;margin-bottom:14px;position:-webkit-sticky;position:sticky;top:8px;z-index:2}.approval code{font-size:calc(13px * var(--scale))}.approval code,.log{font-family:var(--mono)}.log{font-size:calc(12.5px * var(--scale));max-height:320px;overflow:auto;background:var(--code);border:1px solid var(--line);border-radius:9px;padding:8px 10px}.log div{white-space:pre-wrap;word-break:break-word}.log .warn{color:var(--warn)}.log .error{color:var(--bad)}.log .time{color:var(--muted);margin-right:8px}table{width:100%;border-collapse:collapse}td,th{text-align:left;padding:9px 6px;border-bottom:1px solid var(--line);font-size:calc(14px * var(--scale));vertical-align:top}th{color:var(--muted);font-weight:700;font-size:calc(12px * var(--scale));text-transform:uppercase;letter-spacing:.04em}.err{color:var(--bad);font-size:calc(13px * var(--scale))}.notice{border:1px solid var(--bad);background:var(--bad-soft);color:var(--ink);border-radius:10px;padding:10px 12px;margin:10px 0;font-size:calc(13.5px * var(--scale))}.notice strong{color:var(--bad)}.notice ul{margin:6px 0 0;padding-left:20px}.notice.caution{border-color:var(--warn);background:var(--warn-soft)}.notice.caution strong{color:var(--warn)}.notice.calm{border-color:var(--line-strong);background:var(--bg-tint)}.notice.calm strong{color:var(--ink)}.counts{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:4px}.count{border:1px solid var(--line);border-radius:10px;padding:10px 14px;min-width:96px;background:var(--bg)}.count .n{font-size:calc(22px * var(--scale));font-weight:700;line-height:1.2}.count .k{color:var(--muted);font-size:calc(12px * var(--scale));text-transform:uppercase;letter-spacing:.04em}.count.done .n{color:var(--ok)}.count.failed .n{color:var(--bad)}.count.running .n{color:var(--accent)}.attempts{list-style:none;margin:6px 0 0;padding:0 0 0 12px;border-left:2px solid var(--line)}.attempts>li{margin:0 0 10px}.attempts .head{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}.attempts .when{color:var(--muted);font-size:calc(12.5px * var(--scale))}.attempts .what{margin:4px 0 0}.count.queued .n{color:var(--accent)}.flow{list-style:none;margin:8px 0 0;padding:0}.flow>li{position:relative;padding:10px 0 14px 28px;border-left:2px solid var(--line);margin-left:7px}.flow>li:last-child{border-left-color:transparent}.flow>li:before{content:"";position:absolute;left:-9px;top:16px;width:16px;height:16px;border-radius:50%;background:var(--panel);border:3px solid var(--line-strong)}.flow>li.done:before{border-color:var(--ok);background:var(--ok)}.flow>li.running:before,.flow>li.waiting-approval:before{border-color:var(--accent);background:var(--accent)}.flow>li.aborted:before,.flow>li.failed:before,.flow>li.limit-reached:before{border-color:var(--bad);background:var(--bad)}.flow>li.queued:before{border-color:var(--line-strong);background:var(--panel)}.flow>li.next:before{border-color:var(--accent);background:var(--panel);box-shadow:0 0 0 4px var(--accent-soft)}.flow .when{color:var(--muted);font-size:calc(12.5px * var(--scale))}.flow .what{margin:4px 0 0}.flow .head{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}.flow .head strong{font-size:calc(14.5px * var(--scale))}.chip{display:inline-block;border:1px solid var(--line);border-radius:999px;padding:1px 9px;font-size:calc(12px * var(--scale));color:var(--muted);background:var(--bg-tint)}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:10px}.toolbar input[type=text],.toolbar select{width:auto;min-width:150px}.segmented{display:inline-flex;flex-wrap:wrap;max-width:100%;border:1px solid var(--line-strong);border-radius:9px;overflow:hidden}.segmented button{border:none;border-radius:0;border-right:1px solid var(--line)}.segmented button:last-child{border-right:none}.segmented button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);font-weight:600}.button-link{display:inline-block;background:var(--accent);color:var(--accent-ink);border:1px solid var(--accent);border-radius:9px;padding:8px 13px;font:inherit;font-weight:600;cursor:pointer;text-decoration:none}.button-link:hover{filter:brightness(1.08);text-decoration:none}.button-link+.button-link{background:var(--panel);color:var(--ink);border-color:var(--line-strong);font-weight:400}.button-link+.button-link:hover{background:var(--accent-soft);border-color:var(--accent);filter:none}.button-link.plain{background:var(--panel);color:var(--ink);border-color:var(--line-strong);font-weight:400}.button-link.quiet{background:transparent;color:var(--muted);border-color:transparent;font-weight:400}.button-link.plain:hover,.button-link.quiet:hover{background:var(--accent-soft);border-color:var(--accent);color:var(--accent);filter:none}.empty{color:var(--muted);padding:14px 0}.visually-hidden{position:absolute;-webkit-clip-path:inset(50%);clip-path:inset(50%);width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.dropzone{border:2px dashed var(--line-strong);border-radius:12px;padding:10px;background:var(--bg-tint)}.dropzone.active{border-color:var(--accent);background:var(--accent-soft)}.dropzone textarea{margin:0}.dropzone p{margin:8px 2px 2px}.batch-row td{vertical-align:middle}.batch-row.running{background:var(--accent-soft)}.run-order{list-style:decimal;margin:10px 0 4px;padding-left:28px}.run-order li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:3px 0}.run-order button{padding:2px 8px;margin-left:4px}.linkish{background:none;border:0;padding:0;margin:0;color:var(--accent);font:inherit;cursor:pointer;text-decoration:underline}.linkish:hover{filter:brightness(1.15)}.run-choice{display:flex;gap:20px;flex-wrap:wrap;margin:12px 0 4px}.run-choice>div{flex:1 1 280px}.run-choice .why{margin:6px 2px 0}.rich>:first-child{margin-top:0}.rich>:last-child{margin-bottom:0}.rich p{margin:0 0 8px;max-width:76ch}.rich ul{margin:0 0 8px;padding-left:20px}.rich li{margin:2px 0;max-width:74ch}.rich code{font-family:var(--mono);font-size:.92em;background:var(--bg-tint);border:1px solid var(--line);border-radius:5px;padding:0 4px;word-break:break-word}.rich pre{margin:6px 0 8px}.summary .rich{white-space:normal}select{-moz-appearance:none;appearance:none;-webkit-appearance:none;padding-right:34px;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");background-repeat:no-repeat;background-position:right 12px center;cursor:pointer}select:disabled{cursor:not-allowed;opacity:.6}select optgroup,select option{background:var(--panel);color:var(--ink)}.top nav a{display:inline-flex;align-items:center;gap:6px}.top nav a .nav-icon{flex:none;opacity:.85}.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;padding:16px;z-index:50}.modal{background:var(--panel);color:var(--ink);border:1px solid var(--line-strong);border-radius:var(--radius);box-shadow:0 20px 60px rgba(0,0,0,.35);width:min(560px,100%);max-height:calc(100vh - 32px);overflow:auto;padding:18px 20px}.modal h2{margin:0 0 10px;font-size:calc(16px * var(--scale))}.modal.danger h2{color:var(--bad)}.modal-body{white-space:pre-wrap;line-height:1.5;font-size:calc(14px * var(--scale))}.modal-actions{justify-content:flex-end;margin-top:16px}.panel{overflow-wrap:break-word}td,th{position:relative}@media (max-width:600px){.wrap{padding:12px 10px 60px}.top{gap:8px;margin-bottom:12px;padding-bottom:10px}.top h1{font-size:calc(18px * var(--scale))}.top nav{width:100%;flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:4px;scrollbar-width:none}.top nav::-webkit-scrollbar{display:none}.top nav a{flex:none;padding:6px 9px;font-size:calc(13px * var(--scale))}.panel{padding:12px}.row{gap:8px}.row>input[type=text],.row>select,.row>textarea,.toolbar input[type=text],.toolbar select,.toolbar>div{width:100%;min-width:0;flex:1 1 100%}.row>button{flex:1 1 auto}select{min-width:0!important;width:100%}table{display:block;overflow-x:auto;white-space:nowrap}.counts{gap:6px}.count{flex-grow:1;flex-shrink:1;flex-basis:calc(50% - 6px)}.segmented{display:flex;width:100%}.segmented button{flex:1 1 auto}.flow>li{padding-left:18px}.modal{padding:14px}.log,pre{font-size:calc(12px * var(--scale))}}tr.inactive td{opacity:.6}tr.inactive td:first-child{opacity:1}.chip.inactive{color:var(--warn);border-color:var(--warn)}.story-when{color:var(--muted);font-size:calc(12px * var(--scale));font-feature-settings:"tnum";font-variant-numeric:tabular-nums;white-space:nowrap}.sync-cmd{white-space:pre-wrap;overflow-wrap:anywhere}.table-scroll{overflow-x:auto}.metrics td:not(:first-child),.metrics th:not(:first-child){white-space:nowrap}.handoff .handoff-row{margin:4px 0;overflow-wrap:anywhere}.handoff .handoff-row ul{margin:2px 0 0;padding-left:20px}.run-fold{border-top:1px solid var(--line);padding:8px 0 4px}.run-fold:first-of-type{border-top:none}.run-fold>summary{cursor:pointer;list-style:none}.run-fold>summary::-webkit-details-marker{display:none}.run-fold>summary:before{content:"▸";display:inline-block;width:16px;color:var(--muted);transition:transform .15s}.run-fold[open]>summary:before{transform:rotate(90deg)}.run-fold>summary .run-heading{display:inline-block;width:calc(100% - 16px);vertical-align:top}.run-heading h2{font-size:calc(15px * var(--scale))}.exports{white-space:nowrap}@media (max-width:600px){.exports{white-space:normal}}.modal.wide{width:min(820px,100%)}.story-box{margin-top:8px;border:1px solid var(--line);border-radius:var(--radius);padding:10px 12px;background:var(--code)}.story{list-style:none;margin:6px 0;padding:0}.story>li{border-left:3px solid var(--line-strong);padding:6px 10px;margin:6px 0}.story>li.sent{border-left-color:var(--accent)}.story>li.reply{border-left-color:var(--ok)}.story>li.story-step{border-left-color:var(--muted)}.story>li.failed{border-left-color:var(--bad);background:var(--bad-soft)}.story>li.story-review{border-left-color:var(--warn)}.story-head{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:calc(13px * var(--scale))}.story-cmd{margin:4px 0;color:var(--ink)}.story-cmd,.story-out{white-space:pre-wrap;word-break:break-word;font-size:calc(12px * var(--scale))}.story-out{margin:4px 0 0;max-height:420px;overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:8px}.story-out.always{max-height:260px}.story-scroll.live{max-height:65vh;overflow:auto;overscroll-behavior:contain}.story-out.terminal{max-height:45vh;overscroll-behavior:contain}.diff-overlay{position:fixed;inset:0;z-index:100;background:var(--bg);display:flex;flex-direction:column}.diff-head{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:10px 16px;border-bottom:1px solid var(--line);background:var(--panel)}.diff-head h2{margin:0;font-size:calc(16px * var(--scale))}.diff-body{flex:1 1;min-height:0;display:grid;grid-template-columns:minmax(220px,300px) 1fr}.diff-files{overflow:auto;border-right:1px solid var(--line);padding:6px;background:var(--panel)}.diff-file{display:flex;gap:6px;align-items:baseline;width:100%;text-align:left;border:0;border-radius:6px;background:none;padding:5px 6px;font-size:calc(12px * var(--scale));cursor:pointer}.diff-file:hover{background:var(--bg-tint)}.diff-file.on{background:var(--accent-soft)}.diff-path{flex:1 1;min-width:0;overflow-wrap:anywhere}.diff-counts{white-space:nowrap;font-family:var(--mono);font-size:calc(11px * var(--scale))}.diff-counts .plus{color:var(--ok)}.diff-counts .minus{color:var(--bad)}.diff-status{font-family:var(--mono);font-weight:700;width:1.2em;text-align:center;border-radius:4px}.diff-status.s-A{color:var(--ok)}.diff-status.s-D{color:var(--bad)}.diff-status.s-M{color:var(--warn)}.diff-status.s-C,.diff-status.s-R{color:var(--accent)}.diff-main{display:flex;flex-direction:column;min-width:0;min-height:0}.diff-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:6px 12px;border-bottom:1px solid var(--line)}.diff-name{font-family:var(--mono);font-size:calc(12px * var(--scale));overflow-wrap:anywhere}.diff-scroll{flex:1 1;overflow:auto;overscroll-behavior:contain}.diff-table{width:100%;border-collapse:collapse;table-layout:fixed;font-family:var(--mono);font-size:calc(12px * var(--scale))}.diff-table col.num{width:calc(52px * var(--scale))}.diff-table thead th{position:-webkit-sticky;position:sticky;top:0;z-index:1;background:var(--panel);border-bottom:1px solid var(--line);text-align:left;padding:4px 8px;font-family:inherit}.diff-table td{padding:0 8px;vertical-align:top;line-height:1.5}.diff-table td.num{text-align:right;color:var(--muted);-webkit-user-select:none;-moz-user-select:none;user-select:none;border-right:1px solid var(--line)}.diff-table td.code{white-space:pre-wrap;overflow-wrap:anywhere}.diff-table.nowrap td.code{white-space:pre;overflow-wrap:normal}.diff-table.nowrap{width:max-content;min-width:100%}.diff-row.change td.l,.diff-row.del td.l{background:var(--bad-soft)}.diff-row.add td.r,.diff-row.change td.r{background:var(--ok-soft)}.diff-row mark{background:color-mix(in srgb,currentColor 22%,transparent);color:inherit;border-radius:2px}.diff-row td.empty{background:repeating-linear-gradient(135deg,transparent 0 6px,var(--bg-tint) 6px 12px)}.diff-row.current td.num{box-shadow:inset 3px 0 0 var(--accent)}.diff-gap td{background:var(--bg-tint);text-align:center;padding:2px}@media (max-width:760px){.diff-body{grid-template-columns:1fr;grid-template-rows:auto 1fr}.diff-files{max-height:30vh;border-right:0;border-bottom:1px solid var(--line)}}.scroll-jump{position:fixed;right:16px;bottom:24px;display:flex;flex-direction:column;gap:8px;z-index:40}.scroll-jump button{width:calc(42px * var(--scale));height:calc(42px * var(--scale));border-radius:50%;padding:0;font-size:calc(20px * var(--scale));line-height:1;box-shadow:0 2px 8px rgba(0,0,0,.18)}.story-notes{margin:4px 0;font-size:calc(13px * var(--scale))}.story-fixed{padding:8px 10px;border-radius:8px;background:var(--panel);border:1px solid var(--line);margin:6px 0}.story-fixed.close{border-color:var(--ok)}.story-fixed.close.failed{border-color:var(--bad);background:var(--bad-soft)}.option-inline{gap:6px}.option-inline,.story-box .live{display:inline-flex;align-items:center}.story-box .live{gap:4px;color:var(--ok);font-size:calc(11px * var(--scale));font-weight:700;text-transform:uppercase}.story-box .live .dot,button .dot{width:6px;height:6px;border-radius:50%;background:currentColor;animation:live-pulse 1.6s ease-in-out infinite}button .dot{display:inline-block;margin-right:6px;vertical-align:middle}.info-dot{width:calc(18px * var(--scale));height:calc(18px * var(--scale));min-width:calc(18px * var(--scale));padding:0;border-radius:50%;font-size:calc(11px * var(--scale));font-style:italic;font-weight:700;line-height:1}.info-panel{flex-basis:100%;margin-top:6px}.info-panel dl{margin:6px 0 0}.info-panel dt{font-weight:600;margin-top:6px}.info-panel dd{margin:0 0 0 14px;opacity:.85}.flow .head .pick{margin:0 2px 0 0;flex:0 0 auto}.chip.inside{font-size:calc(10.5px * var(--scale));opacity:.85}.chip.inside.out{color:var(--bad);border-color:var(--bad)}.approval-banner{position:-webkit-sticky;position:sticky;top:0;z-index:30;background:var(--warn-soft);border:3px solid var(--warn);border-radius:var(--radius);padding:12px 14px 2px;margin:0 0 16px;box-shadow:0 6px 18px rgba(0,0,0,.18);max-height:min(70vh,calc(30rem * var(--scale)));overflow:auto}.approval-banner h2{margin:0 0 4px;color:var(--warn)}.approval-banner .approval{position:static;background:var(--bg);margin-bottom:10px}.approval-banner .approval button{font-size:calc(15px * var(--scale));padding:8px 14px}
1
+ :root{--bg:#fdf7f0;--bg-tint:#f7ead9;--panel:#fffdfb;--ink:#241a13;--muted:#7a6656;--line:#ecdcc9;--line-strong:#d8c3a9;--accent:#b4500b;--accent-ink:#fffaf5;--accent-soft:#fbe9d8;--ok:#2a6b45;--ok-soft:#e4f1e7;--warn:#8f5500;--warn-soft:#fbedd6;--bad:#a8271c;--bad-soft:#fbe6e2;--code:#f9efe3;--shadow:0 1px 2px rgba(74,45,20,0.06),0 6px 18px rgba(74,45,20,0.05);--radius:12px;--scale:1;--mono:ui-monospace,Consolas,"Cascadia Mono",monospace;--focus-width:2px}:root[data-theme=dark]{--bg:#17120f;--bg-tint:#221a15;--panel:#221b16;--ink:#f2e8df;--muted:#b6a493;--line:#3a2e26;--line-strong:#52412f;--accent:#ff9f45;--accent-ink:#2b1705;--accent-soft:#35251a;--ok:#7ed39f;--ok-soft:#1e2b22;--warn:#f0b96e;--warn-soft:#2f2417;--bad:#ff9081;--bad-soft:#33201d;--code:#1d1713;--shadow:0 1px 2px rgba(0,0,0,0.3),0 8px 24px rgba(0,0,0,0.25)}:root[data-contrast=high]{--ink:#000000;--muted:#4a3a2c;--line:#a88d6c;--line-strong:#6b5236;--accent:#8f3c00;--panel:#ffffff;--bg:#fff9f2;--ok:#17512f;--warn:#6b3f00;--bad:#8a1a11;--shadow:none}:root[data-theme=dark][data-contrast=high]{--ink:#ffffff;--muted:#e0cfbd;--line:#7d6650;--line-strong:#a88a6a;--accent:#ffc27a;--panel:#100c09;--bg:#000000;--code:#0a0705;--ok:#9ff0bd;--warn:#ffd08f;--bad:#ffb0a2;--shadow:none}:root[data-textsize=small]{--scale:0.9}:root[data-textsize=large]{--scale:1.12}:root[data-textsize=huge]{--scale:1.28}:root[data-textsize=giant]{--scale:1.45}:root[data-focus=strong]{--focus-width:4px}*{box-sizing:border-box}body,html{margin:0;background:var(--bg);color:var(--ink);font:calc(15px * var(--scale)) /1.55 system-ui,-apple-system,Segoe UI,sans-serif}a{color:var(--accent);text-decoration:none}:root[data-links=underline] a,a:hover{text-decoration:underline}:focus-visible{outline:var(--focus-width) solid var(--accent);outline-offset:2px;border-radius:4px}:root[data-motion=reduced] *,:root[data-motion=reduced] :after,:root[data-motion=reduced] :before{transition:none!important;animation:none!important;scroll-behavior:auto!important}@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}.skip-link{position:absolute;left:-9999px;top:0;background:var(--accent);color:var(--accent-ink);padding:10px 16px;border-radius:0 0 var(--radius) 0;z-index:10}.skip-link:focus{left:0}.wrap{max-width:calc(1100px * var(--scale));margin:0 auto;padding:24px 16px 80px}.top{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:20px;padding-bottom:14px;border-bottom:1px solid var(--line)}.top h1{font-size:calc(21px * var(--scale));margin:0;letter-spacing:-.01em}.top h1 a{color:var(--accent)}.top nav{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.top nav a{color:var(--muted);padding:6px 10px;border-radius:999px;font-size:calc(14px * var(--scale))}.top nav a:hover{text-decoration:none}.top nav a:hover,.top nav a[aria-current=page]{background:var(--accent-soft);color:var(--accent)}.top nav a[aria-current=page]{font-weight:600}.top nav a .live{display:inline-flex;align-items:center;gap:4px;margin-left:6px;padding:0 6px 0 4px;border-radius:999px;background:var(--ok-soft,var(--accent-soft));color:var(--ok,var(--accent));font-size:calc(10.5px * var(--scale));font-weight:700;letter-spacing:.04em;text-transform:uppercase;vertical-align:middle}.top nav a .live .dot{width:6px;height:6px;border-radius:50%;background:currentColor;animation:live-pulse 1.6s ease-in-out infinite}@keyframes live-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.75)}}.crumbs{color:var(--muted);font-size:calc(13px * var(--scale));margin-bottom:8px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:18px;margin-bottom:16px;box-shadow:var(--shadow)}.panel h2{font-size:calc(16px * var(--scale));margin:0 0 10px}.panel h3{font-size:calc(13px * var(--scale));margin:16px 0 6px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.05em}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.grow{flex:1 1 auto}.muted{color:var(--muted)}.small{font-size:calc(13px * var(--scale))}input[type=number],input[type=text],select,textarea{width:100%;background:var(--code);color:var(--ink);border:1px solid var(--line-strong);border-radius:9px;padding:9px 11px;font:inherit}input[type=number]:focus,input[type=text]:focus,select:focus,textarea:focus{border-color:var(--accent)}textarea{min-height:110px;resize:vertical;font-family:var(--mono);font-size:calc(13px * var(--scale));line-height:1.5}textarea.prose{font-family:inherit;font-size:calc(14px * var(--scale))}label{display:block;font-size:calc(13px * var(--scale));color:var(--muted);margin:12px 0 4px}input[type=checkbox],input[type=radio]{accent-color:var(--accent);width:calc(16px * var(--scale));height:calc(16px * var(--scale))}.option{border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:8px 0;background:var(--bg)}.option>label{display:flex;align-items:flex-start;gap:10px;margin:0;color:var(--ink);font-size:calc(14px * var(--scale));cursor:pointer}.option>label input{margin-top:3px;flex:none}.option .why{margin:6px 0 0 26px;color:var(--muted);font-size:calc(12.5px * var(--scale))}.option.warned{border-color:var(--warn);background:var(--warn-soft)}button{background:var(--panel);color:var(--ink);border:1px solid var(--line-strong);border-radius:9px;padding:8px 13px;font:inherit;cursor:pointer;transition:background .12s ease,border-color .12s ease}button:hover:not(:disabled){border-color:var(--accent);background:var(--accent-soft)}button.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent);font-weight:600}button.primary:hover:not(:disabled){background:var(--accent);filter:brightness(1.08)}button.danger{color:var(--bad);border-color:var(--bad)}button.danger:hover:not(:disabled){background:var(--bad-soft);border-color:var(--bad)}button.quiet{border-color:transparent;background:transparent;color:var(--muted)}button.quiet:hover:not(:disabled){color:var(--accent)}button:disabled{opacity:.45;cursor:not-allowed}.badge{display:inline-block;font-size:calc(12px * var(--scale));padding:2px 9px;border-radius:999px;border:1px solid var(--line-strong);color:var(--muted);white-space:nowrap;max-width:100%;overflow-wrap:anywhere}@media (max-width:600px){.badge{white-space:normal}}.badge.running{color:var(--accent);border-color:var(--accent);background:var(--accent-soft)}.badge.waiting-approval{color:var(--warn);border-color:var(--warn);background:var(--warn-soft)}.badge.done{color:var(--ok);border-color:var(--ok);background:var(--ok-soft)}.badge.blocked{color:var(--warn);border-color:var(--warn);background:var(--warn-soft)}.badge.aborted,.badge.failed,.badge.limit-reached{color:var(--bad);border-color:var(--bad);background:var(--bad-soft)}pre{background:var(--code);border:1px solid var(--line);border-radius:9px;padding:10px 12px;overflow:auto;font-family:var(--mono);font-size:calc(12.5px * var(--scale));line-height:1.5;margin:6px 0;white-space:pre-wrap;word-break:break-word}pre.tall{max-height:420px}details>summary{cursor:pointer;color:var(--muted);font-size:calc(13px * var(--scale));-webkit-user-select:none;-moz-user-select:none;user-select:none}details>summary:hover{color:var(--accent)}details[open]>summary{margin-bottom:6px}.task{border-left:4px solid var(--line-strong);padding-left:14px;margin-bottom:18px}.task.done{border-left-color:var(--ok)}.task.running,.task.waiting-approval{border-left-color:var(--accent)}.task.blocked{border-left-color:var(--warn)}.task.aborted,.task.failed,.task.limit-reached{border-left-color:var(--bad)}.task h4{margin:0 0 4px;font-size:calc(15px * var(--scale))}.task:target{background:var(--accent-soft);border-radius:0 10px 10px 0;padding:8px 8px 8px 14px}.summary{background:var(--ok-soft);border:1px solid var(--ok);border-radius:9px;padding:10px 12px;margin:8px 0;white-space:pre-wrap}.reason{color:var(--bad)}.approval{background:var(--warn-soft);border:2px solid var(--warn);border-radius:var(--radius);padding:12px 14px;margin-bottom:14px;position:-webkit-sticky;position:sticky;top:8px;z-index:2}.approval code{font-size:calc(13px * var(--scale))}.approval code,.log{font-family:var(--mono)}.log{font-size:calc(12.5px * var(--scale));max-height:320px;overflow:auto;background:var(--code);border:1px solid var(--line);border-radius:9px;padding:8px 10px}.log div{white-space:pre-wrap;word-break:break-word}.log .warn{color:var(--warn)}.log .error{color:var(--bad)}.log .time{color:var(--muted);margin-right:8px}table{width:100%;border-collapse:collapse}td,th{text-align:left;padding:9px 6px;border-bottom:1px solid var(--line);font-size:calc(14px * var(--scale));vertical-align:top}th{color:var(--muted);font-weight:700;font-size:calc(12px * var(--scale));text-transform:uppercase;letter-spacing:.04em}.err{color:var(--bad);font-size:calc(13px * var(--scale))}.notice{border:1px solid var(--bad);background:var(--bad-soft);color:var(--ink);border-radius:10px;padding:10px 12px;margin:10px 0;font-size:calc(13.5px * var(--scale))}.notice strong{color:var(--bad)}.notice ul{margin:6px 0 0;padding-left:20px}.notice.caution{border-color:var(--warn);background:var(--warn-soft)}.notice.caution strong{color:var(--warn)}.notice.calm{border-color:var(--line-strong);background:var(--bg-tint)}.notice.calm strong{color:var(--ink)}.counts{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:4px}.count{border:1px solid var(--line);border-radius:10px;padding:10px 14px;min-width:96px;background:var(--bg)}.count .n{font-size:calc(22px * var(--scale));font-weight:700;line-height:1.2}.count .k{color:var(--muted);font-size:calc(12px * var(--scale));text-transform:uppercase;letter-spacing:.04em}.count.done .n{color:var(--ok)}.count.failed .n{color:var(--bad)}.count.running .n{color:var(--accent)}.attempts{list-style:none;margin:6px 0 0;padding:0 0 0 12px;border-left:2px solid var(--line)}.attempts>li{margin:0 0 10px}.attempts .head{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}.attempts .when{color:var(--muted);font-size:calc(12.5px * var(--scale))}.attempts .what{margin:4px 0 0}.count.queued .n{color:var(--accent)}.flow{list-style:none;margin:8px 0 0;padding:0}.flow>li{position:relative;padding:10px 0 14px 28px;border-left:2px solid var(--line);margin-left:7px}.flow>li:last-child{border-left-color:transparent}.flow>li:before{content:"";position:absolute;left:-9px;top:16px;width:16px;height:16px;border-radius:50%;background:var(--panel);border:3px solid var(--line-strong)}.flow>li.done:before{border-color:var(--ok);background:var(--ok)}.flow>li.running:before,.flow>li.waiting-approval:before{border-color:var(--accent);background:var(--accent)}.flow>li.aborted:before,.flow>li.failed:before,.flow>li.limit-reached:before{border-color:var(--bad);background:var(--bad)}.flow>li.queued:before{border-color:var(--line-strong);background:var(--panel)}.flow>li.next:before{border-color:var(--accent);background:var(--panel);box-shadow:0 0 0 4px var(--accent-soft)}.flow .when{color:var(--muted);font-size:calc(12.5px * var(--scale))}.flow .what{margin:4px 0 0}.flow .head{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}.flow .head strong{font-size:calc(14.5px * var(--scale))}.chip{display:inline-block;border:1px solid var(--line);border-radius:999px;padding:1px 9px;font-size:calc(12px * var(--scale));color:var(--muted);background:var(--bg-tint)}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:10px}.toolbar input[type=text],.toolbar select{width:auto;min-width:150px}.segmented{display:inline-flex;flex-wrap:wrap;max-width:100%;border:1px solid var(--line-strong);border-radius:9px;overflow:hidden}.segmented button{border:none;border-radius:0;border-right:1px solid var(--line)}.segmented button:last-child{border-right:none}.segmented button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);font-weight:600}.button-link{display:inline-block;background:var(--accent);color:var(--accent-ink);border:1px solid var(--accent);border-radius:9px;padding:8px 13px;font:inherit;font-weight:600;cursor:pointer;text-decoration:none}.button-link:hover{filter:brightness(1.08);text-decoration:none}.button-link+.button-link{background:var(--panel);color:var(--ink);border-color:var(--line-strong);font-weight:400}.button-link+.button-link:hover{background:var(--accent-soft);border-color:var(--accent);filter:none}.button-link.plain{background:var(--panel);color:var(--ink);border-color:var(--line-strong);font-weight:400}.button-link.quiet{background:transparent;color:var(--muted);border-color:transparent;font-weight:400}.button-link.plain:hover,.button-link.quiet:hover{background:var(--accent-soft);border-color:var(--accent);color:var(--accent);filter:none}.empty{color:var(--muted);padding:14px 0}.visually-hidden{position:absolute;-webkit-clip-path:inset(50%);clip-path:inset(50%);width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.dropzone{border:2px dashed var(--line-strong);border-radius:12px;padding:10px;background:var(--bg-tint)}.dropzone.active{border-color:var(--accent);background:var(--accent-soft)}.dropzone textarea{margin:0}.dropzone p{margin:8px 2px 2px}.batch-row td{vertical-align:middle}.batch-row.running{background:var(--accent-soft)}.run-order{list-style:decimal;margin:10px 0 4px;padding-left:28px}.run-order li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:3px 0}.run-order button{padding:2px 8px;margin-left:4px}.linkish{background:none;border:0;padding:0;margin:0;color:var(--accent);font:inherit;cursor:pointer;text-decoration:underline}.linkish:hover{filter:brightness(1.15)}.run-choice{display:flex;gap:20px;flex-wrap:wrap;margin:12px 0 4px}.run-choice>div{flex:1 1 280px}.run-choice .why{margin:6px 2px 0}.rich>:first-child{margin-top:0}.rich>:last-child{margin-bottom:0}.rich p{margin:0 0 8px;max-width:76ch}.rich ul{margin:0 0 8px;padding-left:20px}.rich li{margin:2px 0;max-width:74ch}.rich code{font-family:var(--mono);font-size:.92em;background:var(--bg-tint);border:1px solid var(--line);border-radius:5px;padding:0 4px;word-break:break-word}.rich pre{margin:6px 0 8px}.summary .rich{white-space:normal}select{-moz-appearance:none;appearance:none;-webkit-appearance:none;padding-right:34px;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");background-repeat:no-repeat;background-position:right 12px center;cursor:pointer}select:disabled{cursor:not-allowed;opacity:.6}select optgroup,select option{background:var(--panel);color:var(--ink)}.top nav a{display:inline-flex;align-items:center;gap:6px}.top nav a .nav-icon{flex:none;opacity:.85}.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;padding:16px;z-index:50}.modal{background:var(--panel);color:var(--ink);border:1px solid var(--line-strong);border-radius:var(--radius);box-shadow:0 20px 60px rgba(0,0,0,.35);width:min(560px,100%);max-height:calc(100vh - 32px);overflow:auto;padding:18px 20px}.modal h2{margin:0 0 10px;font-size:calc(16px * var(--scale))}.modal.danger h2{color:var(--bad)}.modal-body{white-space:pre-wrap;line-height:1.5;font-size:calc(14px * var(--scale))}.modal-actions{justify-content:flex-end;margin-top:16px}.panel{overflow-wrap:break-word}td,th{position:relative}@media (max-width:600px){.wrap{padding:12px 10px 60px}.top{gap:8px;margin-bottom:12px;padding-bottom:10px}.top h1{font-size:calc(18px * var(--scale))}.top nav{width:100%;flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:4px;scrollbar-width:none}.top nav::-webkit-scrollbar{display:none}.top nav a{flex:none;padding:6px 9px;font-size:calc(13px * var(--scale))}.panel{padding:12px}.row{gap:8px}.row>input[type=text],.row>select,.row>textarea,.toolbar input[type=text],.toolbar select,.toolbar>div{width:100%;min-width:0;flex:1 1 100%}.row>button{flex:1 1 auto}select{min-width:0!important;width:100%}table{display:block;overflow-x:auto;white-space:nowrap}.counts{gap:6px}.count{flex-grow:1;flex-shrink:1;flex-basis:calc(50% - 6px)}.segmented{display:flex;width:100%}.segmented button{flex:1 1 auto}.flow>li{padding-left:18px}.modal{padding:14px}.log,pre{font-size:calc(12px * var(--scale))}}tr.inactive td{opacity:.6}tr.dragging td{opacity:.4}tr.drop-target td{box-shadow:inset 0 2px 0 var(--accent)}.order-cell{white-space:nowrap}.drag-handle{cursor:-webkit-grab;cursor:grab;color:var(--muted);padding:0 4px;-webkit-user-select:none;-moz-user-select:none;user-select:none}tr.inactive td:first-child{opacity:1}.chip.inactive{color:var(--warn);border-color:var(--warn)}.story-when{color:var(--muted);font-size:calc(12px * var(--scale));font-feature-settings:"tnum";font-variant-numeric:tabular-nums;white-space:nowrap}.sync-cmd{white-space:pre-wrap;overflow-wrap:anywhere}.table-scroll{overflow-x:auto}.metrics td:not(:first-child),.metrics th:not(:first-child){white-space:nowrap}.handoff .handoff-row{margin:4px 0;overflow-wrap:anywhere}.handoff .handoff-row ul{margin:2px 0 0;padding-left:20px}.run-fold{border-top:1px solid var(--line);padding:8px 0 4px}.run-fold:first-of-type{border-top:none}.run-fold>summary{cursor:pointer;list-style:none}.run-fold>summary::-webkit-details-marker{display:none}.run-fold>summary:before{content:"▸";display:inline-block;width:16px;color:var(--muted);transition:transform .15s}.run-fold[open]>summary:before{transform:rotate(90deg)}.run-fold>summary .run-heading{display:inline-block;width:calc(100% - 16px);vertical-align:top}.run-heading h2{font-size:calc(15px * var(--scale))}.exports{white-space:nowrap}@media (max-width:600px){.exports{white-space:normal}}.modal.wide{width:min(820px,100%)}.story-box{margin-top:8px;border:1px solid var(--line);border-radius:var(--radius);padding:10px 12px;background:var(--code)}.story{list-style:none;margin:6px 0;padding:0}.story>li{border-left:3px solid var(--line-strong);padding:6px 10px;margin:6px 0}.story>li.sent{border-left-color:var(--accent)}.story>li.reply{border-left-color:var(--ok)}.story>li.story-step{border-left-color:var(--muted)}.story>li.failed{border-left-color:var(--bad);background:var(--bad-soft)}.story>li.story-review{border-left-color:var(--warn)}.story-head{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:calc(13px * var(--scale))}.story-cmd{margin:4px 0;color:var(--ink)}.story-cmd,.story-out{white-space:pre-wrap;word-break:break-word;font-size:calc(12px * var(--scale))}.story-out{margin:4px 0 0;max-height:420px;overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:8px}.story-out.always{max-height:260px}.story-scroll.live{max-height:65vh;overflow:auto;overscroll-behavior:contain}.story-out.terminal{max-height:45vh;overscroll-behavior:contain}.diff-overlay{position:fixed;inset:0;z-index:100;background:var(--bg);display:flex;flex-direction:column}.diff-head{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:10px 16px;border-bottom:1px solid var(--line);background:var(--panel)}.diff-head h2{margin:0;font-size:calc(16px * var(--scale))}.diff-body{flex:1 1;min-height:0;display:grid;grid-template-columns:minmax(220px,300px) 1fr}.diff-files{overflow:auto;border-right:1px solid var(--line);padding:6px;background:var(--panel)}.diff-file{display:flex;gap:6px;align-items:baseline;width:100%;text-align:left;border:0;border-radius:6px;background:none;padding:5px 6px;font-size:calc(12px * var(--scale));cursor:pointer}.diff-file:hover{background:var(--bg-tint)}.diff-file.on{background:var(--accent-soft)}.diff-path{flex:1 1;min-width:0;overflow-wrap:anywhere}.diff-counts{white-space:nowrap;font-family:var(--mono);font-size:calc(11px * var(--scale))}.diff-counts .plus{color:var(--ok)}.diff-counts .minus{color:var(--bad)}.diff-status{font-family:var(--mono);font-weight:700;width:1.2em;text-align:center;border-radius:4px}.diff-status.s-A{color:var(--ok)}.diff-status.s-D{color:var(--bad)}.diff-status.s-M{color:var(--warn)}.diff-status.s-C,.diff-status.s-R{color:var(--accent)}.diff-main{display:flex;flex-direction:column;min-width:0;min-height:0}.diff-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:6px 12px;border-bottom:1px solid var(--line)}.diff-name{font-family:var(--mono);font-size:calc(12px * var(--scale));overflow-wrap:anywhere}.diff-scroll{flex:1 1;overflow:auto;overscroll-behavior:contain}.diff-table{width:100%;border-collapse:collapse;table-layout:fixed;font-family:var(--mono);font-size:calc(12px * var(--scale))}.diff-table col.num{width:calc(52px * var(--scale))}.diff-table thead th{position:-webkit-sticky;position:sticky;top:0;z-index:1;background:var(--panel);border-bottom:1px solid var(--line);text-align:left;padding:4px 8px;font-family:inherit}.diff-table td{padding:0 8px;vertical-align:top;line-height:1.5}.diff-table td.num{text-align:right;color:var(--muted);-webkit-user-select:none;-moz-user-select:none;user-select:none;border-right:1px solid var(--line)}.diff-table td.code{white-space:pre-wrap;overflow-wrap:anywhere}.diff-table.nowrap td.code{white-space:pre;overflow-wrap:normal}.diff-table.nowrap{width:max-content;min-width:100%}.diff-row.change td.l,.diff-row.del td.l{background:var(--bad-soft)}.diff-row.add td.r,.diff-row.change td.r{background:var(--ok-soft)}.diff-row mark{background:color-mix(in srgb,currentColor 22%,transparent);color:inherit;border-radius:2px}.diff-row td.empty{background:repeating-linear-gradient(135deg,transparent 0 6px,var(--bg-tint) 6px 12px)}.diff-row.current td.num{box-shadow:inset 3px 0 0 var(--accent)}.diff-gap td{background:var(--bg-tint);text-align:center;padding:2px}@media (max-width:760px){.diff-body{grid-template-columns:1fr;grid-template-rows:auto 1fr}.diff-files{max-height:30vh;border-right:0;border-bottom:1px solid var(--line)}}.scroll-jump{position:fixed;right:16px;bottom:24px;display:flex;flex-direction:column;gap:8px;z-index:40}.scroll-jump button{width:calc(42px * var(--scale));height:calc(42px * var(--scale));border-radius:50%;padding:0;font-size:calc(20px * var(--scale));line-height:1;box-shadow:0 2px 8px rgba(0,0,0,.18)}.story-notes{margin:4px 0;font-size:calc(13px * var(--scale))}.story-fixed{padding:8px 10px;border-radius:8px;background:var(--panel);border:1px solid var(--line);margin:6px 0}.story-fixed.close{border-color:var(--ok)}.story-fixed.close.failed{border-color:var(--bad);background:var(--bad-soft)}.option-inline{gap:6px}.option-inline,.story-box .live{display:inline-flex;align-items:center}.story-box .live{gap:4px;color:var(--ok);font-size:calc(11px * var(--scale));font-weight:700;text-transform:uppercase}.story-box .live .dot,button .dot{width:6px;height:6px;border-radius:50%;background:currentColor;animation:live-pulse 1.6s ease-in-out infinite}button .dot{display:inline-block;margin-right:6px;vertical-align:middle}.info-dot{width:calc(18px * var(--scale));height:calc(18px * var(--scale));min-width:calc(18px * var(--scale));padding:0;border-radius:50%;font-size:calc(11px * var(--scale));font-style:italic;font-weight:700;line-height:1}.info-panel{flex-basis:100%;margin-top:6px}.info-panel dl{margin:6px 0 0}.info-panel dt{font-weight:600;margin-top:6px}.info-panel dd{margin:0 0 0 14px;opacity:.85}.flow .head .pick{margin:0 2px 0 0;flex:0 0 auto}.chip.inside{font-size:calc(10.5px * var(--scale));opacity:.85}.chip.inside.out{color:var(--bad);border-color:var(--bad)}.approval-banner{position:-webkit-sticky;position:sticky;top:0;z-index:30;background:var(--warn-soft);border:3px solid var(--warn);border-radius:var(--radius);padding:12px 14px 2px;margin:0 0 16px;box-shadow:0 6px 18px rgba(0,0,0,.18);max-height:min(70vh,calc(30rem * var(--scale)));overflow:auto}.approval-banner h2{margin:0 0 4px;color:var(--warn)}.approval-banner .approval{position:static;background:var(--bg);margin-bottom:10px}.approval-banner .approval button{font-size:calc(15px * var(--scale));padding:8px 14px}
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><!--IwNZiBrEMAcXEUFj2miiU--><html lang="en" data-theme="light" data-textsize="normal" data-contrast="normal" data-motion="normal" data-links="plain" data-focus="normal"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/e2a2c9eb3c226313.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js"/><script src="/_next/static/chunks/c7879cf7-b5ab1053c1d9a2e7.js" async=""></script><script src="/_next/static/chunks/131-bae98f790a541679.js" async=""></script><script src="/_next/static/chunks/main-app-e3a5f713ba31557e.js" async=""></script><script src="/_next/static/chunks/197-f7c33a0114fc3db3.js" async=""></script><script src="/_next/static/chunks/867-8b95ae984befc0e2.js" async=""></script><script src="/_next/static/chunks/549-9548d9a132c8c7d4.js" async=""></script><script src="/_next/static/chunks/app/layout-560bd6d173302e5a.js" async=""></script><script src="/_next/static/chunks/app/appearance/page-9b13583bfee63b32.js" async=""></script><title>copilot-operator</title><meta name="description" content="Runs task loops with Microsoft 365 Copilot on this machine."/><script>
1
+ <!DOCTYPE html><!--kkxFcGzA9Uo1uRAgcoDti--><html lang="en" data-theme="light" data-textsize="normal" data-contrast="normal" data-motion="normal" data-links="plain" data-focus="normal"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/c37978b44194c37b.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js"/><script src="/_next/static/chunks/c7879cf7-b5ab1053c1d9a2e7.js" async=""></script><script src="/_next/static/chunks/131-bae98f790a541679.js" async=""></script><script src="/_next/static/chunks/main-app-e3a5f713ba31557e.js" async=""></script><script src="/_next/static/chunks/197-f7c33a0114fc3db3.js" async=""></script><script src="/_next/static/chunks/867-7f27ef819d251cc5.js" async=""></script><script src="/_next/static/chunks/549-a13ae394c5e6a837.js" async=""></script><script src="/_next/static/chunks/app/layout-560bd6d173302e5a.js" async=""></script><script src="/_next/static/chunks/app/appearance/page-9b13583bfee63b32.js" async=""></script><title>copilot-operator</title><meta name="description" content="Runs task loops with Microsoft 365 Copilot on this machine."/><script>
2
2
  (function () {
3
3
  try {
4
4
  var d = document.documentElement;
@@ -13,4 +13,4 @@
13
13
  d.dataset.focus = a.strongFocus ? 'strong' : 'normal';
14
14
  } catch (e) {}
15
15
  })();
16
- </script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><a class="skip-link" href="#main">Skip to the content</a><div class="wrap"><header class="top"><h1><a href="/">copilot-operator</a></h1><nav aria-label="Main"><a href="/"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v4H4zM4 11h16v4H4zM4 17h10v2H4z"></path></svg><span>Sessions</span></a><a href="/defaults"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm8.5 4 1.5 1-1.6 2.8-1.8-.4a7 7 0 0 1-1.5 1.5l.4 1.8L14.7 21l-1-1.5a7 7 0 0 1-3.4 0l-1 1.5-2.8-1.6.4-1.8A7 7 0 0 1 5.4 16l-1.8.4L2 13.6 3.5 12.6V11.4L2 10.4l1.6-2.8 1.8.4A7 7 0 0 1 6.9 6.5l-.4-1.8L9.3 3l1 1.5a7 7 0 0 1 3.4 0l1-1.5 2.8 1.6-.4 1.8a7 7 0 0 1 1.5 1.5l1.8-.4L22 10.4l-1.5 1z"></path></svg><span>Settings</span></a><a href="/import"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3v10m0 0 4-4m-4 4-4-4M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Plan from JSON</span></a><a href="/history"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 1 0 8.5 6M12 7v5l3 2M3 4v5h5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Task register</span></a><a href="/level1"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M6 3h9l5 5v13H6zM14 3v6h6M9 13h7M9 17h7" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 1 prompt</span></a><a href="/presets"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M5 4h14v4H5zM5 10h14v4H5zM5 16h9v4H5z" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 2 presets</span></a><a aria-current="page" href="/appearance"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 0 0 0 18c1.5 0 2-1 2-2s-1-1.5-1-2.5S14 15 15.5 15H17a4 4 0 0 0 4-4 8 8 0 0 0-9-8zM8 9a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"></path></svg><span>Appearance</span></a><a href="/system"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v10H4zM2 19h20M9 15v4M15 15v4" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>System</span></a><select aria-label="Language" style="width:auto"><option value="en" selected="">English</option><option value="bg">Български</option></select></nav></header><main id="main"><div class="panel"><h2>Appearance</h2><p class="muted small">Kept in this browser only. Nothing here is sent anywhere or shared with another machine.</p><h3>Theme</h3><div class="segmented" role="group" aria-label="Theme"><button type="button" aria-pressed="false">Light</button><button type="button" aria-pressed="false">Dark</button></div><p class="muted small" style="margin-top:6px">Warm light for a bright room, warm dark for a dim one.</p></div><div class="panel"><h2>Accessibility</h2><p class="muted small">Each of these can be turned on by itself; they are independent of the theme and of the language.</p><h3>Text size</h3><div class="segmented" role="group" aria-label="Text size"><button type="button" aria-pressed="false">Small</button><button type="button" aria-pressed="false">Normal</button><button type="button" aria-pressed="false">Large</button><button type="button" aria-pressed="false">Larger</button><button type="button" aria-pressed="false">Largest</button></div><p class="muted small" style="margin-top:6px">One step below normal and three above. Scales the whole interface, not only the body text, and is remembered in this browser.</p><div class="option"><label><input type="checkbox"/><span>Higher contrast</span></label><p class="why">Stronger borders and darker text. Drops some of the warmth in exchange for legibility.</p></div><div class="option"><label><input type="checkbox"/><span>Less motion</span></label><p class="why">No transitions, and the live log stops scrolling itself while a run is in progress.</p></div><div class="option"><label><input type="checkbox"/><span>Underline every link</span></label><p class="why">Links stop relying on colour alone to be recognisable.</p></div><div class="option"><label><input type="checkbox"/><span>Thick focus outline</span></label><p class="why">Makes what the keyboard is on impossible to lose, when tabbing through a page.</p></div><div class="row" style="margin-top:12px"><button>Back to the defaults</button></div></div><div class="panel"><h2>How it looks</h2><p class="small">A task that ended with a summary, one waiting for approval, and a link.<!-- --> <a href="#main">a link in a sentence</a></p><div class="row"><span class="badge done">done</span><span class="badge running">running</span><span class="badge waiting-approval">waiting for approval</span><span class="badge failed">failed</span></div><div class="summary" style="margin-top:10px"><strong>What was done</strong><div>A task that ended with a summary, one waiting for approval, and a link.</div></div><div class="row"><button class="primary">Run</button><button>Skip</button><button class="danger">Abort task</button></div></div><!--$--><!--/$--></main></div><script src="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[1205,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-8b95ae984befc0e2.js\",\"549\",\"static/chunks/549-9548d9a132c8c7d4.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"themeScript\"]\n3:I[1205,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-8b95ae984befc0e2.js\",\"549\",\"static/chunks/549-9548d9a132c8c7d4.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"AppearanceProvider\"]\n4:I[867,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-8b95ae984befc0e2.js\",\"549\",\"static/chunks/549-9548d9a132c8c7d4.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"LanguageProvider\"]\n5:I[1035,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-8b95ae984befc0e2.js\",\"549\",\"static/chunks/549-9548d9a132c8c7d4.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"DialogHost\"]\n6:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-8b95ae984befc0e2.js\",\"549\",\"static/chunks/549-9548d9a132c8c7d4.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"SkipLink\"]\n7:I[8197,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-8b95ae984befc0e2.js\",\"549\",\"static/chunks/549-9548d9a132c8c7d4.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"\"]\n8:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-8b95ae984befc0e2.js\",\"549\",\"static/chunks/549-9548d9a132c8c7d4.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"Nav\"]\n9:I[6657,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-8b95ae984befc0e2.js\",\"549\",\"static/chunks/549-9548d9a132c8c7d4.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"GlobalApprovals\"]\na:I[5204,[],\"\"]\nb:I[2642,[],\"\"]\nc:I[7712,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-8b95ae984befc0e2.js\",\"549\",\"static/chunks/549-9548d9a132c8c7d4.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"ScrollJump\"]\nd:I[7089,[],\"ClientPageRoot\"]\ne:I[4585,[\"867\",\"stat"])</script><script>self.__next_f.push([1,"ic/chunks/867-8b95ae984befc0e2.js\",\"429\",\"static/chunks/app/appearance/page-9b13583bfee63b32.js\"],\"default\"]\n11:I[433,[],\"OutletBoundary\"]\n13:I[9884,[],\"AsyncMetadataOutlet\"]\n15:I[433,[],\"ViewportBoundary\"]\n17:I[433,[],\"MetadataBoundary\"]\n18:\"$Sreact.suspense\"\n1a:I[3536,[],\"\"]\n:HL[\"/_next/static/css/e2a2c9eb3c226313.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"IwNZiBrEMAcXEUFj2miiU\",\"p\":\"\",\"c\":[\"\",\"appearance\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"appearance\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/e2a2c9eb3c226313.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"data-theme\":\"light\",\"data-textsize\":\"normal\",\"data-contrast\":\"normal\",\"data-motion\":\"normal\",\"data-links\":\"plain\",\"data-focus\":\"normal\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"$2\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$L5\",null,{\"children\":[[\"$\",\"$L6\",null,{}],[\"$\",\"div\",null,{\"className\":\"wrap\",\"children\":[[\"$\",\"header\",null,{\"className\":\"top\",\"children\":[[\"$\",\"h1\",null,{\"children\":[\"$\",\"$L7\",null,{\"href\":\"/\",\"children\":\"copilot-operator\"}]}],[\"$\",\"$L8\",null,{}]]}],[\"$\",\"$L9\",null,{}],[\"$\",\"main\",null,{\"id\":\"main\",\"children\":[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}],[\"$\",\"$Lc\",null,{}]]}]}]}]}]]}]]}],{\"children\":[\"appearance\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$Ld\",null,{\"Component\":\"$e\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@f\",\"$@10\"]}],null,[\"$\",\"$L11\",null,{\"children\":[\"$L12\",[\"$\",\"$L13\",null,{\"promise\":\"$@14\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$L15\",null,{\"children\":\"$L16\"}],null],[\"$\",\"$L17\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$18\",null,{\"fallback\":null,\"children\":\"$L19\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$1a\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"f:{}\n10:\"$0:f:0:1:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"16:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n12:null\n"])</script><script>self.__next_f.push([1,"14:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"copilot-operator\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Runs task loops with Microsoft 365 Copilot on this machine.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"19:\"$14:metadata\"\n"])</script></body></html>
16
+ </script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><a class="skip-link" href="#main">Skip to the content</a><div class="wrap"><header class="top"><h1><a href="/">copilot-operator</a></h1><nav aria-label="Main"><a href="/"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v4H4zM4 11h16v4H4zM4 17h10v2H4z"></path></svg><span>Sessions</span></a><a href="/defaults"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm8.5 4 1.5 1-1.6 2.8-1.8-.4a7 7 0 0 1-1.5 1.5l.4 1.8L14.7 21l-1-1.5a7 7 0 0 1-3.4 0l-1 1.5-2.8-1.6.4-1.8A7 7 0 0 1 5.4 16l-1.8.4L2 13.6 3.5 12.6V11.4L2 10.4l1.6-2.8 1.8.4A7 7 0 0 1 6.9 6.5l-.4-1.8L9.3 3l1 1.5a7 7 0 0 1 3.4 0l1-1.5 2.8 1.6-.4 1.8a7 7 0 0 1 1.5 1.5l1.8-.4L22 10.4l-1.5 1z"></path></svg><span>Settings</span></a><a href="/import"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3v10m0 0 4-4m-4 4-4-4M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Plan from JSON</span></a><a href="/history"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 1 0 8.5 6M12 7v5l3 2M3 4v5h5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Task register</span></a><a href="/level1"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M6 3h9l5 5v13H6zM14 3v6h6M9 13h7M9 17h7" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 1 prompt</span></a><a href="/presets"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M5 4h14v4H5zM5 10h14v4H5zM5 16h9v4H5z" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>Level 2 presets</span></a><a aria-current="page" href="/appearance"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M12 3a9 9 0 0 0 0 18c1.5 0 2-1 2-2s-1-1.5-1-2.5S14 15 15.5 15H17a4 4 0 0 0 4-4 8 8 0 0 0-9-8zM8 9a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"></path></svg><span>Appearance</span></a><a href="/system"><svg class="nav-icon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M4 5h16v10H4zM2 19h20M9 15v4M15 15v4" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"></path></svg><span>System</span></a><select aria-label="Language" style="width:auto"><option value="en" selected="">English</option><option value="bg">Български</option></select></nav></header><main id="main"><div class="panel"><h2>Appearance</h2><p class="muted small">Kept in this browser only. Nothing here is sent anywhere or shared with another machine.</p><h3>Theme</h3><div class="segmented" role="group" aria-label="Theme"><button type="button" aria-pressed="false">Light</button><button type="button" aria-pressed="false">Dark</button></div><p class="muted small" style="margin-top:6px">Warm light for a bright room, warm dark for a dim one.</p></div><div class="panel"><h2>Accessibility</h2><p class="muted small">Each of these can be turned on by itself; they are independent of the theme and of the language.</p><h3>Text size</h3><div class="segmented" role="group" aria-label="Text size"><button type="button" aria-pressed="false">Small</button><button type="button" aria-pressed="false">Normal</button><button type="button" aria-pressed="false">Large</button><button type="button" aria-pressed="false">Larger</button><button type="button" aria-pressed="false">Largest</button></div><p class="muted small" style="margin-top:6px">One step below normal and three above. Scales the whole interface, not only the body text, and is remembered in this browser.</p><div class="option"><label><input type="checkbox"/><span>Higher contrast</span></label><p class="why">Stronger borders and darker text. Drops some of the warmth in exchange for legibility.</p></div><div class="option"><label><input type="checkbox"/><span>Less motion</span></label><p class="why">No transitions, and the live log stops scrolling itself while a run is in progress.</p></div><div class="option"><label><input type="checkbox"/><span>Underline every link</span></label><p class="why">Links stop relying on colour alone to be recognisable.</p></div><div class="option"><label><input type="checkbox"/><span>Thick focus outline</span></label><p class="why">Makes what the keyboard is on impossible to lose, when tabbing through a page.</p></div><div class="row" style="margin-top:12px"><button>Back to the defaults</button></div></div><div class="panel"><h2>How it looks</h2><p class="small">A task that ended with a summary, one waiting for approval, and a link.<!-- --> <a href="#main">a link in a sentence</a></p><div class="row"><span class="badge done">done</span><span class="badge running">running</span><span class="badge waiting-approval">waiting for approval</span><span class="badge failed">failed</span></div><div class="summary" style="margin-top:10px"><strong>What was done</strong><div>A task that ended with a summary, one waiting for approval, and a link.</div></div><div class="row"><button class="primary">Run</button><button>Skip</button><button class="danger">Abort task</button></div></div><!--$--><!--/$--></main></div><script src="/_next/static/chunks/webpack-0f31b926d9a9c5a4.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[1205,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7f27ef819d251cc5.js\",\"549\",\"static/chunks/549-a13ae394c5e6a837.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"themeScript\"]\n3:I[1205,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7f27ef819d251cc5.js\",\"549\",\"static/chunks/549-a13ae394c5e6a837.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"AppearanceProvider\"]\n4:I[867,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7f27ef819d251cc5.js\",\"549\",\"static/chunks/549-a13ae394c5e6a837.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"LanguageProvider\"]\n5:I[1035,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7f27ef819d251cc5.js\",\"549\",\"static/chunks/549-a13ae394c5e6a837.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"DialogHost\"]\n6:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7f27ef819d251cc5.js\",\"549\",\"static/chunks/549-a13ae394c5e6a837.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"SkipLink\"]\n7:I[8197,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7f27ef819d251cc5.js\",\"549\",\"static/chunks/549-a13ae394c5e6a837.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"\"]\n8:I[8214,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7f27ef819d251cc5.js\",\"549\",\"static/chunks/549-a13ae394c5e6a837.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"Nav\"]\n9:I[6657,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7f27ef819d251cc5.js\",\"549\",\"static/chunks/549-a13ae394c5e6a837.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"GlobalApprovals\"]\na:I[5204,[],\"\"]\nb:I[2642,[],\"\"]\nc:I[7712,[\"197\",\"static/chunks/197-f7c33a0114fc3db3.js\",\"867\",\"static/chunks/867-7f27ef819d251cc5.js\",\"549\",\"static/chunks/549-a13ae394c5e6a837.js\",\"177\",\"static/chunks/app/layout-560bd6d173302e5a.js\"],\"ScrollJump\"]\nd:I[7089,[],\"ClientPageRoot\"]\ne:I[4585,[\"867\",\"stat"])</script><script>self.__next_f.push([1,"ic/chunks/867-7f27ef819d251cc5.js\",\"429\",\"static/chunks/app/appearance/page-9b13583bfee63b32.js\"],\"default\"]\n11:I[433,[],\"OutletBoundary\"]\n13:I[9884,[],\"AsyncMetadataOutlet\"]\n15:I[433,[],\"ViewportBoundary\"]\n17:I[433,[],\"MetadataBoundary\"]\n18:\"$Sreact.suspense\"\n1a:I[3536,[],\"\"]\n:HL[\"/_next/static/css/c37978b44194c37b.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"kkxFcGzA9Uo1uRAgcoDti\",\"p\":\"\",\"c\":[\"\",\"appearance\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"appearance\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/c37978b44194c37b.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"data-theme\":\"light\",\"data-textsize\":\"normal\",\"data-contrast\":\"normal\",\"data-motion\":\"normal\",\"data-links\":\"plain\",\"data-focus\":\"normal\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"$2\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$L5\",null,{\"children\":[[\"$\",\"$L6\",null,{}],[\"$\",\"div\",null,{\"className\":\"wrap\",\"children\":[[\"$\",\"header\",null,{\"className\":\"top\",\"children\":[[\"$\",\"h1\",null,{\"children\":[\"$\",\"$L7\",null,{\"href\":\"/\",\"children\":\"copilot-operator\"}]}],[\"$\",\"$L8\",null,{}]]}],[\"$\",\"$L9\",null,{}],[\"$\",\"main\",null,{\"id\":\"main\",\"children\":[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}],[\"$\",\"$Lc\",null,{}]]}]}]}]}]]}]]}],{\"children\":[\"appearance\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$Ld\",null,{\"Component\":\"$e\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@f\",\"$@10\"]}],null,[\"$\",\"$L11\",null,{\"children\":[\"$L12\",[\"$\",\"$L13\",null,{\"promise\":\"$@14\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$L15\",null,{\"children\":\"$L16\"}],null],[\"$\",\"$L17\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$18\",null,{\"fallback\":null,\"children\":\"$L19\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$1a\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"f:{}\n10:\"$0:f:0:1:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"16:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n12:null\n"])</script><script>self.__next_f.push([1,"14:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"copilot-operator\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Runs task loops with Microsoft 365 Copilot on this machine.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"19:\"$14:metadata\"\n"])</script></body></html>