copilot-operator 0.1.52 → 0.1.53

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 (57) hide show
  1. package/README.md +17 -1
  2. package/dist/src/api/operator.controller.js +35 -2
  3. package/dist/src/api/operator.service.js +83 -6
  4. package/dist/src/config/schema.js +32 -0
  5. package/dist/src/exec/policy.js +11 -1
  6. package/dist/src/exec/scriptFiles.js +108 -2
  7. package/dist/src/orchestrator/leadRunner.js +50 -4
  8. package/dist/src/orchestrator/review.js +9 -3
  9. package/dist/src/orchestrator/taskRunner.js +55 -3
  10. package/dist/src/plan/kerrigan.js +35 -4
  11. package/dist/src/plan/systemGuide.js +123 -4
  12. package/dist/src/session/compose.js +16 -4
  13. package/dist/src/session/store.js +3 -0
  14. package/dist/src/util/pacing.js +33 -2
  15. package/dist/src/vcs/git.js +11 -1
  16. package/dist/src/vcs/referenceGuard.js +299 -0
  17. package/dist/web/404.html +3 -2
  18. package/dist/web/_next/static/chunks/163.980c5145848efbdf.js +1 -0
  19. package/dist/web/_next/static/chunks/220.447d1d8624d4644c.js +1 -0
  20. package/dist/web/_next/static/chunks/500-34d01f8d8d73eb2c.js +1 -0
  21. package/dist/web/_next/static/chunks/548.c6dfd1cb270f3c93.js +1 -0
  22. package/dist/web/_next/static/chunks/584.fc9e061dd4069406.js +1 -0
  23. package/dist/web/_next/static/chunks/67.1a3ca07919abce27.js +1 -0
  24. package/dist/web/_next/static/chunks/714.5b2e291a430adc9c.js +1 -0
  25. package/dist/web/_next/static/chunks/747.157732b5b3f3c435.js +1 -0
  26. package/dist/web/_next/static/chunks/77.d478a6f2eafe31e3.js +1 -0
  27. package/dist/web/_next/static/chunks/921-b2219533c5a6e38f.js +1 -0
  28. package/dist/web/_next/static/chunks/app/defaults/page-b7e4e94a55e65806.js +1 -0
  29. package/dist/web/_next/static/chunks/app/layout-2b3718748721c1ac.js +1 -0
  30. package/dist/web/_next/static/chunks/app/page-59b9867b52914a6c.js +1 -0
  31. package/dist/web/_next/static/chunks/{webpack-77147e31d2125631.js → webpack-0c3cad1f3181d857.js} +1 -1
  32. package/dist/web/_next/static/css/06f314fa5fccd68d.css +1 -0
  33. package/dist/web/defaults.html +3 -2
  34. package/dist/web/defaults.txt +9 -9
  35. package/dist/web/index.html +3 -2
  36. package/dist/web/index.txt +9 -9
  37. package/dist/web/system.html +3 -2
  38. package/dist/web/system.txt +9 -9
  39. package/package.json +6 -2
  40. package/prompts/level1.md +32 -12
  41. package/prompts/review1.md +287 -286
  42. package/dist/web/_next/static/chunks/163.dbd7d36584d0bb37.js +0 -1
  43. package/dist/web/_next/static/chunks/220.35531b39410e1a9f.js +0 -1
  44. package/dist/web/_next/static/chunks/548.71ac96c94136659b.js +0 -1
  45. package/dist/web/_next/static/chunks/584.6df695c5b86a75aa.js +0 -1
  46. package/dist/web/_next/static/chunks/67.9ed79e2fbfb56f26.js +0 -1
  47. package/dist/web/_next/static/chunks/714.1e2338736a70b9c7.js +0 -1
  48. package/dist/web/_next/static/chunks/747.d2c1249d736dc03b.js +0 -1
  49. package/dist/web/_next/static/chunks/77.a200abef0f5b4a7f.js +0 -1
  50. package/dist/web/_next/static/chunks/808-bc7d7eac6d823291.js +0 -1
  51. package/dist/web/_next/static/chunks/921-dc5538cd779c6432.js +0 -1
  52. package/dist/web/_next/static/chunks/app/defaults/page-edd7534ca9ecf366.js +0 -1
  53. package/dist/web/_next/static/chunks/app/layout-8f99a164d76897a0.js +0 -1
  54. package/dist/web/_next/static/chunks/app/page-4bed816eda370d0c.js +0 -1
  55. package/dist/web/_next/static/css/3bea264adc472bc8.css +0 -1
  56. /package/dist/web/_next/static/{_1zhoDsMOPAH2xW702E5A → FGzV3mVZpXRCVjiw1diNu}/_buildManifest.js +0 -0
  57. /package/dist/web/_next/static/{_1zhoDsMOPAH2xW702E5A → FGzV3mVZpXRCVjiw1diNu}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[808],{1035:(e,t,a)=>{a.d(t,{DialogHost:()=>c,Z:()=>d});var n=a(3365),l=a(1521),r=a(8205),i=a(4969);let s=null,o=[];function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(a=>{var n;return n={kind:"confirm",message:e,...t,resolve:a},void(s?s(n):o.push(n))})}function c(e){var t,a;let{children:d}=e,{t:c}=(0,r.kj)(),[h,u]=(0,l.useState)([]),p=(0,l.useRef)(null),m=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(s=e=>u(t=>[...t,e]),o.length>0){let e=o.splice(0,o.length);u(t=>[...t,...e])}return()=>{s=null}},[]);let f=h[0],x=(0,l.useCallback)(e=>{f&&(f.resolve(e),u(e=>e.slice(1)))},[f]);return(0,i.V)(m,!!f,p),(0,l.useEffect)(()=>{if(!f)return;let e=e=>{"Escape"===e.key&&(e.preventDefault(),x(!1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[f,x]),(0,n.jsxs)(n.Fragment,{children:[d,f&&(0,n.jsx)("div",{className:"modal-backdrop",onClick:()=>x(!1),role:"presentation",children:(0,n.jsxs)("div",{ref:m,className:"modal".concat(f.danger?" danger":""),role:"confirm"===f.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!=(t=f.title)?t:c("confirm"===f.kind?"dialog.confirmTitle":"dialog.noticeTitle")}),(0,n.jsx)("div",{id:"modal-body",className:"modal-body",children:f.message}),(0,n.jsxs)("div",{className:"row modal-actions",children:["confirm"===f.kind&&(0,n.jsx)("button",{type:"button",className:"quiet",onClick:()=>x(!1),children:c("dialog.cancel")}),(0,n.jsx)("button",{ref:p,type:"button",className:f.danger?"danger":"primary",onClick:()=>x(!0),children:null!=(a=f.okLabel)?a:c("dialog.ok")})]})]})})]})}},4969:(e,t,a)=>{a.d(t,{V:()=>r});var n=a(1521);let l='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function r(e,t,a){(0,n.useEffect)(()=>{var n,r;if(!t)return;let i=document.activeElement instanceof HTMLElement?document.activeElement:null,s=e.current,o=null!=(r=null!=(n=null==a?void 0:a.current)?n:null==s?void 0:s.querySelector(l))?r:null;null==o||o.focus();let d=e=>{if("Tab"!==e.key||!s)return;let t=Array.from(s.querySelectorAll(l)).filter(e=>null!==e.offsetParent);if(0===t.length)return;let a=t[0],n=t[t.length-1],r=s.contains(document.activeElement);e.shiftKey&&(document.activeElement===a||!r)?(e.preventDefault(),n.focus()):e.shiftKey||document.activeElement!==n&&r||(e.preventDefault(),a.focus())};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d),i&&document.contains(i)&&i.focus()}},[e,t,a])}},5462:(e,t,a)=>{a.d(t,{f:()=>r,q:()=>i});var n=a(3365),l=a(1521);function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"below",[t,a]=(0,l.useState)(!1),n=(0,l.useRef)(null),r=(0,l.useRef)(null),i=(0,l.useId)(),[s,o]=(0,l.useState)({visibility:"hidden"}),d=(0,l.useCallback)(()=>a(!1),[]),c=(0,l.useCallback)(()=>a(e=>!e),[]);return(0,l.useLayoutEffect)(()=>{var a;let l,i;if(!t)return void o({visibility:"hidden"});let s=null==(a=n.current)?void 0:a.getBoundingClientRect(),d=r.current;if(!s||!d)return;let c=d.offsetWidth,h=d.offsetHeight;"right"===e?(l=s.right+6,i=Math.min(s.top,window.innerHeight-h-8)):(l=Math.min(s.left,window.innerWidth-c-8),i=s.bottom+6+h>window.innerHeight-8?s.top-6-h:s.bottom+6),o({left:Math.max(8,l),top:Math.max(8,i)})},[t,e]),(0,l.useEffect)(()=>{if(!t)return;let e=e=>{var t,l;let i=e.target;(null==(t=r.current)?void 0:t.contains(i))||(null==(l=n.current)?void 0:l.contains(i))||a(!1)},l=e=>{var t;"Escape"===e.key&&(a(!1),null==(t=n.current)||t.focus())},i=()=>a(!1);return document.addEventListener("pointerdown",e,!0),document.addEventListener("keydown",l),window.addEventListener("resize",i),()=>{document.removeEventListener("pointerdown",e,!0),document.removeEventListener("keydown",l),window.removeEventListener("resize",i)}},[t]),{open:t,setOpen:a,toggle:c,close:d,anchor:n,panel:r,style:s,id:i}}function i(e){let{label:t,text:a}=e,l=r("below");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{ref:l.anchor,type:"button",className:"info-btn","aria-label":t,title:t,"aria-expanded":l.open,"aria-controls":l.open?l.id:void 0,onClick:l.toggle,children:"i"}),l.open&&(0,n.jsxs)("div",{ref:l.panel,id:l.id,role:"dialog","aria-label":t,className:"pop info-pop",style:l.style,children:[(0,n.jsx)("p",{className:"pop-title",children:t}),a.split(/\n\s*\n/).map(e=>(0,n.jsx)("p",{children:e},e))]})]})}},6575:(e,t,a)=>{a.d(t,{c:()=>d});var n=a(3365),l=a(9755),r=a(8205);let i={gb:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"30",height:"20",fill:"#012169"}),(0,n.jsx)("path",{d:"M0 0 30 20M30 0 0 20",stroke:"#fff",strokeWidth:"4"}),(0,n.jsx)("path",{d:"M0 0 30 20M30 0 0 20",stroke:"#c8102e",strokeWidth:"1.4"}),(0,n.jsx)("path",{d:"M15 0v20M0 10h30",stroke:"#fff",strokeWidth:"6"}),(0,n.jsx)("path",{d:"M15 0v20M0 10h30",stroke:"#c8102e",strokeWidth:"3.4"})]}),bg:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"30",height:"20",fill:"#fff"}),(0,n.jsx)("rect",{y:"6.67",width:"30",height:"6.67",fill:"#00966e"}),(0,n.jsx)("rect",{y:"13.33",width:"30",height:"6.67",fill:"#d62612"})]}),de:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"30",height:"6.67",fill:"#000"}),(0,n.jsx)("rect",{y:"6.67",width:"30",height:"6.67",fill:"#dd0000"}),(0,n.jsx)("rect",{y:"13.33",width:"30",height:"6.67",fill:"#ffce00"})]}),es:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"30",height:"20",fill:"#aa151b"}),(0,n.jsx)("rect",{y:"5",width:"30",height:"10",fill:"#f1bf00"}),(0,n.jsx)("rect",{x:"7",y:"7.5",width:"3.4",height:"5",rx:"0.8",fill:"#aa151b",opacity:"0.85"})]}),fr:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"10",height:"20",fill:"#002395"}),(0,n.jsx)("rect",{x:"10",width:"10",height:"20",fill:"#fff"}),(0,n.jsx)("rect",{x:"20",width:"10",height:"20",fill:"#ed2939"})]}),pt:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"12",height:"20",fill:"#006600"}),(0,n.jsx)("rect",{x:"12",width:"18",height:"20",fill:"#ff0000"}),(0,n.jsx)("circle",{cx:"12",cy:"10",r:"4.2",fill:"none",stroke:"#ffcc00",strokeWidth:"1.4"}),(0,n.jsx)("path",{d:"M10.3 7.8h3.4v3.2a1.7 1.7 0 0 1-3.4 0z",fill:"#fff",stroke:"#d00",strokeWidth:"0.6"})]}),jp:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"30",height:"20",fill:"#fff"}),(0,n.jsx)("circle",{cx:"15",cy:"10",r:"6",fill:"#bc002d"})]}),kr:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"30",height:"20",fill:"#fff"}),(0,n.jsx)("path",{d:"M10 10a5 5 0 0 1 10 0 2.5 2.5 0 0 1-5 0 2.5 2.5 0 0 0-5 0z",fill:"#cd2e3a"}),(0,n.jsx)("path",{d:"M10 10a5 5 0 0 0 10 0 2.5 2.5 0 0 0-5 0 2.5 2.5 0 0 1-5 0z",fill:"#0047a0"}),(0,n.jsxs)("g",{stroke:"#000",strokeWidth:"0.9",children:[(0,n.jsx)("path",{d:"M4.2 5.6 6.8 2.4M5.1 6.3 7.7 3.1M6 7 8.6 3.8"}),(0,n.jsx)("path",{d:"M21.4 3.8 24 7M22.3 3.1 24.9 6.3M23.2 2.4 25.8 5.6"}),(0,n.jsx)("path",{d:"M4.2 14.4 6.8 17.6M5.1 13.7 7.7 16.9M6 13 8.6 16.2"}),(0,n.jsx)("path",{d:"M21.4 16.2 24 13M22.3 16.9 24.9 13.7M23.2 17.6 25.8 14.4"})]})]}),sa:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"30",height:"20",fill:"#006c35"}),(0,n.jsx)("path",{d:"M7 8.2c1-.9 2 .9 3 0s2 .9 3 0 2 .9 3 0 2 .9 3 0 2 .9 3 0",fill:"none",stroke:"#fff",strokeWidth:"1.1",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M8 12.6h13.4M21.4 12.6l1.6-.9M9.6 11.6v2",stroke:"#fff",strokeWidth:"1",strokeLinecap:"round"})]})};function s(e){let{id:t}=e;return(0,n.jsx)("svg",{className:"flag",viewBox:"0 0 30 20","aria-hidden":"true",focusable:"false",children:i[t]})}var o=a(5462);function d(){let{locale:e,setLocale:t}=(0,r.Ym)(),{t:a}=(0,r.kj)(),i=(0,o.f)("below");return(0,n.jsxs)("span",{className:"lang-menu",children:[(0,n.jsxs)("button",{ref:i.anchor,type:"button",className:"lang-btn","aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.id:void 0,onClick:i.toggle,title:a("lang.menu"),children:[(0,n.jsxs)("svg",{className:"lang-globe",viewBox:"0 0 16 16","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"8",cy:"8",r:"6.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3"}),(0,n.jsx)("path",{d:"M1.5 8h13M8 1.5c2 2 2.8 4 2.8 6.5S10 12.5 8 14.5M8 1.5C6 3.5 5.2 5.5 5.2 8S6 12.5 8 14.5",fill:"none",stroke:"currentColor",strokeWidth:"1.1"})]}),(0,n.jsx)("span",{lang:"en",children:a("lang.label")}),(0,n.jsx)("span",{"aria-hidden":"true",children:"▾"})]}),i.open&&(0,n.jsx)("div",{ref:i.panel,id:i.id,role:"menu","aria-label":a("lang.menu"),className:"pop menu lang-list",style:i.style,children:l.Yj.map(a=>(0,n.jsxs)("button",{type:"button",role:"menuitemradio","aria-checked":a.code===e,onClick:()=>{t(a.code),i.close()},children:[(0,n.jsx)(s,{id:a.flag}),(0,n.jsx)("span",{className:"lang-native",lang:a.code,dir:a.dir,children:a.native}),"en"!==a.code&&(0,n.jsx)("span",{className:"lang-english muted small",lang:"en",children:a.english}),(0,n.jsx)("span",{className:"lang-tick","aria-hidden":"true",children:a.code===e?"✓":""})]},a.code))})]})}},6657:(e,t,a)=>{a.d(t,{M:()=>f,U:()=>p});var n=a(3365),l=a(1521),r=a(8197),i=a.n(r),s=a(1702),o=a(5549),d=a(8205),c=a(1035),h=a(7527),u=a(9717);function p(){let{t:e}=(0,d.kj)(),t=(0,s.usePathname)(),[a,r]=(0,l.useState)([]),[i,c]=(0,l.useState)({}),u=(0,l.useRef)({}),p=(0,l.useRef)(new Set),f=(0,l.useRef)(""),x=(0,l.useCallback)(async()=>{try{let e=await o.FH.approvals();r(e);let t=[...new Set(e.map(e=>e.sessionId).filter(e=>!(e in u.current)))],a=t.sort().join(",");if(t.length>0&&a!==f.current){for(let e of(f.current=a,await o.FH.sessions().catch(()=>[])))u.current[e.id]=e.name,"chat"===e.kind&&p.current.add(e.id);c({...u.current})}}catch(e){}},[]);(0,h.z)(x,2e3),(0,l.useEffect)(()=>{let t="copilot-operator";document.title=a.length>0?"(".concat(a.length,") ").concat(e("approval.tabTitle")," — ").concat(t):t},[a.length,e]);let v="/"===t?a.filter(e=>e.sessionId in u.current&&(!p.current.has(e.sessionId)||!!e.model)):a;return 0===v.length?null:(0,n.jsxs)("section",{className:"approval-banner",role:"alert","aria-live":"assertive",children:[(0,n.jsx)("h2",{children:e("approval.waitingHere")}),(0,n.jsx)("p",{className:"small",children:e("approval.waitingHereWhy")}),v.map(e=>{var t;return(0,n.jsx)(m,{approval:e,sessionName:null!=(t=i[e.sessionId])?t:e.sessionId,onDecided:()=>void x()},e.id)})]})}function m(e){let{approval:t,sessionName:a,onDecided:r}=e,{t:s}=(0,d.kj)(),h=(0,d.W3)(),[u,p]=(0,l.useState)(!1),[m,x]=(0,l.useState)(""),v=(0,l.useRef)(!1),g=async e=>{if(!v.current&&("run-all"!==e||await (0,c.Z)(s("approval.runAllConfirm")))){v.current=!0,p(!0),x("");try{await o.FH.decide(t.id,e)}catch(e){x(e.message)}finally{v.current=!1,p(!1),r()}}};if(t.plan)return(0,n.jsx)(f,{approval:t,sessionName:a,onDecided:r});if(t.model){var j;let e=t.model;return(0,n.jsxs)("div",{className:"approval",children:[(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("strong",{children:s(e.manual?"approval.manualTitle":"approval.modelTitle")}),(0,n.jsx)(i(),{href:"/",children:a}),(0,n.jsx)("span",{className:"muted small",children:h(t.createdAt)})]}),e.review&&(0,n.jsxs)("div",{className:"approval-review",role:"note",children:[(0,n.jsx)("strong",{children:s("approval.reviewModelTitle")}),(0,n.jsx)("span",{children:s("approval.reviewModelWhy")})]}),e.role&&(0,n.jsxs)("div",{className:"approval-review",role:"note",children:[(0,n.jsx)("strong",{children:s("lead"===e.role?"approval.leadModelTitle":"approval.workerModelTitle")}),(0,n.jsx)("span",{children:s("lead"===e.role?"approval.leadModelWhy":"approval.workerModelWhy")})]}),(0,n.jsx)("p",{children:e.manual?e.asked?s("approval.manualAsk",{model:e.asked}):s("approval.manualAskAny"):s("approval.modelAsk",{model:e.asked})}),(0,n.jsx)("p",{className:"muted small",children:s("approval.modelShown",{shown:null!=(j=e.shown)?j:"—"})}),!e.manual&&(0,n.jsx)("p",{className:"reason small",children:s("approval.modelWhy",{why:e.why,tries:e.tries})}),m&&(0,n.jsx)("p",{className:"err",role:"alert",children:m}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("button",{className:"primary",disabled:u,onClick:()=>void g("run"),children:s(e.manual?"approval.manualReady":"approval.modelChosen")}),!e.manual&&(0,n.jsx)("button",{disabled:u,onClick:()=>void g("skip"),children:s("approval.modelAsItIs")}),(0,n.jsx)("button",{className:"danger",disabled:u,onClick:()=>void g("abort"),children:s("approval.modelStop")})]})]})}return(0,n.jsxs)("div",{className:"approval",children:[(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("strong",{children:s("approval.title",{n:t.stepId})}),(0,n.jsx)(i(),{href:"/",children:a}),(0,n.jsx)("span",{className:"muted small",children:h(t.createdAt)})]}),(0,n.jsx)("pre",{style:{margin:"8px 0"},children:t.description}),t.network&&(0,n.jsx)("p",{className:"reason small",children:s("approval.network")}),m&&(0,n.jsx)("p",{className:"err",role:"alert",children:m}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("button",{className:"primary",disabled:u,onClick:()=>void g("run"),children:s("approval.run")}),!t.network&&(0,n.jsx)("button",{disabled:u,onClick:()=>void g("run-all"),title:s("approval.runAllWhy"),children:s("approval.runAll")}),(0,n.jsx)("button",{disabled:u,onClick:()=>void g("skip"),children:s("approval.skip")}),(0,n.jsx)("button",{className:"danger",disabled:u,onClick:()=>void g("abort"),children:s("approval.abort")})]})]})}function f(e){let{approval:t,sessionName:a,onDecided:r}=e,{t:s}=(0,d.kj)(),h=(0,d.W3)(),[p,m]=(0,l.useState)(""),[f,x]=(0,l.useState)(!1),[v,g]=(0,l.useState)(""),j=(0,l.useRef)(!1),w=t.plan,k=async e=>{if(j.current)return;if("revise"===e&&!p.trim())return void g(s("pm.reviseNeedsNote"));if("stop"===e&&!await (0,c.Z)(s("pm.stopConfirm")))return;j.current=!0,x(!0),g("");let a=!1;try{await o.FH.decidePlan(t.id,e,p),a=!0}catch(e){g(e.message)}finally{j.current=!1,x(!1),r(a)}};return(0,n.jsxs)("div",{className:"approval",children:[(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("strong",{children:s("pm.cardTitle",{title:w.title})}),void 0!==a&&(0,n.jsx)(i(),{href:"/",children:a}),(0,n.jsx)("span",{className:"muted small",children:h(t.createdAt)})]}),(0,n.jsx)("p",{className:"small",children:s("pm.cardWhy")}),(0,n.jsx)(u.D,{plan:w.plan,showApproval:!1}),(0,n.jsx)("label",{htmlFor:"plan-note-".concat(t.id),children:s("pm.note")}),(0,n.jsx)("textarea",{id:"plan-note-".concat(t.id),className:"prose",value:p,onChange:e=>m(e.target.value),placeholder:s("pm.notePlaceholder"),style:{minHeight:70},disabled:f}),v&&(0,n.jsx)("p",{className:"err",role:"alert",children:v}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("button",{className:"primary",disabled:f,onClick:()=>void k("approve"),children:s("pm.approve")}),(0,n.jsx)("button",{disabled:f,onClick:()=>void k("revise"),title:s("pm.reviseWhy"),children:s("pm.revise")}),(0,n.jsx)("button",{className:"danger",disabled:f,onClick:()=>void k("stop"),children:s("pm.stop")})]})]})}},7527:(e,t,a)=>{a.d(t,{z:()=>l});var n=a(1521);function l(e,t){let a=!(arguments.length>2)||void 0===arguments[2]||arguments[2],l=(0,n.useRef)(e);l.current=e,(0,n.useEffect)(()=>{let e;if(!a)return;let n=!1,r=async()=>{try{await l.current()}catch(e){}finally{n||(e=setTimeout(()=>void r(),t))}};return r(),()=>{n=!0,e&&clearTimeout(e)}},[t,a])}},8078:(e,t,a)=>{a.d(t,{AppearanceProvider:()=>c,Xm:()=>i,KP:()=>h});var n=a(3365),l=a(1521);let r="cop.appearance",i=["small","normal","large","huge","giant"];"(function(){try{\nvar d=document.documentElement,raw=localStorage.getItem('".concat(r,"'),a=raw?JSON.parse(raw):{};\nif(!a||typeof a!=='object')a={};\nd.dataset.theme=a.theme==='dark'||a.theme==='light'?a.theme:window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light';\nd.dataset.textsize=").concat(JSON.stringify(i),".indexOf(a.textSize)>=0?a.textSize:'normal';\nd.dataset.contrast=a.highContrast?'high':'normal';\nd.dataset.motion=a.reduceMotion?'reduced':'normal';\nd.dataset.links=a.underlineLinks?'underline':'plain';\nd.dataset.focus=a.strongFocus?'strong':'normal';\nd.dataset.night=a.nightLight?'on':'off';\nvar l=(localStorage.getItem('cop.locale')||'').toLowerCase();\nif(").concat(JSON.stringify(["ar"]),".indexOf(l)>=0){d.dir='rtl';d.lang=l;}\n}catch(e){}})();");let s={theme:"system",textSize:"normal",highContrast:!1,reduceMotion:!1,underlineLinks:!1,strongFocus:!1,nightLight:!1};function o(e){let t=document.documentElement;t.dataset.theme="system"===e.theme?!function(){try{return window.matchMedia("(prefers-color-scheme: dark)").matches}catch(e){return!1}}()?"light":"dark":e.theme,t.dataset.textsize=e.textSize,t.dataset.contrast=e.highContrast?"high":"normal",t.dataset.motion=e.reduceMotion?"reduced":"normal",t.dataset.links=e.underlineLinks?"underline":"plain",t.dataset.focus=e.strongFocus?"strong":"normal",t.dataset.night=e.nightLight?"on":"off"}let d=(0,l.createContext)({appearance:s,set:()=>void 0,reset:()=>void 0,loaded:!1});function c(e){let{children:t}=e,[a,c]=(0,l.useState)(s),[h,u]=(0,l.useState)(!1);(0,l.useEffect)(()=>{let e=s;try{let t=window.localStorage.getItem(r);t&&(e=function(e){let t=e&&"object"==typeof e?e:{},a=(e,t)=>"boolean"==typeof e?e:t;return{theme:"dark"===t.theme||"light"===t.theme||"system"===t.theme?t.theme:s.theme,textSize:i.includes(t.textSize)?t.textSize:s.textSize,highContrast:a(t.highContrast,s.highContrast),reduceMotion:a(t.reduceMotion,s.reduceMotion),underlineLinks:a(t.underlineLinks,s.underlineLinks),strongFocus:a(t.strongFocus,s.strongFocus),nightLight:a(t.nightLight,s.nightLight)}}(JSON.parse(t))),window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!t&&(e={...e,reduceMotion:!0})}catch(e){}c(e),o(e),u(!0)},[]),(0,l.useEffect)(()=>{let e;if("system"!==a.theme)return;try{e=window.matchMedia("(prefers-color-scheme: dark)")}catch(e){return}let t=()=>o(a);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[a]);let p=(0,l.useCallback)(e=>{c(t=>{let a={...t,...e};o(a);try{window.localStorage.setItem(r,JSON.stringify(a))}catch(e){}return a})},[]),m=(0,l.useCallback)(()=>{c(s),o(s);try{window.localStorage.removeItem(r)}catch(e){}},[]);return(0,n.jsx)(d.Provider,{value:{appearance:a,set:p,reset:m,loaded:h},children:t})}function h(){return(0,l.useContext)(d)}},9717:(e,t,a)=>{a.d(t,{D:()=>r});var n=a(3365),l=a(8205);function r(e){var t,a;let{plan:r,showApproval:i=!0}=e,{t:s}=(0,l.kj)(),o=(0,l.W3)(),d=r.approved;return(0,n.jsxs)("div",{className:"plan-view",children:[(0,n.jsx)("p",{className:"small muted",children:s("pm.version",{n:r.version,at:o(r.at)})}),i&&d&&(0,n.jsxs)("p",{className:"small",children:["operator"===d.by?s("pm.approvedByOperator",{at:o(d.at)}):s("pm.approvedAuto",{at:o(d.at)}),d.why&&" ".concat(d.why),d.note&&" ".concat(s("pm.approvedNote",{note:d.note}))]}),(0,n.jsx)("h4",{children:s("pm.existing")}),(0,n.jsx)("p",{className:"pre-wrap",children:r.existing}),(0,n.jsx)("h4",{children:s("pm.approach")}),(0,n.jsx)("p",{className:"pre-wrap",children:r.approach}),(0,n.jsx)("h4",{children:s("pm.steps")}),(0,n.jsx)("ol",{children:r.steps.map((e,t)=>(0,n.jsx)("li",{className:"pre-wrap",children:e},t))}),r.files.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h4",{children:s("pm.files")}),(0,n.jsx)("ul",{children:r.files.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)("code",{children:e})},e))})]}),(0,n.jsx)("h4",{children:s("pm.verification")}),(0,n.jsx)("p",{className:"pre-wrap",children:r.verification}),r.risks&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h4",{children:s("pm.risks")}),(0,n.jsx)("p",{className:"pre-wrap",children:r.risks})]}),(null!=(a=null==(t=r.revisions)?void 0:t.length)?a:0)>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h4",{children:s("pm.revisions")}),(0,n.jsx)("ul",{children:r.revisions.map(e=>(0,n.jsxs)("li",{className:"small",children:[s("pm.revision",{n:e.version,at:o(e.at)})," ",(0,n.jsx)("span",{className:"pre-wrap",children:e.comment})]},e.version))})]})]})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[921],{5549:(e,t,o)=>{o.d(t,{FH:()=>h});let a="/api",n="cop-api-token";function s(){try{let e=/(?:^#|&)token=([0-9a-f]{16,})/i.exec(window.location.hash);if(e)return window.localStorage.setItem(n,e[1]),window.history.replaceState(null,"",window.location.pathname+window.location.search),e[1];return window.localStorage.getItem(n)||""}catch(e){return""}}function i(e){let t=s();return t?"".concat(e).concat(e.includes("?")?"&":"?","token=").concat(encodeURIComponent(t)):e}async function r(e,t){let o,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=void 0===n.timeoutMs?3e4:n.timeoutMs;try{var r;o=await fetch("".concat(a).concat(e),{...t,...null!==i&&!(null==t?void 0:t.signal)?{signal:AbortSignal.timeout(i)}:{},headers:{"content-type":"application/json",...s()?{"x-cop-token":s()}:{},...null!=(r=null==t?void 0:t.headers)?r:{}}})}catch(t){if("TimeoutError"===t.name)throw Error("The API did not answer within ".concat(Math.round((null!=i?i:0)/1e3)," s (").concat(e.split("?")[0],"). It may be busy; try again."));throw t}if(!o.ok){let e="".concat(o.status," ").concat(o.statusText);try{let t=await o.json();(null==t?void 0:t.message)&&(e=Array.isArray(t.message)?t.message.join("; "):t.message)}catch(e){}throw Object.assign(Error(e),{status:o.status})}let h=await o.text();return h?JSON.parse(h):void 0}let h={doctor:()=>r("/doctor"),settings:()=>r("/settings"),saveSettings:e=>r("/settings",{method:"PUT",body:JSON.stringify(e)}),level1:()=>r("/level1"),sessions:()=>r("/sessions"),session:e=>r("/sessions/".concat(e)),updateSession:(e,t)=>r("/sessions/".concat(e),{method:"PUT",body:JSON.stringify(t)}),taskChanges:(e,t,o)=>r("/sessions/".concat(e,"/tasks/").concat(t,"/changes").concat(o?"?run=".concat(encodeURIComponent(o)):"")),taskChangeFile:(e,t,o,a)=>r("/sessions/".concat(e,"/tasks/").concat(t,"/changes/file?path=").concat(encodeURIComponent(o)).concat(a?"&run=".concat(encodeURIComponent(a)):"")),taskStory:(e,t,o)=>r("/sessions/".concat(e,"/tasks/").concat(t,"/story").concat(o?"?run=".concat(encodeURIComponent(o)):"")),start:(e,t)=>r("/sessions/".concat(e,"/start"),{method:"POST",body:JSON.stringify({mode:t})},{timeoutMs:12e4}),startFailures:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return r("/start/failures".concat(e?"?unanswered=1":""))},startFailureUrl:e=>i("".concat(a,"/start/failures/").concat(encodeURIComponent(e),"/report")),terminalUrl:()=>i("".concat(a,"/terminal")),stop:e=>r("/sessions/".concat(e,"/stop"),{method:"POST",body:"{}"}),pause:e=>r("/sessions/".concat(e,"/pause"),{method:"POST",body:"{}"}),resume:e=>r("/sessions/".concat(e,"/resume"),{method:"POST",body:"{}"}),approvals:e=>r("/approvals".concat(e?"?session=".concat(encodeURIComponent(e)):"")),workspace:()=>r("/workspace"),workspaceFiles:()=>r("/workspace/files"),workspaceFile:e=>r("/workspace/file?path=".concat(encodeURIComponent(e))),saveWorkspaceFile:(e,t,o)=>r("/workspace/file",{method:"PUT",body:JSON.stringify({path:e,text:t,...o?{base:o}:{}})}),workspaceGit:()=>r("/workspace/git"),workspaceCommit:e=>r("/workspace/git/commit?sha=".concat(encodeURIComponent(e))),workspaceGitFile:(e,t,o)=>r("/workspace/git/file?area=".concat(e,"&path=").concat(encodeURIComponent(t)).concat(o?"&commit=".concat(encodeURIComponent(o)):"")),chatThreads:()=>r("/chat/threads"),chatSend:(e,t,o,a,n,s,i,h)=>r("/chat",{method:"POST",body:JSON.stringify({text:e,...t?{threadId:t}:{},...o?{model:o}:{},...a?{manualModel:!0}:{},...n?{lang:n}:{},...s?{planMode:!0}:{},...void 0!==i?{review:i}:{},...h?{lead:!0,...h.workerManualModel?{workerManualModel:!0}:h.workerModel?{workerModel:h.workerModel}:{}}:{}})}),answerQuestion:(e,t)=>r("/approvals/".concat(e,"/answer"),{method:"POST",body:JSON.stringify({text:t})}),chatRewind:(e,t)=>r("/chat/".concat(e,"/rewind"),{method:"POST",body:JSON.stringify({taskId:t})}),sessionEvents:e=>r("/sessions/".concat(e,"/events")),decidePlan:(e,t,o)=>r("/approvals/".concat(e,"/plan"),{method:"POST",body:JSON.stringify({action:t,...(null==o?void 0:o.trim())?{note:o}:{}})}),decide:(e,t)=>r("/approvals/".concat(e),{method:"POST",body:JSON.stringify({action:t})}),browseFolder:e=>r("/browse-folder",{method:"POST",body:JSON.stringify({start:e})},{timeoutMs:null}),activity:()=>r("/activity"),kerrigan:e=>r("/kerrigan?lang=".concat(encodeURIComponent(e))),taskExchangeUrl:(e,t)=>i("".concat(a,"/sessions/").concat(encodeURIComponent(e),"/tasks/").concat(encodeURIComponent(t),"/exchange")),project:()=>r("/project"),setProject:e=>r("/project",{method:"PUT",body:JSON.stringify(e)}),models:()=>r("/models"),setDefaultModel:e=>r("/models/default",{method:"PUT",body:JSON.stringify({model:e})}),setDefaultReviewModel:e=>r("/models/review-default",{method:"PUT",body:JSON.stringify({model:e})}),refreshModels:()=>r("/models/refresh",{method:"POST",body:"{}"},{timeoutMs:null}),login:e=>r("/login",{method:"POST",body:JSON.stringify({account:(null==e?void 0:e.trim())||void 0})},{timeoutMs:null})}},8205:(e,t,o)=>{o.d(t,{LanguageProvider:()=>c,W3:()=>u,Ym:()=>w,kj:()=>p});var a=o(3365),n=o(1521),s=o(9051),i=o(9755);let r={en:()=>Promise.resolve().then(o.bind(o,9051)).then(e=>e.en),bg:()=>o.e(747).then(o.bind(o,9747)).then(e=>e.bg),de:()=>o.e(163).then(o.bind(o,2163)).then(e=>e.de),es:()=>o.e(548).then(o.bind(o,1548)).then(e=>e.es),fr:()=>o.e(584).then(o.bind(o,8584)).then(e=>e.fr),pt:()=>o.e(220).then(o.bind(o,7220)).then(e=>e.pt),ja:()=>o.e(77).then(o.bind(o,1077)).then(e=>e.ja),ko:()=>o.e(714).then(o.bind(o,714)).then(e=>e.ko),ar:()=>o.e(67).then(o.bind(o,9067)).then(e=>e.ar)},h="cop.locale",d=s.en,l=(0,n.createContext)({locale:"en",setLocale:()=>void 0,table:d});function c(e){let{children:t}=e,[o,s]=(0,n.useState)("en"),[c,p]=(0,n.useState)(d),w=(0,n.useRef)({en:d}),u=(0,n.useRef)("en"),m=(0,n.useCallback)(async e=>{var t,o,a;u.current=e;let n=w.current[e];if(!n)try{n=await (null!=(t=r[e])?t:r.en)(),w.current[e]=n}catch(e){return}u.current===e&&(p(n),s(e),document.documentElement.lang=e,document.documentElement.dir=null!=(a=null==(o=(0,i.eX)(e))?void 0:o.dir)?a:"ltr")},[]);return(0,n.useEffect)(()=>{var e,t,o;let a="en";try{let o=window.localStorage.getItem(h);a=null!=(t=null!=(e=(0,i.Od)(o))?e:(0,i.Od)(navigator.language))?t:"en"}catch(e){a=null!=(o=(0,i.Od)(navigator.language))?o:"en"}m(a)},[m]),(0,a.jsx)(l.Provider,{value:{locale:o,setLocale:e=>{try{window.localStorage.setItem(h,e)}catch(e){}m(e)},table:c},children:t})}function p(){let{locale:e,table:t}=(0,n.useContext)(l);return{t:function(e){var o,a;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null!=(a=null!=(o=t[e])?o:d[e])?a:e;for(let[e,t]of Object.entries(n))s=s.split("{".concat(e,"}")).join(String(t));return s},locale:e}}function w(){return(0,n.useContext)(l)}function u(){let{locale:e}=(0,n.useContext)(l);return t=>{var o;return t?new Date(t).toLocaleString(null==(o=(0,i.eX)(e))?void 0:o.dateLocale,{hour12:!1}):""}}},9051:(e,t,o)=>{o.r(t),o.d(t,{en:()=>a});let a={"nav.label":"Main","nav.live":"live","nav.liveTitle":"The chat is working right now. Open it to watch.","nav.system":"System","nav.workbench":"Chat","chat.askRun":"Run","chat.askRunAll":"Run this and the rest","chat.askSkip":"Skip","chat.askTitle":"Run this command?","chat.changed":"{n} file(s) changed:","chat.example1":"Explain how this project is laid out and how to run its tests.","chat.example2":"Run the tests and fix what fails.","chat.example3":"Add a README section that says how to start the project locally.","chat.exit":"exit {code}","chat.input":"Message to the chat","chat.lookAbove":"Waiting for an answer on the card at the top.","chat.mode":"How commands run","chat.modeAsk":"Ask before each command","chat.modeAuto":"Run commands without asking","chat.modeWhy":"Whether each command the chat sends waits for you, or runs at once; the list of forbidden commands applies either way.","git.title":"Git","git.refresh":"Read the folder's git again","git.noFolder":"No project folder is open.","git.notRepo":"The project folder is not a git repository.","git.upstream":"{name}: {ahead} ahead, {behind} behind","git.staged":"Staged changes","git.changes":"Changes","git.noChanges":"Nothing has changed since the last commit.","git.commits":"Commits","git.noCommits":"No commits yet.","git.commitFiles":"The files of {sha}","git.more":"The newest {n} are shown.","git.workingTree":"Working tree","git.index":"Index","git.status.M":"modified","git.status.A":"added","git.status.D":"deleted","git.status.R":"renamed","git.status.C":"copied","git.status.T":"type changed","git.status.U":"untracked","git.status.conflict":"in conflict","copy.copy":"Copy","copy.copied":"Copied","copy.failed":"Not copied","chat.foldOpen":"Show the whole message","chat.foldClose":"Fold the message to its first lines","chat.copyMessage":"Copy your message","chat.copyReply":"Copy what the chat said","chat.copySummary":"Copy how it ended","chat.copyCommand":"Copy the command and what it printed","chat.newChat":"New chat","chat.newChatWhy":"The next message starts a new conversation in Copilot, with nothing of this one in it. This one stays in the list, to go back to.","chat.newChatRunning":'A task is running. "New chat" comes on once it stops: press "Stop", or close the Copilot browser window.',"chat.newChatFresh":"This is a new chat already: write the first message below and it begins.","chat.exchange":"⤓ JSON","chat.exchangeWhy":"Everything between the bot and Copilot for this message, as a JSON file: every message sent, every reply, every command that ran with its whole output and exit code.","chat.newThread":"New conversation","chat.notStarted":"It did not start: {reason}","chat.notStartedYet":"Not started. The message is kept in the conversation; send another or start it from its session.","chat.noted":"Added to what it is doing: it gets this with its next report.","chat.openFolder":"Open a folder","chat.placeholder":"Ask for a change in {folder}… (Enter sends, Shift+Enter a new line)","chat.placeholderNoFolder":"Open a folder first","chat.placeholderRunning":"Add to what it is doing… it gets this with its next report","chat.queued":"Waiting to start.","chat.running":"running…","chat.send":"Send","chat.sendNote":"Add to it","chat.sendWhy":"Enter","chat.stop":"Stop","chat.review":"Review","chat.reviewWhy":"When Copilot says the work is done, a conversation of its own checks it — reads the changes, runs the checks — and sends back what it finds, until it passes or the review rounds in Settings are spent. On unless you untick it. Of this conversation, or of the next one.","chat.lead":"Two chats","chat.leadWhy":"A lead and a worker, for a task too big for one go: your message goes to a lead, which restates it to check it understands it, has a worker look at the project, plans, gives the worker one subtask at a time and judges what it reports, until the result is ready in the form you asked for. The worker runs the commands. Both are conversations in the same Copilot window. Say clearly what you want, and in which form you want the result. For a new conversation; a started one keeps how it began.","chat.leadModel":"Lead","chat.workerModel":"Worker","chat.workerSameModel":"The lead's model","lead.who":"The lead","lead.understood":"The lead understands the task as","lead.plan":"The lead's plan (version {v})","lead.subtask":"Subtask {n}: {title}","lead.readOnly":"reads only","lead.fresh":"a new worker","lead.thinking":"The lead is deciding the next step…","lead.working":"The worker is on subtask {n}…","lead.subtasks":"{n} of {max} subtasks","lead.question":"The lead asks you","lead.answer":"Your answer","lead.answerPlaceholder":"Write your answer, or choose one of the options above.","lead.send":"Send the answer","lead.stop":"Stop the task","lead.stopConfirm":"Stop this task at the lead's question? It ends as stopped; what was done so far stays.","lead.answered":"You answered","lead.evidence":"What shows it","chat.pause":"Pause","chat.pauseWhy":"Holds the work where it is: a reply Copilot is writing and a command that is running are let finish, then nothing more is sent to Copilot and no other command runs until you press Continue. The conversation and the browser window stay as they are, and the time paused does not count against the time limit.","chat.resume":"Continue","chat.resumeWhy":"Goes on with the work from where it was paused.","chat.pausedNote":"Paused: nothing is sent to Copilot and nothing runs until you press Continue.","chat.stopping":"Stopping… An answer Copilot is writing is waited for first; then nothing more is sent.","chat.rewind":"Go back to before this message","chat.rewindConfirm":"Put the folder back exactly as it was before this message, and take it and what came after it out of the conversation ({n} message(s))? The folder as it is now is kept in a safety copy in git.","chat.rewound":"Back to before that message: the folder is as it was then, and the message is in the box to send again or change.","chat.model":"Model","chat.modelDefault":"As in Settings ({model})","chat.modelByHand":"Set the model by hand","chat.readModels":"Read the latest models from Copilot","chat.modelsReading":"Reading the models from Copilot… (the browser opens for a moment)","chat.modelsRead":"The list of models is the one Copilot offers now.","chat.thread":"Conversation","chat.turn":"Message: {text}","chat.waitingTurn":"Waiting for the message before it to finish.","chat.welcome":"Ask for a change in {folder}","chat.welcomeWhy":"Copilot answers with commands; they run here in {dir}, on the branch it is on ({branch}), and their output goes back to it, until it is done. The folder is kept before each message: you can go back to any of them.","chat.working":"Working… message {n}","wb.fileOnDisk":"{path} — as it is on disk, read-only","wb.welcomeChat":"The open folder is {dir}. Write in the chat on the right what to change: Copilot runs commands here until it is done.","wb.binary":"binary","wb.chatPanel":"Chat","theme.system":"System","wb.appearance":"Appearance: theme and text","ap.smaller":"Smaller text","ap.larger":"Larger text","wb.terminalInfoLabel":"What the Terminal shows","wb.terminalInfo":"Every command Copilot had run for the latest message of the conversation open in the chat, in the order they ran: the command, how it ended (its exit code) and everything it printed. While the message is being worked on, it follows the newest command.\n\nNothing is typed here: it shows what ran on this machine, in the open folder. A new chat starts it empty.","wb.problemsInfoLabel":"What the Problems show","wb.problemsInfo":'What did not go well in the conversation open in the chat: a message that ended unfinished, stopped or at a limit, and why; a check that did not pass. Press one to bring its message into view in the chat.\n\n"Seen" takes a problem off the list and the count, in this browser only; the message itself keeps it. The number on the tab counts the ones not seen yet.',"wb.outputInfoLabel":"What the Output shows","wb.outputInfo":"The bot's own log of the conversation open in the chat, newest at the bottom, each line with its time: the browser opening and the sign-in, the model, each message sent to Copilot and its answer arriving, the commands asked for and run, a stop, an error.\n\nRed lines are errors, yellow ones warnings. It is what to read when something did not go as expected.","wb.pickChat":"Write a message in the chat: what it runs shows here.","wb.problemShow":"Show its message in the chat","wb.cmdThread":"Open the conversation “{name}” in the chat","kerrigan.button":"Kerrigan","kerrigan.menu":"Kerrigan: save or copy","kerrigan.save":"Save as a file","kerrigan.copy":"Copy to the clipboard","kerrigan.saved":"Saved as {name}. Give it to a chat at the start of a conversation.","kerrigan.copied":"Copied ({n} characters). Paste it at the start of a conversation with a chat of your choice.","kerrigan.copyFailed":'The browser would not copy it. Use "Save as a file" instead.',"kerrigan.failed":"Kerrigan could not be read: {reason}","kerrigan.infoLabel":"What is Kerrigan?","kerrigan.info":'Kerrigan is a helper you may use or not. The button gives you a text — a persona — to paste at the start of a conversation with any chat you like: Microsoft Copilot, ChatGPT or another. With it, that chat knows what copilot-operator is and how it works, knows your projects with the level 2 you write for each in Settings, and helps you write a task for it: what to ask for in one message, which files and folders to name, how to say what "done" looks like and how to check it, what to leave alone. When something in the program is unclear, it explains it and leads you through it until the task is done.\n\nYou then copy the message it helped you write into the chat here. The chat here does not need Kerrigan and works just as well without her; this button sends nothing anywhere.',"ap.night":"Night light","chat.planMode":"Plan mode","chat.planModeWhy":"Copilot first looks at the project without changing anything and proposes a plan; the work starts once you approve it here.","chat.planShown":"The approved plan (version {v})","ed.save":"Save","ed.revert":"Undo my changes","ed.saved":"Saved.","ed.clean":"No changes","ed.unsaved":"Not saved","ed.language":"Language","ed.langAuto":"Automatic ({name})","ed.label":"The text of {path}","ed.changedOnDisk":"The file changed on disk after you opened it (the chat, or another program, changed it).","ed.reload":"Read it again (my changes are lost)","ed.saveOver":"Save over it","ed.closeUnsaved":'"{name}" has changes that are not saved. Close it and lose them?',"wb.chatTab":"Chat","wb.closeTab":"Close {name}","wb.cmdChat":"Write in the chat","wb.cmdCommits":"Show Git: the changes and the commits","wb.cmdFiles":"Show the repository’s files","wb.cmdGo":"Go to: {page}","wb.cmdPanel":"Show or hide the panel","wb.cmdProblems":"Show the problems","wb.cmdSide":"Show or hide the explorer","wb.editor":"Editor","wb.explorer":"Explorer","wb.files":"Files","wb.idle":"Nothing is running","wb.keys":"Ctrl+K: find anything \xb7 Ctrl+B: explorer \xb7 Ctrl+J: panel \xb7 Ctrl+L: write to the chat","wb.loading":"Reading…","wb.modelDefault":"the chat’s default model","wb.modelNow":"The model the session runs on","wb.noEvents":"Nothing has happened in this session yet.","wb.noProblems":"No problems in this session.","wb.problemSeen":"Seen","wb.problemSeenWhy":"Takes it off the list and the count, in this browser. It is still on its task, and shows again if a later run of the task has it again.","wb.problemsAllSeen":"Seen all","wb.problemsShowSeen":"Show the {n} seen","wb.problemsHideSeen":"Hide the seen","wb.problemsNoneNew":"Nothing new: every problem here has been seen.","wb.newChatTerminal":"A new chat: its commands show here once it runs.","wb.newChatProblems":"A new chat: nothing has gone wrong in it.","wb.newChatOutput":"A new chat: what it does shows here once it runs.","wb.noSteps":"This task ran no commands yet.","wb.noTabs":"Open a file from the explorer.","wb.openRunning":"Show the conversation that is running in the chat","wb.openTabs":"Open tabs","wb.output":"Output","wb.palette":"Find a command, a page or a conversation","wb.paletteNone":"Nothing found.","wb.palettePlaceholder":"Type to find…","wb.paletteWhy":"Every command, page and conversation of the chat, by a few letters (Ctrl+K)","wb.panel":"Panel","wb.problems":"Problems","wb.refresh":"Read again","wb.resize":"Drag to resize","wb.runningLine":"{session} › {task} \xb7 message {n}/{max} \xb7 {m}/{maxm} min","wb.pausedTag":"paused","wb.runningNow":"running…","wb.status":"Status","wb.terminal":"Terminal","wb.toggleChat":"Show or hide the chat","wb.tooLarge":"Too large to show.","wb.viewCommits":"Git","wb.viewFiles":"Files","wb.views":"Views","wb.waiting":"{n} waiting for you","wb.welcome":"Welcome","wb.welcomeWhy":"Open a folder: the chat on the right works in it, and its files and git are on the left.","dialog.confirmTitle":"Are you sure?","dialog.noticeTitle":"Notice","dialog.ok":"OK","dialog.cancel":"Cancel","exec.title":"Execution","exec.intro":"How a task runs: how long it may go on, what happens at a limit, and what may run without you. Saved in data/settings.json; applies to tasks started from now on.","exec.maxIterations":"Most messages to the chat in one task","exec.maxIterationsUnit":'messages, then the task stops as "limit reached"',"exec.maxIterationsWhy":"Each message is one round: the chat sends steps, the runner runs them and reports back. This stops a task that goes round in circles; it is not what limits traffic — that is the hourly cap, which waits instead of stopping. A task that stops here can be continued in the same chat.","exec.maxSubtasks":"Most subtasks the lead may give","exec.maxSubtasksUnit":"subtasks for one message with two chats","exec.maxSubtasksWhy":"In a conversation with two chats, the lead gives the worker one subtask at a time; each is a task of the worker's, with the limits above. This bounds the whole message: when they run out, the lead is told to deliver what it has. Applies to messages started from now on.","exec.maxRunMinutes":"Longest a task may run","exec.maxRunMinutesUnit":"minutes","exec.maxRunMinutesWhy":"Counted from the task's first message, waits for the hourly cap included. A task that stops here can be continued in the same chat.","exec.replyTimeout":"How long to wait for a reply from the chat","exec.replyTimeoutUnit":"seconds (900 = 15 minutes)","exec.replyTimeoutWhy":'From sending a message to the reply having finished. A reply not finished by then ends the task as failed — "Copilot did not finish a reply within …" — with a screenshot of the chat in the run folder. The slower models and long answers can take several minutes. Applies to runs started from now on.',"startdlg.title":"Where the work starts","pm.cardTitle":"Plan for “{title}”, waiting for approval","pm.cardWhy":"Nothing has been changed yet. The work starts once you approve this plan.","pm.note":"Note for the chat (optional when approving; says what to change when asking for another plan)","pm.notePlaceholder":"e.g. Keep the old endpoint working; do not touch the migrations.","pm.approve":"Approve and start the work","pm.revise":"Ask for another plan","pm.reviseWhy":"The chat makes a new plan with your note; the same card comes back with it.","pm.reviseNeedsNote":"Say in the note what the new plan should change.","pm.stop":"Stop the task","pm.stopConfirm":"Stop this task without doing the work? It ends as stopped and can be run again.","pm.version":"Plan version {n}, {at}","pm.approvedByOperator":"Approved by the operator, {at}.","pm.approvedAuto":"Approved by the runner, {at}.","pm.approvedNote":"Note: {note}","pm.existing":"Already there","pm.approach":"Approach","pm.steps":"Steps","pm.files":"Files it expects to change","pm.verification":"How it will show the work is done","pm.risks":"Risks","pm.revisions":"Earlier versions, and what was asked to change","pm.revision":"Version {n} ({at}):","startfail.laterSession":"A session of a run that was going could not begin:","startdlg.goStep":"Start, asking before each command","startdlg.goUnattended":"Start without asking","startfail.title":"The work did not start","startfail.where":"Where it stopped: {stage}.","startfail.stage.refused":"the start was not let in, before anything opened","startfail.stage.branch":"the branch chosen to start from","startfail.stage.preflight":"the version control check, before the browser opened","startfail.stage.browser":"opening the browser (Edge), its profile or the chat","startfail.stage.run":"the run, before its first task began","startfail.stage.at-turn":"this session's turn in the run, before its first task","startfail.stage.error":"the bot itself, while starting","startfail.when":"{when}, run {run}","startfail.whenNoRun":"{when}","startfail.download":"Download what happened (error, run record and terminal)","startfail.terminal":"Download what the terminal showed","startfail.downloadWhy":"A text file with the error, where it stopped, the run's own record, the sessions' events and every line the bot's console printed from the press to a few seconds after. Secret-shaped text is taken out.","startfail.dismiss":"Close this notice","startfail.later":"This run was accepted and then could not begin:","sys.terminalWhy":"The bot's console — what npm start or cop start printed — as a text file: the latest lines, each with its time, secret-shaped text taken out. Everything since the bot started is also in the data folder, logs\\terminal.log.","exec.autoContinue":"Keep going after a limit","exec.autoContinueUnit":"times per task, then it waits for “Continue” (0 = stop at the limit)","exec.autoContinueWhy":"A task stopped by a limit below — messages, minutes, the wait for a reply, replies in the wrong shape, rounds of fixing failed checks or review findings — is carried on at once in its own chat, from where it got to, as “Continue” would, this many times. So the work goes on until the task is done, and the limits still bound it: a task gets at most this number plus one of each. A task that blocked (the chat says it needs something) goes to a fresh chat, then waits for you; a task you stopped is never carried on.","exec.maxReviewRounds":"Rounds of fixing after a failed review","exec.maxReviewRoundsUnit":'rounds, then the task ends "blocked" with the review\'s findings',"exec.maxReviewRoundsWhy":"When the independent review fails the work, its findings go back to the chat to fix, and the work is reviewed again. This is how many times. It is a separate limit from the approaches above: those count how the chat gives up, these count reviews. 3 or 4 gives the work one or two more chances; more rarely helps — a finding that survives several fixes usually means the task itself has to be worded differently.","exec.minApproaches":"Approaches the chat must try before it may give up","exec.minApproachesUnit":'different approaches, then "blocked" is accepted',"exec.minApproachesWhy":'A task ends "blocked" when the chat says it cannot finish and lists what it tried. With fewer approaches than this, the runner sends it back asking for another, different one. The format\'s own minimum is 2. Three "blocked" replies in a row with nothing new tried are accepted anyway.',"exec.retryBlocked":"When a task ends blocked, run it again in a fresh conversation","exec.retryBlockedTimes":"times, then accept the verdict","exec.retryBlockedWhy":"The runner cannot tell why a task blocked: the prompt, the machine, or the chat itself — a long conversation whose early turns Copilot can no longer see. A fresh chat, with the contract sent again, cures a cause in the chat and nothing else. A task that comes back done was blocked by the chat; one that blocks again was not, and both attempts stay on its record. 0 turns this off.","exec.isolation":"Where the bot runs","exec.isolationNone":"Nowhere in particular — this account","exec.isolationNoneAccepted":"This account — I accept unattended runs without isolation","exec.isolationAccount":"A separate low-privilege Windows account","exec.isolationSandbox":"Windows Sandbox","exec.isolationVm":"A virtual machine","exec.isolationWhy":'Commands written by the model run as whoever this process is. Saying so here is what lets a run go unattended: with "nowhere in particular" chosen, a run without a person watching is refused, because nobody watching and nothing containing is the combination this will not be — unless you choose "I accept unattended runs without isolation", which allows it on your responsibility and is recorded with every run as exactly that. It is your statement, not a check — the runner records it, notes the account it actually holds, and says so when the two disagree.',"exec.startMode":"Starting a run without supervision","exec.startModeAsk":'Ask "are you sure" every time',"exec.startModeAuto":"Start it without asking","exec.startModeWhy":'With "Run commands without asking" chosen under the chat\'s box, the first message of a conversation asks "are you sure" before it starts. Choose "Start it without asking" and it simply starts — you decided once, here. The list of forbidden commands still applies, and a run on this machine can only go without supervision if "Where the bot runs" above allows it.',"exec.networkFetch":"A command that downloads, in a run without supervision","exec.networkFetchAsk":"Wait for me on the approval screen","exec.networkFetchRefuse":"Refuse it and tell the chat why — the run never waits","exec.networkFetchRun":"Run it without asking","exec.networkFetchWhy":"Invoke-WebRequest, curl, wget and the like. Waiting for you is the one stop a run without supervision still makes. Refusing sends the chat the reason and what to do instead (the project’s package manager, or writing the file with a step), so the run goes on without you. Running it means a later step can run what arrived without anyone having read it — choose it only on a machine where that is acceptable; every task records the choice. npm, dotnet, pip and git are never held, and a step-by-step run shows every command whatever is chosen here.","exec.saved":"Saved. Applies to runs started from now on.","diff.open":"See the changes ({n} file(s))","diff.openWhy":"Every file this attempt changed, before on the left and after on the right, with the differences marked.","diff.title":'Changes in "{title}"',"diff.summary":"{n} file(s), +{a} −{r}","diff.keys":"n / p: next and previous change \xb7 ] / [: next and previous file \xb7 Esc: close","diff.close":"Close","diff.loading":"reading…","diff.nothing":"The commit changed no file.","diff.files":"Changed files","diff.binaryShort":"binary","diff.added":"new file","diff.deleted":"deleted","diff.renamed":"renamed","diff.prevChange":"Previous change","diff.nextChange":"Next change","diff.changeN":"change {i} of {n}","diff.prevFile":"Previous file","diff.nextFile":"Next file","diff.whole":"Show the whole file","diff.wrap":"Wrap long lines","diff.binary":"A binary file: its contents are not shown.","diff.tooLarge":"Over 2 MB: too large to show here.","diff.eol":"The line endings changed ({from} → {to}); the lines themselves are compared without them.","diff.sameText":"The text is the same; only the file mode or the line endings changed.","diff.before":"Before","diff.after":"After","diff.gap":"⋯ {n} unchanged line(s) — show them","scroll.top":"To the top of the page","scroll.bottom":"To the bottom of the page","sys.profileBot":"In use by the bot's own run right now ({n} Edge process(es)). That is expected while a session runs.","lang.label":"Language","lang.menu":"The language of the interface","a11y.skip":"Skip to the content","theme.light":"Light","theme.dark":"Dark","status.queued":"queued","status.running":"running","status.waiting-approval":"waiting for approval","status.done":"done","status.blocked":"not done","status.failed":"failed","status.aborted":"aborted","status.limit-reached":"limit reached","session.unattendedConfirm":"This runs on its own: the commands Copilot writes will be executed without asking you, until the queue is finished. The list of forbidden commands still applies. Start it?","approval.title":"Step {n} is waiting for you","approval.modelTitle":"Choose the model — the bot could not","approval.manualTitle":"Choose the model for this run","approval.reviewModelTitle":"This is the model for the REVIEW","approval.reviewModelWhy":"A conversation of its own now checks the work. Choose a model different from the one the work was done with — a stronger one if you can: a second pair of eyes catches more mistakes when it does not think like the first.","approval.leadModelTitle":"This is the model for the LEAD","approval.leadModelWhy":"The lead understands the task, plans, directs the worker and judges what it reports: choose the strongest reasoning model you have.","approval.workerModelTitle":"This is the model for the WORKER","approval.workerModelWhy":"The worker runs the commands of each subtask and reports back: choose a model good at code and at following instructions.","approval.manualAsk":'In the Copilot window, open the model picker and choose "{model}". Then press "Ready — continue".',"approval.manualAskAny":'In the Copilot window, open the model picker and choose the model you want. Then press "Ready — continue".',"approval.manualReady":"Ready — continue","def.manualModel":"Choose the model by hand at the start of each run","def.manualModelWhy":'The bot leaves the model picker alone. At the start of a run, and of a review, a card appears here asking you to choose the model in the Copilot window and press "Ready"; the bot checks it and goes on. A conversation already on the model is not asked about — the chat keeps its model. On by default: turn it off to let the bot choose the model itself.',"approval.modelAsk":'In the Copilot window, open the model picker and choose "{model}". Then press the button below: the bot checks the picker and goes on.',"approval.modelShown":"The picker shows now: {shown}","approval.modelWhy":"Why the bot could not: {why} (asked {tries} time(s))","approval.modelChosen":"I chose it — check and continue","approval.modelAsItIs":"Continue on the model it is on","approval.modelStop":"Stop","approval.run":"Run","approval.runAll":"Run this and the rest without asking","approval.runAllWhy":"Answers this step with Run and stops asking for every step after it, for the rest of this run. Commands on the deny list are still refused, and a command that downloads from the internet does what Settings → Execution says (by default it still asks).","approval.runAllConfirm":"From here on, commands written by Copilot will run without asking, until this run ends. Commands on the deny list are still refused, and a command that downloads from the internet does what Settings → Execution says (by default it still asks). Continue?","approval.network":"This command downloads from the internet. A run that does not ask still stops for this one (unless Settings → Execution says otherwise), because a later step could run what arrived. Run it only if you know what it fetches and why.","approval.skip":"Skip","approval.abort":"Abort task","model.refresh":"Read the list from Copilot","model.refreshConfirm":"This opens the bot’s Edge window, reads the model picker and closes it again. It cannot run while a session is running. Continue?","model.refreshing":"opening the chat and reading the picker…","model.refreshed":"read {n} model(s) from the chat","model.readAt":"Read {t}: {n} option(s).","model.neverRead":"The list has never been read on this machine. Press the button to read it from the chat.","model.none":"The chat did not offer a model picker.","model.notInList":"{name} (saved, not in the list that was read)","model.unavailable":"not available","vcs.commit":"Commit when a task finishes","mirror.browse":"Browse…","checks.kind.exit-zero":"the command succeeds","sys.machine":"This machine","sys.loading":"Loading…","sys.version":"copilot-operator version","sys.node":"Node","sys.edge":"Edge","sys.edgeMissing":"not found","sys.profile":"Bot profile","sys.profileMissing":"(not created yet: run cop login)","sys.profileInUse":"Profile in use","sys.profileHeld":"Edge is holding the profile (pids {pids}). A run would fail. Close that Edge window.","sys.profileUnknown":"could not check","sys.profileFree":"free","sys.desktop":"Desktop","sys.desktopSynced":"(backed up by OneDrive)","sys.desktopLocal":"(not backed up by OneDrive; what is saved there stays local)","sys.cwd":"Fallback folder for commands (a session runs in its own project folder)","sys.runs":"Runs folder","sys.data":"Data folder","sys.mode":"Default mode","sys.settings":"Settings","sys.settingsHint":"Read from {file} next to the project. It has the same shape as {example}; anything missing takes the default. Edit the file and restart the API.","sys.asSaved":"As saved","sys.resolved":"Resolved paths","sys.signin":"Sign-in","sys.signinHint":"Signing in is done once, from the terminal, so that the bot never handles credentials:","ap.theme":"Theme","ap.size":"Text size","ap.sizeSmall":"Small","ap.sizeNormal":"Normal","ap.sizeLarge":"Large","ap.sizeHuge":"Larger","ap.sizeGiant":"Largest","ap.contrast":"Higher contrast","ap.motion":"Less motion","ap.links":"Underline every link","ap.focus":"Thick focus outline","ap.reset":"Back to the defaults","nav.defaults":"Settings","def.title":"Settings","def.intro":"The folders the chat works in, the sign-in to Copilot, the models, and how a task runs. Each field has an ⓘ beside its name that says what it is for and how it helps.","def.autoSave":"Everything on this page saves itself as you change it. There is nothing to press.","def.savedAutomatically":"saved as you type","def.saveAnyway":"Save","def.saveAnywayWhy":"It is already saved. This button exists for the comfort of pressing one.","info.about":"About “{name}”","l1.title":"The base prompt (level 1)","l1.readOnly":"read only","l1.what":"This text is for reading. It describes the agent Copilot becomes in the chat: it works through a task step by step with commands, reports what each one did, and takes every task to its end — done, or blocked with what it needs. It comes with the bot and changes only when the bot is updated. If something about the chat is unclear, Kerrigan (the button on the chat's home screen) can guide you through it until the task is done.","l1.show":"Show the whole text","l1.failed":"The base prompt could not be read: {reason}","proj.namePlaceholder":"the folder's own name","proj.nameSaved":"Name saved.","def.reviewTitle":"Model for the review","def.reviewIntro":'When Copilot says a task is done, a conversation of its own reviews the work, unless "Review" under the chat\'s box is unticked. It reads the changes, runs the checks and sends back what it finds.',"def.reviewInfo":"The model the review's conversation is put on. Best a different one from the work's, and a stronger one: a second pair of eyes catches more mistakes when it does not think like the first. With the model chosen by hand, the card that asks for it says it is the review's.","def.reviewField":"Review model","def.reviewNone":"None chosen here","def.reviewSaved":"The review will run on {name}.","def.reviewCleared":"Cleared: the review is not put on a model of its own.","def.reviewSame":"This is the same model as the one doing the work. A different one would catch more.","login.title":"Sign in to Copilot","login.intro":'The bot works in an Edge profile of its own, which has to be signed in to Microsoft 365 Copilot before the chat can work or the models can be read — what "cop login" does in a terminal. The window opens and you sign in there yourself; the bot never types a password. It closes when the chat appears.',"login.account":"Account (optional)","login.accountWhy":"Empty: whatever account you sign in with. With an address, the profile is signed out first and Microsoft is asked for that account, because Edge on a work machine otherwise signs in with whichever account Windows knows.","login.button":"Sign in to Copilot","login.busy":"Waiting for you to sign in…","login.waiting":"An Edge window has opened. Sign in there; this page waits until the chat appears.","def.modelTitle":"Model for new conversations","def.modelIntro":"The model a new chat conversation starts on, unless one is chosen under the chat's box.","def.modelInfo":'Chosen by the exact name Copilot\'s own picker shows, from the list read from it last ("Read the list from Copilot"); the list belongs to Microsoft and differs per tenant. A conversation that chose its own under the chat\'s box keeps it. With "Choose the model by hand at the start of each run" ticked, nothing is chosen for you: a card asks you to choose it in the Copilot window.',"def.modelField":"Model","def.modelNone":"Leave the chat on whatever it is set to","def.modelSaved":"New conversations will start on {name}.","def.modelCleared":"Cleared. New conversations leave the chat on whatever it is set to.","proj.title":"Projects","proj.intro":'The first project is the folder the chat works in; "Open a folder" on the chat\'s screen changes it too. The others are the rest of the repositories you work in. Kerrigan knows every one of them, with what you write in its level 2.',"proj.saved":"The chat works in {dir}.","proj.clear":"Clear","proj.cleared":"Cleared. No folder is open for the chat.","proj.none":"No folder is set for the chat: type one here or open one from the chat's screen.","proj.isRepo":"This folder is a git repository: each message can be undone, and its changes shown.","proj.notRepoWhy":'It can still be a project: the files are there and the chat can work in it. Without git, though, a message cannot be undone and its changes cannot be shown; "git init" in the folder fixes that.',"proj.isDefault":"the chat's folder","proj.isDefaultWhy":"The chat works in this one: its commands run here, and the explorer shows it.","proj.entryName":"Name","proj.entryDir":"Folder","proj.nameInfo":"What you call the project. Kerrigan and the lists use it. Left empty, it is the folder's own name.","proj.dirInfo":"The project's folder on this machine. For the first project, it is where the chat's commands run and what the explorer shows. Best a git repository: then each message can be undone and its changes shown.","proj.level2":"Level 2 template (for Kerrigan)","proj.level2Info":"Notes about this project, in your own words: what it is, its stack and versions, its conventions, how it is built and how its tests run, what must not be touched. They become part of Kerrigan: when you save or copy her, she knows this project and helps you write tasks that fit it. The bot sends them nowhere by itself. Up to {n} characters.","proj.level2Placeholder":"e.g. A .NET 8 web API with a React front end in /web. Build: dotnet build. Tests: dotnet test. Never edit the migrations in /db.","proj.level2Saved":"Level 2 of {name} saved: Kerrigan has it.","proj.level2Count":"{n} / {max} characters","proj.branch":"Branch: {name}","proj.detached":"No branch (a detached HEAD)","proj.branchInfo":"The branch checked out in this folder right now, read from git each time the page opens. The chat works on whatever is checked out and makes no branch of its own: switch it in git when you want the work elsewhere.","proj.addTitle":"Add another project","proj.othersIntro":"Another repository you work in — a front end, a back end, the tests — with a short name. Kerrigan knows it, with its level 2.","proj.otherAdd":"Add","proj.otherRemove":"Remove","proj.othersSaved":"Saved: {n} other project(s).","proj.otherRepo":"git repository","proj.otherNotRepo":"not a git repository","approval.tabTitle":"waiting for you","approval.waitingHere":"A step is waiting for your decision","approval.waitingHereWhy":"Shown on every page while a step waits, so a run never looks stuck because the page that asks is not the one open."}},9755:(e,t,o)=>{o.d(t,{Od:()=>s,Yj:()=>a,eX:()=>n});let a=[{code:"en",english:"English",native:"English",flag:"gb",dir:"ltr",dateLocale:"en-GB"},{code:"bg",english:"Bulgarian",native:"Български",flag:"bg",dir:"ltr",dateLocale:"bg-BG"},{code:"de",english:"German",native:"Deutsch",flag:"de",dir:"ltr",dateLocale:"de-DE"},{code:"es",english:"Spanish",native:"Espa\xf1ol",flag:"es",dir:"ltr",dateLocale:"es-ES"},{code:"fr",english:"French",native:"Fran\xe7ais",flag:"fr",dir:"ltr",dateLocale:"fr-FR"},{code:"pt",english:"Portuguese",native:"Portugu\xeas",flag:"pt",dir:"ltr",dateLocale:"pt-PT"},{code:"ja",english:"Japanese",native:"日本語",flag:"jp",dir:"ltr",dateLocale:"ja-JP"},{code:"ko",english:"Korean",native:"한국어",flag:"kr",dir:"ltr",dateLocale:"ko-KR"},{code:"ar",english:"Arabic",native:"العربية",flag:"sa",dir:"rtl",dateLocale:"ar"}],n=e=>a.find(t=>t.code===e);function s(e){var t,o,a;return null!=(a=null==(t=n(null!=(o=(null!=e?e:"").toLowerCase().split(/[-_]/)[0])?o:""))?void 0:t.code)?a:null}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[189],{1035:(e,t,l)=>{"use strict";l.d(t,{DialogHost:()=>c,Z:()=>d});var n=l(3365),a=l(1521),i=l(8205),r=l(4969);let o=null,s=[];function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(l=>{var n;return n={kind:"confirm",message:e,...t,resolve:l},void(o?o(n):s.push(n))})}function c(e){var t,l;let{children:d}=e,{t:c}=(0,i.kj)(),[u,m]=(0,a.useState)([]),h=(0,a.useRef)(null),v=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(o=e=>m(t=>[...t,e]),s.length>0){let e=s.splice(0,s.length);m(t=>[...t,...e])}return()=>{o=null}},[]);let x=u[0],p=(0,a.useCallback)(e=>{x&&(x.resolve(e),m(e=>e.slice(1)))},[x]);return(0,r.V)(v,!!x,h),(0,a.useEffect)(()=>{if(!x)return;let e=e=>{"Escape"===e.key&&(e.preventDefault(),p(!1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[x,p]),(0,n.jsxs)(n.Fragment,{children:[d,x&&(0,n.jsx)("div",{className:"modal-backdrop",onClick:()=>p(!1),role:"presentation",children:(0,n.jsxs)("div",{ref:v,className:"modal".concat(x.danger?" danger":""),role:"confirm"===x.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!=(t=x.title)?t:c("confirm"===x.kind?"dialog.confirmTitle":"dialog.noticeTitle")}),(0,n.jsx)("div",{id:"modal-body",className:"modal-body",children:x.message}),(0,n.jsxs)("div",{className:"row modal-actions",children:["confirm"===x.kind&&(0,n.jsx)("button",{type:"button",className:"quiet",onClick:()=>p(!1),children:c("dialog.cancel")}),(0,n.jsx)("button",{ref:h,type:"button",className:x.danger?"danger":"primary",onClick:()=>p(!0),children:null!=(l=x.okLabel)?l:c("dialog.ok")})]})]})})]})}},1272:(e,t,l)=>{"use strict";l.d(t,{O:()=>a});var n=l(3365);function a(){return(0,n.jsxs)("svg",{className:"branch-ico",viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",children:[(0,n.jsx)("path",{d:"M4.5 3.5v9M4.5 10c0-3 7-2.5 7-5.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,n.jsx)("circle",{cx:"4.5",cy:"3",r:"1.7",fill:"currentColor"}),(0,n.jsx)("circle",{cx:"4.5",cy:"13",r:"1.7",fill:"currentColor"}),(0,n.jsx)("circle",{cx:"11.5",cy:"4.2",r:"1.7",fill:"currentColor"})]})}},1896:(e,t,l)=>{Promise.resolve().then(l.bind(l,3197))},3197:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>u});var n=l(3365),a=l(1521),i=l(5549),r=l(8205),o=l(1035),s=l(4784),d=l(5462),c=l(1272);function u(){let{t:e}=(0,r.kj)(),[t,l]=(0,a.useState)(null),[s,d]=(0,a.useState)(!1),[c,u]=(0,a.useState)("");(0,a.useEffect)(()=>{i.FH.models().then(l).catch(()=>void 0)},[]);let m=async()=>{if(await (0,o.Z)(e("model.refreshConfirm"))){d(!0),u(e("model.refreshing"));try{var t;let n=await i.FH.models().then(()=>i.FH.refreshModels());l(n),u(0===n.options.length?null!=(t=n.note)?t:e("model.none"):e("model.refreshed",{n:n.options.length}))}catch(e){u(e.message)}finally{d(!1)}}},h={catalogue:t,setCatalogue:l,refreshModels:m,refreshing:s,refreshMsg:c};return(0,n.jsxs)("div",{className:"settings",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)(j,{}),(0,n.jsx)(b,{}),(0,n.jsx)(y,{}),(0,n.jsx)(w,{...h}),(0,n.jsx)(N,{...h}),(0,n.jsx)(S,{})]})}function m(e){let{htmlFor:t,label:l,info:a,as:i="label"}=e,{t:o}=(0,r.kj)();return(0,n.jsxs)("div",{className:"field-label",children:["label"===i?(0,n.jsx)("label",{htmlFor:t,children:l}):(0,n.jsx)("span",{className:"field-name",children:l}),(0,n.jsx)(d.q,{label:o("info.about",{name:l}),text:a})]})}function h(e){let{id:t,label:l,info:a,unit:i,children:r}=e;return(0,n.jsxs)("div",{className:"settings-field",children:[(0,n.jsx)(m,{htmlFor:t,label:l,info:a}),(0,n.jsxs)("div",{className:"field-control",children:[r,i&&(0,n.jsx)("span",{className:"unit",children:i})]})]})}function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:900,l=(0,a.useRef)(null),n=(0,a.useRef)(null),i=(0,a.useRef)(e);return i.current=e,(0,a.useEffect)(()=>()=>{l.current&&clearTimeout(l.current),n.current&&i.current(n.current.value)},[]),e=>{l.current&&clearTimeout(l.current),n.current={value:e},l.current=setTimeout(()=>{n.current=null,i.current(e)},t)}}function x(e){let{id:t,value:l,min:i,max:r,onChange:o,disabled:s}=e,[d,c]=(0,a.useState)(String(l));return(0,a.useEffect)(()=>c(e=>p(e)===l?e:String(l)),[l]),(0,n.jsx)("input",{id:t,type:"number",className:"number",min:i,max:r,step:1,value:d,onChange:e=>{c(e.target.value);let t=p(e.target.value);null!==t&&t>=i&&t<=r&&o(t)},onBlur:()=>{let e=p(d),t=null===e?l:Math.max(i,Math.min(r,e));c(String(t)),t!==l&&o(t)},disabled:s})}function p(e){if(""===e.trim())return null;let t=Number(e);return Number.isInteger(t)?t:null}function f(e){let{msg:t,onSave:l}=e,{t:a}=(0,r.kj)();return(0,n.jsxs)("div",{className:"row saved-note",children:[l&&(0,n.jsx)("button",{className:"quiet",onClick:l,title:a("def.saveAnywayWhy"),children:a("def.saveAnyway")}),(0,n.jsx)("span",{className:"muted small",role:"status",children:t||a("def.savedAutomatically")})]})}function j(){let{t:e}=(0,r.kj)(),[t,l]=(0,a.useState)(null),[o,s]=(0,a.useState)("");return(0,a.useEffect)(()=>{i.FH.level1().then(e=>l(e.content)).catch(t=>s(e("l1.failed",{reason:t.message})))},[]),(0,n.jsxs)("section",{className:"panel",id:"level1","aria-labelledby":"level1-title",children:[(0,n.jsxs)("div",{className:"row section-title",children:[(0,n.jsx)("h2",{id:"level1-title",children:e("l1.title")}),(0,n.jsx)("span",{className:"badge",children:e("l1.readOnly")})]}),(0,n.jsx)("div",{className:"callout",role:"note",children:e("l1.what")}),o&&(0,n.jsx)("div",{className:"err",children:o}),(0,n.jsxs)("details",{className:"l1-text",children:[(0,n.jsx)("summary",{children:e("l1.show")}),(0,n.jsx)("pre",{className:"l1-pre",children:null!=t?t:"…"})]})]})}function b(){var e,t;let{t:l}=(0,r.kj)(),[o,s]=(0,a.useState)(null),[d,c]=(0,a.useState)(""),[u,h]=(0,a.useState)(""),[x,p]=(0,a.useState)(""),[j,b]=(0,a.useState)(""),[y,w]=(0,a.useState)(!1),[k,N]=(0,a.useState)(""),[S,C]=(0,a.useState)(""),R=(0,a.useCallback)(async()=>{try{let e=await i.FH.project();s(e),c(e.rootDir),h(e.name),b("")}catch(e){b(e.message)}},[]);(0,a.useEffect)(()=>{R()},[R]);let F=async(e,t)=>{w(!0),p("");try{let l=await i.FH.setProject(e);return s(l),c(l.rootDir),p(t(l)),b(""),!0}catch(e){return b(e.message),!1}finally{w(!1)}},M=e=>F({rootDir:e},e=>e.rootDir?l("proj.saved",{dir:e.rootDir}):l("proj.cleared")),E=e=>F({name:e},()=>l("proj.nameSaved")),D=v(M),I=v(E),L=async(e,t)=>{w(!0);try{var l;let n=await i.FH.browseFolder(t.trim()||void 0);n.ok?e(n.path):n.cancelled||b(null!=(l=n.reason)?l:"")}catch(e){b(e.message)}finally{w(!1)}},H=null!=(e=null==o?void 0:o.others)?e:[],A=e=>e.map(e=>({name:e.name,rootDir:e.rootDir,level2:e.level2})),W=(e,t,l)=>F({others:A(H.map(l=>l.name===e.name?{...l,...t}:l))},l),B=async()=>{await F({others:[...A(H),{name:k.trim(),rootDir:S.trim(),level2:""}]},e=>l("proj.othersSaved",{n:e.others.length}))&&(N(""),C(""))};return(0,n.jsxs)("section",{className:"panel",id:"project","aria-labelledby":"project-title",children:[(0,n.jsx)("h2",{id:"project-title",children:l("proj.title")}),(0,n.jsx)("p",{className:"muted small",children:l("proj.intro")}),j&&(0,n.jsx)("div",{className:"err",children:j}),(0,n.jsx)(g,{name:u,dir:d,repoOk:!!(null==o?void 0:o.repoOk),repoProblem:null==o?void 0:o.repoProblem,branch:null==o?void 0:o.branch,level2:null!=(t=null==o?void 0:o.level2)?t:"",isDefault:!0,busy:y,onNameInput:e=>{h(e),I(e)},onName:e=>void E(e),onDirInput:e=>{c(e),D(e)},onDir:e=>void M(e),onBrowse:()=>void L(e=>void M(e),d),onLevel2:e=>F({level2:e},()=>l("proj.level2Saved",{name:u||d})),onRemove:(null==o?void 0:o.rootDir)?()=>void M(""):void 0,removeLabel:l("proj.clear")}),o&&!o.rootDir&&(0,n.jsx)("p",{className:"muted small",children:l("proj.none")}),H.map((e,t)=>(0,n.jsx)(g,{name:e.name,dir:e.rootDir,repoOk:e.repoOk,repoProblem:e.repoProblem,branch:e.branch,level2:e.level2,busy:y,onName:t=>void W(e,{name:t},()=>l("proj.nameSaved")),onDir:t=>void W(e,{rootDir:t},()=>l("proj.othersSaved",{n:H.length})),onBrowse:()=>void L(t=>void W(e,{rootDir:t},()=>l("proj.othersSaved",{n:H.length})),e.rootDir),onLevel2:t=>W(e,{level2:t},()=>l("proj.level2Saved",{name:e.name})),onRemove:()=>{let t;t=e.name,F({others:A(H.filter(e=>e.name!==t))},e=>l("proj.othersSaved",{n:e.others.length}))},removeLabel:l("proj.otherRemove")},"other-".concat(t))),(0,n.jsx)(f,{msg:x}),(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:"project-fields add-project",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(m,{htmlFor:"new-project-name",label:l("proj.entryName"),info:l("proj.nameInfo")}),(0,n.jsx)("input",{id:"new-project-name",type:"text",value:k,onChange:e=>N(e.target.value),placeholder:l("proj.entryName"),disabled:y})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(m,{htmlFor:"new-project-dir",label:l("proj.entryDir"),info:l("proj.dirInfo")}),(0,n.jsxs)("div",{className:"input-with-buttons",children:[(0,n.jsx)("input",{id:"new-project-dir",type:"text",value:S,onChange:e=>C(e.target.value),placeholder:"C:\\Projects\\my-app-tests",disabled:y}),(0,n.jsx)("button",{onClick:()=>void L(e=>C(e),S),disabled:y,children:l("mirror.browse")}),(0,n.jsx)("button",{className:"primary",onClick:()=>void B(),disabled:y||!k.trim()||!S.trim(),children:l("proj.otherAdd")})]})]})]})]})}function g(e){var t;let{name:l,dir:i,repoOk:o,repoProblem:s,branch:u,level2:h,isDefault:x=!1,busy:p,onNameInput:f,onName:j,onDirInput:b,onDir:g,onBrowse:y,onLevel2:w,onRemove:k,removeLabel:N}=e,{t:S}=(0,r.kj)(),C=(0,a.useId)(),[R,F]=(0,a.useState)(l),[M,E]=(0,a.useState)(i),[D,I]=(0,a.useState)(h),L=(0,a.useRef)(!1);(0,a.useEffect)(()=>F(l),[l]),(0,a.useEffect)(()=>E(i),[i]),(0,a.useEffect)(()=>{L.current||I(h)},[h]);let H=v(async e=>{L.current=!1,e!==h&&await w(e)},1200);return(0,n.jsxs)("div",{className:"panel inner project-entry",children:[(0,n.jsxs)("div",{className:"row project-tags",children:[x&&(0,n.jsx)("span",{className:"chip",title:S("proj.isDefaultWhy"),children:S("proj.isDefault")}),i&&(0,n.jsx)("span",{className:"badge ".concat(o?"done":""),title:o?S("proj.isRepo"):s,children:S(o?"proj.otherRepo":"proj.otherNotRepo")}),i&&o&&u&&(0,n.jsxs)("span",{className:"branch-tag",children:[(0,n.jsxs)("span",{className:"badge branch",children:[(0,n.jsx)(c.O,{})," ","HEAD"===u?S("proj.detached"):S("proj.branch",{name:u})]}),(0,n.jsx)(d.q,{label:S("info.about",{name:S("proj.branch",{name:u})}),text:S("proj.branchInfo")})]})]}),i&&!o&&(0,n.jsx)("p",{className:"muted small",children:s||S("proj.notRepoWhy")}),(0,n.jsxs)("div",{className:"project-fields",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(m,{htmlFor:"".concat(C,"-name"),label:S("proj.entryName"),info:S("proj.nameInfo")}),(0,n.jsx)("input",{id:"".concat(C,"-name"),type:"text",value:R,onChange:e=>{F(e.target.value),null==f||f(e.target.value)},onBlur:()=>{(R!==l||f)&&j(R)},placeholder:i?null!=(t=i.replace(/[\\/]+$/,"").split(/[\\/]/).pop())?t:"":S("proj.namePlaceholder")})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(m,{htmlFor:"".concat(C,"-dir"),label:S("proj.entryDir"),info:S("proj.dirInfo")}),(0,n.jsxs)("div",{className:"input-with-buttons",children:[(0,n.jsx)("input",{id:"".concat(C,"-dir"),type:"text",value:M,onChange:e=>{E(e.target.value),null==b||b(e.target.value)},onBlur:()=>{(M!==i||b)&&g(M)},placeholder:"C:\\Projects\\my-app"}),(0,n.jsx)("button",{onClick:y,disabled:p,children:S("mirror.browse")}),k&&(0,n.jsx)("button",{className:"quiet",onClick:k,disabled:p,children:N})]})]})]}),(0,n.jsxs)("div",{className:"project-level2",children:[(0,n.jsx)(m,{htmlFor:"".concat(C,"-level2"),label:S("proj.level2"),info:S("proj.level2Info",{n:8e3.toLocaleString()})}),(0,n.jsx)("textarea",{id:"".concat(C,"-level2"),className:"prose",rows:4,maxLength:8e3,value:D,onChange:e=>{L.current=!0,I(e.target.value),H(e.target.value)},placeholder:S("proj.level2Placeholder")}),(0,n.jsx)("span",{className:"muted small",children:S("proj.level2Count",{n:D.length.toLocaleString(),max:8e3.toLocaleString()})})]})]})}function y(){let{t:e}=(0,r.kj)(),[t,l]=(0,a.useState)(""),[o,s]=(0,a.useState)(!1),[d,c]=(0,a.useState)(""),[u,m]=(0,a.useState)(""),v=async()=>{s(!0),m(""),c(e("login.waiting"));try{let e=await i.FH.login(t);e.ok?c(e.message):(c(""),m(e.message))}catch(e){c(""),m(e.message)}finally{s(!1)}};return(0,n.jsxs)("section",{className:"panel",id:"login","aria-labelledby":"login-title",children:[(0,n.jsx)("h2",{id:"login-title",children:e("login.title")}),(0,n.jsx)("p",{className:"muted small",children:e("login.intro")}),u&&(0,n.jsx)("div",{className:"err",children:u}),(0,n.jsxs)(h,{id:"login-account",label:e("login.account"),info:e("login.accountWhy"),children:[(0,n.jsx)("input",{id:"login-account",type:"email",value:t,onChange:e=>l(e.target.value),placeholder:"name@company.com",disabled:o}),(0,n.jsx)("button",{className:"primary",onClick:()=>void v(),disabled:o,children:o?e("login.busy"):e("login.button")})]}),d&&(0,n.jsx)("div",{className:"small",role:"status",children:d})]})}function w(e){var t;let{catalogue:l,setCatalogue:o,refreshModels:d,refreshing:c,refreshMsg:u}=e,{t:m}=(0,r.kj)(),v=(0,r.W3)(),[x,p]=(0,a.useState)(""),[j,b]=(0,a.useState)(""),[g,y]=(0,a.useState)(!1),w=null!=(t=null==l?void 0:l.defaultModel)?t:"",N=async e=>{y(!0),p("");try{let t=await i.FH.setDefaultModel(e);l&&o({...l,defaultModel:t.defaultModel}),p(t.defaultModel?m("def.modelSaved",{name:t.defaultModel}):m("def.modelCleared")),b("")}catch(e){b(e.message)}finally{y(!1)}};return(0,n.jsxs)("section",{className:"panel",id:"model","aria-labelledby":"model-title",children:[(0,n.jsx)("h2",{id:"model-title",children:m("def.modelTitle")}),(0,n.jsx)("p",{className:"muted small",children:m("def.modelIntro")}),j&&(0,n.jsx)("div",{className:"err",children:j}),(0,n.jsxs)(h,{id:"default-model",label:m("def.modelField"),info:m("def.modelInfo"),children:[(0,n.jsx)(s.Yb,{id:"default-model",chosen:w,onChange:e=>void N(e),none:m("def.modelNone"),catalogue:l,disabled:g||c}),(0,n.jsx)("button",{className:"quiet",onClick:()=>void N(""),disabled:g||!w,children:m("proj.clear")}),(0,n.jsx)("button",{onClick:()=>void d(),disabled:g||c,children:m("model.refresh")})]}),(0,n.jsx)("p",{className:"muted small field-after",children:(null==l?void 0:l.readAt)?m("model.readAt",{t:v(l.readAt),n:l.options.length}):m("model.neverRead")}),(0,n.jsx)(k,{}),(0,n.jsx)(f,{msg:x||u})]})}function k(){let{t:e}=(0,r.kj)(),[t,l]=(0,a.useState)(null),[o,s]=(0,a.useState)("");(0,a.useEffect)(()=>{i.FH.settings().then(e=>{var t,n,a;let i=null==(t=e.raw.copilot)?void 0:t.manualModel,r=null==(a=e.defaults)||null==(n=a.copilot)?void 0:n.manualModel;l("boolean"==typeof i?i:!1!==r)}).catch(e=>s(e.message))},[]);let c=async e=>{l(e);try{var t;let l=await i.FH.settings();await i.FH.saveSettings({...l.raw,copilot:{...null!=(t=l.raw.copilot)?t:{},manualModel:e}}),s("")}catch(e){s(e.message)}};return(0,n.jsxs)("div",{className:"settings-field",children:[(0,n.jsxs)("div",{className:"field-label check-label",children:[(0,n.jsx)("input",{id:"manual-model",type:"checkbox",checked:!0===t,disabled:null===t,onChange:e=>void c(e.target.checked)}),(0,n.jsx)("label",{htmlFor:"manual-model",children:e("def.manualModel")}),(0,n.jsx)(d.q,{label:e("info.about",{name:e("def.manualModel")}),text:e("def.manualModelWhy")})]}),o&&(0,n.jsx)("div",{className:"err",children:o})]})}function N(e){var t,l;let{catalogue:o,setCatalogue:d,refreshModels:c,refreshing:u,refreshMsg:m}=e,{t:v}=(0,r.kj)(),[x,p]=(0,a.useState)(""),[j,b]=(0,a.useState)(""),[g,y]=(0,a.useState)(!1),w=null!=(t=null==o?void 0:o.defaultReviewModel)?t:"",k=async e=>{y(!0),p("");try{let t=await i.FH.setDefaultReviewModel(e);o&&d({...o,defaultReviewModel:t.defaultReviewModel}),p(t.defaultReviewModel?v("def.reviewSaved",{name:t.defaultReviewModel}):v("def.reviewCleared")),b("")}catch(e){b(e.message)}finally{y(!1)}},N=""!==w&&w===(null!=(l=null==o?void 0:o.defaultModel)?l:"");return(0,n.jsxs)("section",{className:"panel",id:"review","aria-labelledby":"review-title",children:[(0,n.jsx)("h2",{id:"review-title",children:v("def.reviewTitle")}),(0,n.jsx)("p",{className:"muted small",children:v("def.reviewIntro")}),j&&(0,n.jsx)("div",{className:"err",children:j}),(0,n.jsxs)(h,{id:"default-review-model",label:v("def.reviewField"),info:v("def.reviewInfo"),children:[(0,n.jsx)(s.Yb,{id:"default-review-model",chosen:w,onChange:e=>void k(e),none:v("def.reviewNone"),catalogue:o,disabled:g||u}),(0,n.jsx)("button",{className:"quiet",onClick:()=>void k(""),disabled:g||!w,children:v("proj.clear")}),(0,n.jsx)("button",{onClick:()=>void c(),disabled:g||u,children:v("model.refresh")})]}),N&&(0,n.jsx)("p",{className:"why field-after warned-text",children:v("def.reviewSame")}),(0,n.jsx)(f,{msg:x||m})]})}function S(){let{t:e}=(0,r.kj)(),[t,l]=(0,a.useState)(null),o=(0,a.useRef)(null),s=(0,a.useRef)(Promise.resolve()),[d,c]=(0,a.useState)(2),[u,m]=(0,a.useState)(3),[p,j]=(0,a.useState)(2),[b,g]=(0,a.useState)(2),[y,w]=(0,a.useState)(60),[k,N]=(0,a.useState)(240),[S,C]=(0,a.useState)(20),[R,F]=(0,a.useState)(900),[M,E]=(0,a.useState)("none"),[D,I]=(0,a.useState)("confirm"),[L,H]=(0,a.useState)("ask"),[A,W]=(0,a.useState)(""),[B,T]=(0,a.useState)("");(0,a.useEffect)(()=>{i.FH.settings().then(e=>{var t,n,a,i,r,s;o.current=e.raw,l(e.raw);let d=null!=(t=e.raw.limits)?t:{};m("number"==typeof d.autoContinue?d.autoContinue:3),c("number"==typeof d.retryBlockedInFreshChat?d.retryBlockedInFreshChat:2),j("number"==typeof d.minApproachesBeforeBlocked?d.minApproachesBeforeBlocked:2),g("number"==typeof d.maxReviewRounds?d.maxReviewRounds:2),w("number"==typeof d.maxIterations?d.maxIterations:60),N("number"==typeof d.maxRunMinutes?d.maxRunMinutes:240),C("number"==typeof d.maxSubtasks?d.maxSubtasks:20);let u=null!=(n=e.raw.copilot)?n:{};F("number"==typeof u.replyTimeoutSec?u.replyTimeoutSec:900);let h=null!=(a=e.raw.execution)?a:{};E(null!=(i=h.isolation)?i:"none"),I(null!=(r=h.mode)?r:"confirm"),H(null!=(s=h.networkFetch)?s:"ask")}).catch(e=>T(e.message))},[]);let P=(t,n,a)=>{let r=async()=>{var r;if(!o.current)return;let s=await i.FH.settings().then(e=>e.raw).catch(()=>o.current),d={...s,[t]:{...null!=(r=s[t])?r:{},[n]:a}};W("");try{await i.FH.saveSettings(d),o.current=d,l(d),W(e("exec.saved")),T("")}catch(e){T(e.message)}},d=s.current.then(r);return s.current=d.catch(()=>void 0),d},q=v(e=>P("limits","retryBlockedInFreshChat",e)),O=v(e=>P("limits","autoContinue",e)),U=v(e=>P("limits","minApproachesBeforeBlocked",e)),_=v(e=>P("limits","maxReviewRounds",e)),V=v(e=>P("limits","maxIterations",e)),Y=v(e=>P("limits","maxRunMinutes",e)),z=v(e=>P("limits","maxSubtasks",e)),K=v(e=>P("copilot","replyTimeoutSec",e)),Z=(e,t)=>P("execution",e,t),$=[{id:"auto-continue",label:e("exec.autoContinue"),info:e("exec.autoContinueWhy"),unit:e("exec.autoContinueUnit"),value:u,min:0,max:20,set:m,later:O},{id:"min-approaches",label:e("exec.minApproaches"),info:e("exec.minApproachesWhy"),unit:e("exec.minApproachesUnit"),value:p,min:2,max:20,set:j,later:U},{id:"max-review-rounds",label:e("exec.maxReviewRounds"),info:e("exec.maxReviewRoundsWhy"),unit:e("exec.maxReviewRoundsUnit"),value:b,min:1,max:6,set:g,later:_},{id:"retry-blocked",label:e("exec.retryBlocked"),info:e("exec.retryBlockedWhy"),unit:e("exec.retryBlockedTimes"),value:d,min:0,max:5,set:c,later:q},{id:"max-iterations",label:e("exec.maxIterations"),info:e("exec.maxIterationsWhy"),unit:e("exec.maxIterationsUnit"),value:y,min:5,max:200,set:w,later:V},{id:"max-minutes",label:e("exec.maxRunMinutes"),info:e("exec.maxRunMinutesWhy"),unit:e("exec.maxRunMinutesUnit"),value:k,min:10,max:1440,set:N,later:Y},{id:"max-subtasks",label:e("exec.maxSubtasks"),info:e("exec.maxSubtasksWhy"),unit:e("exec.maxSubtasksUnit"),value:S,min:1,max:100,set:C,later:z},{id:"reply-timeout",label:e("exec.replyTimeout"),info:e("exec.replyTimeoutWhy"),unit:e("exec.replyTimeoutUnit"),value:R,min:60,max:10800,set:F,later:K}];return(0,n.jsxs)("section",{className:"panel",id:"execution","aria-labelledby":"execution-title",children:[(0,n.jsx)("h2",{id:"execution-title",children:e("exec.title")}),(0,n.jsx)("p",{className:"muted small",children:e("exec.intro")}),B&&(0,n.jsx)("div",{className:"err",children:B}),$.map(e=>(0,n.jsx)(h,{id:e.id,label:e.label,info:e.info,unit:e.unit,children:(0,n.jsx)(x,{id:e.id,value:e.value,min:e.min,max:e.max,onChange:t=>{e.set(t),e.later(t)},disabled:!t})},e.id)),(0,n.jsx)(h,{id:"isolation",label:e("exec.isolation"),info:e("exec.isolationWhy"),children:(0,n.jsxs)("select",{id:"isolation",value:M,onChange:e=>{let t=e.target.value;E(t),Z("isolation",t)},disabled:!t,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)(h,{id:"start-mode",label:e("exec.startMode"),info:e("exec.startModeWhy"),children:(0,n.jsxs)("select",{id:"start-mode",value:D,onChange:e=>{let t=e.target.value;I(t),Z("mode",t)},disabled:!t,children:[(0,n.jsx)("option",{value:"confirm",children:e("exec.startModeAsk")}),(0,n.jsx)("option",{value:"unattended",children:e("exec.startModeAuto")})]})}),(0,n.jsx)(h,{id:"network-fetch",label:e("exec.networkFetch"),info:e("exec.networkFetchWhy"),children:(0,n.jsxs)("select",{id:"network-fetch",value:L,onChange:e=>{let t=e.target.value;H(t),Z("networkFetch",t)},disabled:!t,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)(f,{msg:A})]})}},4784:(e,t,l)=>{"use strict";l.d(t,{Yb:()=>s,u:()=>o});var n=l(3365),a=l(1521),i=l(5549),r=l(8205);let o="::by-hand::";function s(e){var t,l,s;let{id:d,chosen:c,onChange:u,none:m,byHand:h,catalogue:v,disabled:x=!1,style:p}=e,{t:f}=(0,r.kj)(),j=function(e){let[t,l]=(0,a.useState)(null);return(0,a.useEffect)(()=>{if(void 0!==e)return;let t=!0;return i.FH.models().then(e=>{t&&l(e)}).catch(()=>void 0),()=>{t=!1}},[e]),void 0!==e?e:t}(v),b=null!=(t=null==j?void 0:j.options)?t:[],g=e=>e.toLowerCase().replace(/[-‐‑‒–—_]+/g," ").replace(/\s+/g," ").trim(),y=c&&c!==o?b.find(e=>g(e.name)===g(c)):void 0,w=null!=(l=null==y?void 0:y.name)?l:c,k=!!y||c===o&&void 0!==h,N=b.filter(e=>!e.group),S=new Map;for(let e of b)e.group&&S.set(e.group,[...null!=(s=S.get(e.group))?s:[],e]);return(0,n.jsxs)("select",{id:d,value:w,onChange:e=>u(e.target.value),disabled:x,style:{width:"auto",minWidth:280,...p},children:[void 0!==h&&(0,n.jsx)("option",{value:o,children:h}),void 0!==m&&(0,n.jsx)("option",{value:"",children:m}),c&&!k&&(0,n.jsx)("option",{value:c,children:f("model.notInList",{name:c})}),N.map(e=>(0,n.jsxs)("option",{value:e.name,disabled:e.disabled,children:[e.name,e.disabled?" — ".concat(f("model.unavailable")):""]},e.name)),[...S.entries()].map(e=>{let[t,l]=e;return(0,n.jsx)("optgroup",{label:t,children:l.map(e=>(0,n.jsxs)("option",{value:e.name,disabled:e.disabled,children:[e.name,e.disabled?" — ".concat(f("model.unavailable")):""]},e.name))},t)})]})}},4969:(e,t,l)=>{"use strict";l.d(t,{V:()=>i});var n=l(1521);let a='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function i(e,t,l){(0,n.useEffect)(()=>{var n,i;if(!t)return;let r=document.activeElement instanceof HTMLElement?document.activeElement:null,o=e.current,s=null!=(i=null!=(n=null==l?void 0:l.current)?n:null==o?void 0:o.querySelector(a))?i:null;null==s||s.focus();let d=e=>{if("Tab"!==e.key||!o)return;let t=Array.from(o.querySelectorAll(a)).filter(e=>null!==e.offsetParent);if(0===t.length)return;let l=t[0],n=t[t.length-1],i=o.contains(document.activeElement);e.shiftKey&&(document.activeElement===l||!i)?(e.preventDefault(),n.focus()):e.shiftKey||document.activeElement!==n&&i||(e.preventDefault(),l.focus())};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d),r&&document.contains(r)&&r.focus()}},[e,t,l])}},5462:(e,t,l)=>{"use strict";l.d(t,{f:()=>i,q:()=>r});var n=l(3365),a=l(1521);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"below",[t,l]=(0,a.useState)(!1),n=(0,a.useRef)(null),i=(0,a.useRef)(null),r=(0,a.useId)(),[o,s]=(0,a.useState)({visibility:"hidden"}),d=(0,a.useCallback)(()=>l(!1),[]),c=(0,a.useCallback)(()=>l(e=>!e),[]);return(0,a.useLayoutEffect)(()=>{var l;let a,r;if(!t)return void s({visibility:"hidden"});let o=null==(l=n.current)?void 0:l.getBoundingClientRect(),d=i.current;if(!o||!d)return;let c=d.offsetWidth,u=d.offsetHeight;"right"===e?(a=o.right+6,r=Math.min(o.top,window.innerHeight-u-8)):(a=Math.min(o.left,window.innerWidth-c-8),r=o.bottom+6+u>window.innerHeight-8?o.top-6-u:o.bottom+6),s({left:Math.max(8,a),top:Math.max(8,r)})},[t,e]),(0,a.useEffect)(()=>{if(!t)return;let e=e=>{var t,a;let r=e.target;(null==(t=i.current)?void 0:t.contains(r))||(null==(a=n.current)?void 0:a.contains(r))||l(!1)},a=e=>{var t;"Escape"===e.key&&(l(!1),null==(t=n.current)||t.focus())},r=()=>l(!1);return document.addEventListener("pointerdown",e,!0),document.addEventListener("keydown",a),window.addEventListener("resize",r),()=>{document.removeEventListener("pointerdown",e,!0),document.removeEventListener("keydown",a),window.removeEventListener("resize",r)}},[t]),{open:t,setOpen:l,toggle:c,close:d,anchor:n,panel:i,style:o,id:r}}function r(e){let{label:t,text:l}=e,a=i("below");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{ref:a.anchor,type:"button",className:"info-btn","aria-label":t,title:t,"aria-expanded":a.open,"aria-controls":a.open?a.id:void 0,onClick:a.toggle,children:"i"}),a.open&&(0,n.jsxs)("div",{ref:a.panel,id:a.id,role:"dialog","aria-label":t,className:"pop info-pop",style:a.style,children:[(0,n.jsx)("p",{className:"pop-title",children:t}),l.split(/\n\s*\n/).map(e=>(0,n.jsx)("p",{children:e},e))]})]})}}},e=>{e.O(0,[921,347,131,358],()=>e(e.s=1896)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{952:()=>{},4529:(e,t,s)=>{Promise.resolve().then(s.bind(s,1035)),Promise.resolve().then(s.t.bind(s,952,23)),Promise.resolve().then(s.bind(s,8214)),Promise.resolve().then(s.bind(s,7712)),Promise.resolve().then(s.bind(s,8300)),Promise.resolve().then(s.bind(s,8078)),Promise.resolve().then(s.bind(s,8205))},7712:(e,t,s)=>{"use strict";s.d(t,{ScrollJump:()=>a});var l=s(3365),n=s(1521),r=s(8205);function a(){let{t:e}=(0,r.kj)(),[t,s]=(0,n.useState)({long:!1,atTop:!0,atBottom:!1});return((0,n.useEffect)(()=>{let e=()=>{let e=document.documentElement;s({long:e.scrollHeight>2*window.innerHeight,atTop:window.scrollY<200,atBottom:window.innerHeight+window.scrollY>=e.scrollHeight-200})};e(),window.addEventListener("scroll",e,{passive:!0}),window.addEventListener("resize",e);let t=new ResizeObserver(e);return t.observe(document.body),()=>{window.removeEventListener("scroll",e),window.removeEventListener("resize",e),t.disconnect()}},[]),t.long)?(0,l.jsxs)("div",{className:"scroll-jump",children:[!t.atTop&&(0,l.jsx)("button",{type:"button","aria-label":e("scroll.top"),title:e("scroll.top"),onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:"↑"}),!t.atBottom&&(0,l.jsx)("button",{type:"button","aria-label":e("scroll.bottom"),title:e("scroll.bottom"),onClick:()=>window.scrollTo({top:document.documentElement.scrollHeight,behavior:"smooth"}),children:"↓"})]}):null}},8214:(e,t,s)=>{"use strict";s.d(t,{SkipLink:()=>v,s:()=>f});var l=s(3365),n=s(1521),r=s(8197),a=s.n(r),i=s(1702),o=s(5549),c=s(7527),d=s(8205),h=s(6575);let m={workbench:(0,l.jsx)("path",{d:"M4 5h16v11H9l-5 4zM8 9h8M8 12h5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),defaults:(0,l.jsx)("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"}),system:(0,l.jsx)("path",{d:"M4 5h16v10H4zM2 19h20M9 15v4M15 15v4",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"})},u=[{href:"/",label:"nav.workbench",icon:"workbench"},{href:"/defaults",label:"nav.defaults",icon:"defaults"},{href:"/system",label:"nav.system",icon:"system"}];function v(){let{t:e}=(0,d.kj)();return(0,l.jsx)("a",{className:"skip-link",href:"#main",children:e("a11y.skip")})}function f(){let{t:e}=(0,d.kj)(),t=(0,i.usePathname)(),s=function(){let[e,t]=(0,n.useState)(0);return(0,c.z)(()=>o.FH.activity().then(e=>t(e.sessions)).catch(()=>void 0),4e3),e}();return(0,l.jsxs)("nav",{"aria-label":e("nav.label"),children:[u.map(n=>(0,l.jsxs)(a(),{href:n.href,"aria-current":t===n.href?"page":void 0,children:[(0,l.jsx)("svg",{className:"nav-icon",viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor","aria-hidden":"true",children:m[n.icon]}),(0,l.jsx)("span",{children:e(n.label)}),"/"===n.href&&s>0&&(0,l.jsxs)("span",{className:"live",title:e("nav.liveTitle",{n:s}),children:[(0,l.jsx)("span",{className:"dot","aria-hidden":"true"}),e("nav.live")]})]},n.href)),(0,l.jsx)(h.c,{})]})}},8300:(e,t,s)=>{"use strict";s.d(t,{Shell:()=>j});var l=s(3365),n=s(8197),r=s.n(n),a=s(1702),i=s(8214),o=s(6657),c=s(1521),d=s(5549),h=s(8205),m=s(7527);function u(e){var t,s;let{failure:n,reason:r,onDismiss:a,intro:i,children:o}=e,{t:c}=(0,h.kj)(),m=(0,h.W3)(),u=null!=(s=null!=(t=null==n?void 0:n.message)?t:r)?s:"";return(0,l.jsxs)("div",{className:"notice caution start-failure",role:"alert",style:{overflowWrap:"anywhere"},children:[i&&(0,l.jsx)("p",{className:"small",style:{marginTop:0},children:i}),(0,l.jsx)("strong",{children:c("startfail.title")}),n&&(0,l.jsx)("p",{className:"small",style:{margin:"4px 0"},children:c("startfail.where",{stage:c("startfail.stage.".concat(n.stage))})}),(0,l.jsx)("pre",{className:"sync-cmd small",style:{margin:"6px 0"},children:u}),o,n&&(0,l.jsxs)("p",{className:"muted small",style:{margin:"4px 0"},children:[n.runId?c("startfail.when",{when:m(n.at),run:n.runId}):c("startfail.whenNoRun",{when:m(n.at)}),n.sessions.length>0?" \xb7 ".concat(n.sessions.map(e=>'"'.concat(e,'"')).join(", ")):""]}),(0,l.jsxs)("div",{className:"row",style:{marginTop:6},children:[n&&(0,l.jsx)("a",{className:"button-link",href:d.FH.startFailureUrl(n.id),download:!0,children:c("startfail.download")}),(0,l.jsx)("a",{className:n?"button-link":"button-link plain",href:d.FH.terminalUrl(),download:!0,children:c("startfail.terminal")}),a&&(0,l.jsx)("button",{type:"button",className:"quiet",onClick:a,children:c("startfail.dismiss")})]}),(0,l.jsx)("p",{className:"why",children:c("startfail.downloadWhy")})]})}let v="cop.startFailure.dismissed";function f(){try{var e;let t=JSON.parse(null!=(e=window.localStorage.getItem(v))?e:"[]");return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch(e){return[]}}function w(){let{t:e}=(0,h.kj)(),[t,s]=(0,c.useState)([]),[n,r]=(0,c.useState)([]);(0,m.z)(()=>d.FH.startFailures(!0).then(e=>{s(e),r(f())}).catch(()=>void 0),5e3);let a=t.find(e=>!n.includes(e.id));return a?(0,l.jsx)("div",{style:{marginBottom:12},children:(0,l.jsx)(u,{failure:a,intro:e("at-turn"===a.stage?"startfail.laterSession":"startfail.later"),onDismiss:()=>{let e=[...new Set([...f(),a.id])].slice(-50);try{window.localStorage.setItem(v,JSON.stringify(e))}catch(e){}r(e)}})}):null}function j(e){let{children:t}=e;return"/"===(0,a.usePathname)()?(0,l.jsxs)("div",{className:"wb-root",children:[(0,l.jsx)(o.U,{}),(0,l.jsx)(w,{}),(0,l.jsx)("main",{id:"main",className:"wb-main",children:t})]}):(0,l.jsxs)("div",{className:"wrap",children:[(0,l.jsxs)("header",{className:"top",children:[(0,l.jsx)("h1",{children:(0,l.jsx)(r(),{href:"/",children:"copilot-operator"})}),(0,l.jsx)(i.s,{})]}),(0,l.jsx)(o.U,{}),(0,l.jsx)(w,{}),(0,l.jsx)("main",{id:"main",children:t})]})}}},e=>{e.O(0,[353,134,921,808,347,131,358],()=>e(e.s=4529)),_N_E=e.O()}]);