copilot-operator 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/api/operator.controller.js +11 -0
- package/dist/src/api/operator.service.js +80 -0
- package/dist/src/plan/systemGuide.js +31 -0
- package/dist/src/transport/copilotTransport.js +39 -1
- package/dist/web/404.html +2 -2
- package/dist/web/_next/static/chunks/{549-9548d9a132c8c7d4.js → 549-7fd4fe96682299f5.js} +1 -1
- package/dist/web/_next/static/chunks/867-631dc4314840fed6.js +1 -0
- package/dist/web/_next/static/chunks/app/defaults/page-fd819bbfa7f33982.js +1 -0
- package/dist/web/appearance.html +2 -2
- package/dist/web/appearance.txt +11 -11
- package/dist/web/defaults.html +2 -2
- package/dist/web/defaults.txt +11 -11
- package/dist/web/history.html +2 -2
- package/dist/web/history.txt +11 -11
- package/dist/web/import.html +2 -2
- package/dist/web/import.txt +11 -11
- package/dist/web/index.html +2 -2
- package/dist/web/index.txt +11 -11
- package/dist/web/level1.html +2 -2
- package/dist/web/level1.txt +11 -11
- package/dist/web/presets.html +2 -2
- package/dist/web/presets.txt +11 -11
- package/dist/web/sessions/view.html +2 -2
- package/dist/web/sessions/view.txt +11 -11
- package/dist/web/system.html +2 -2
- package/dist/web/system.txt +11 -11
- package/package.json +4 -3
- package/dist/web/_next/static/chunks/867-8b95ae984befc0e2.js +0 -1
- package/dist/web/_next/static/chunks/app/defaults/page-71a43ed69134b48d.js +0 -1
- /package/dist/web/_next/static/{IwNZiBrEMAcXEUFj2miiU → GhdY7nVcYi-WV3j7saVPK}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{IwNZiBrEMAcXEUFj2miiU → GhdY7nVcYi-WV3j7saVPK}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[189],{1035:(e,l,t)=>{"use strict";t.d(l,{DialogHost:()=>c,Z:()=>d});var n=t(3365),s=t(1521),a=t(867),r=t(4969);let i=null,o=[];function d(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(t=>{var n;return n={kind:"confirm",message:e,...l,resolve:t},void(i?i(n):o.push(n))})}function c(e){var l,t;let{children:d}=e,{t:c}=(0,a.kj)(),[m,u]=(0,s.useState)([]),h=(0,s.useRef)(null),x=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(i=e=>u(l=>[...l,e]),o.length>0){let e=o.splice(0,o.length);u(l=>[...l,...e])}return()=>{i=null}},[]);let p=m[0],j=(0,s.useCallback)(e=>{p&&(p.resolve(e),u(e=>e.slice(1)))},[p]);return(0,r.V)(x,!!p,h),(0,s.useEffect)(()=>{if(!p)return;let e=e=>{"Escape"===e.key&&(e.preventDefault(),j(!1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[p,j]),(0,n.jsxs)(n.Fragment,{children:[d,p&&(0,n.jsx)("div",{className:"modal-backdrop",onClick:()=>j(!1),role:"presentation",children:(0,n.jsxs)("div",{ref:x,className:"modal".concat(p.danger?" danger":""),role:"confirm"===p.kind?"alertdialog":"dialog","aria-modal":"true","aria-labelledby":"modal-title","aria-describedby":"modal-body",onClick:e=>e.stopPropagation(),children:[(0,n.jsx)("h2",{id:"modal-title",children:null!=(l=p.title)?l:c("confirm"===p.kind?"dialog.confirmTitle":"dialog.noticeTitle")}),(0,n.jsx)("div",{id:"modal-body",className:"modal-body",children:p.message}),(0,n.jsxs)("div",{className:"row modal-actions",children:["confirm"===p.kind&&(0,n.jsx)("button",{type:"button",className:"quiet",onClick:()=>j(!1),children:c("dialog.cancel")}),(0,n.jsx)("button",{ref:h,type:"button",className:p.danger?"danger":"primary",onClick:()=>j(!0),children:null!=(t=p.okLabel)?t:c("dialog.ok")})]})]})})]})}},1896:(e,l,t)=>{Promise.resolve().then(t.bind(t,3197))},2285:(e,l,t)=>{"use strict";t.d(l,{b:()=>i});var n=t(3365),s=t(1521),a=t(5549),r=t(867);function i(e){var l,t;let{dir:i}=e,{t:o}=(0,r.kj)(),d=(0,r.W3)(),[c,m]=(0,s.useState)(null),[u,h]=(0,s.useState)(""),[x,p]=(0,s.useState)(""),j=async()=>{h("");try{m(await a.FH.syncPlan(i))}catch(e){h(e.message)}},v=async(e,l)=>{try{await navigator.clipboard.writeText(l),p(e),window.setTimeout(()=>p(""),2500)}catch(e){h(o("plan.copyFailed"))}},f=e=>(0,n.jsxs)("ul",{style:{margin:"2px 0 6px",paddingLeft:20},children:[e.slice(0,30).map(e=>(0,n.jsx)("li",{children:(0,n.jsx)("code",{children:e})},e)),e.length>30&&(0,n.jsx)("li",{className:"muted",children:o("sync.more",{n:e.length-30})})]});return(0,n.jsxs)("div",{className:"sync-command small",style:{marginTop:8},children:[(0,n.jsx)("button",{type:"button",onClick:()=>void j(),children:o("sync.show")}),u&&(0,n.jsx)("p",{className:"err",children:u}),c&&!c.ok&&(0,n.jsx)("p",{className:"err",children:c.problem}),(null==c?void 0:c.ok)&&(0,n.jsxs)("div",{className:"notice caution",style:{marginTop:8},children:[(0,n.jsxs)("p",{children:[o("sync.what",{branch:null!=(l=c.branch)?l:"",target:null!=(t=c.target)?t:""})," ",(0,n.jsx)("span",{className:"muted",children:c.lastFetched?o("sync.fetchedAt",{when:d(c.lastFetched)}):o("sync.neverFetched")})]}),c.willLose.commits.length+c.willLose.changed.length+c.willLose.untracked.length===0?(0,n.jsx)("p",{children:o("sync.nothingLost")}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("strong",{children:o("sync.loses")}),c.willLose.commits.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{children:o("sync.commits",{n:c.willLose.commits.length})}),f(c.willLose.commits)]}),c.willLose.changed.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{children:o("sync.changed",{n:c.willLose.changed.length})}),f(c.willLose.changed)]}),c.willLose.untracked.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{children:o("sync.untracked",{n:c.willLose.untracked.length})}),f(c.willLose.untracked)]})]}),(0,n.jsx)("p",{className:"muted",children:o("sync.keeps")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("button",{type:"button",onClick:()=>void v("preview",c.preview),children:o("sync.copyPreview")}),"preview"===x&&(0,n.jsx)("span",{className:"badge done",children:o("plan.copied")})]}),(0,n.jsx)("pre",{className:"sync-cmd",children:c.preview}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("button",{type:"button",className:"danger",onClick:()=>void v("command",c.command),children:o("sync.copyCommand")}),"command"===x&&(0,n.jsx)("span",{className:"badge done",children:o("plan.copied")})]}),(0,n.jsx)("pre",{className:"sync-cmd",children:c.command}),(0,n.jsx)("p",{className:"muted",children:o("sync.howToRun")})]})]})}},3197:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>u});var n=t(3365),s=t(1521),a=t(2285),r=t(8197),i=t.n(r),o=t(5549),d=t(867),c=t(1035),m=t(4784);function u(){let{t:e}=(0,d.kj)(),[l,t]=(0,s.useState)(null),[a,r]=(0,s.useState)(!1),[i,m]=(0,s.useState)("");(0,s.useEffect)(()=>{o.FH.models().then(t).catch(()=>void 0)},[]);let u=async()=>{if(await (0,c.Z)(e("model.refreshConfirm"))){r(!0),m(e("model.refreshing"));try{var l;let n=await o.FH.models().then(()=>o.FH.refreshModels());t(n),m(0===n.options.length?null!=(l=n.note)?l:e("model.none"):e("model.refreshed",{n:n.options.length}))}catch(e){m(e.message)}finally{r(!1)}}},h={catalogue:l,setCatalogue:t,refreshModels:u,refreshing:a,refreshMsg:i};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"panel",children:[(0,n.jsx)("h2",{children:e("def.title")}),(0,n.jsx)("p",{className:"muted small",children:e("def.intro")}),(0,n.jsx)("p",{className:"why",children:e("def.autoSave")})]}),(0,n.jsx)(v,{}),(0,n.jsx)(g,{...h}),(0,n.jsx)(w,{...h}),(0,n.jsx)(y,{})]})}function h(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:900,t=(0,s.useRef)(null),n=(0,s.useRef)(null),a=(0,s.useRef)(e);return a.current=e,(0,s.useEffect)(()=>()=>{t.current&&clearTimeout(t.current),n.current&&a.current(n.current.value)},[]),e=>{t.current&&clearTimeout(t.current),n.current={value:e},t.current=setTimeout(()=>{n.current=null,a.current(e)},l)}}function x(e){let{id:l,value:t,min:a,max:r,onChange:i,disabled:o}=e,[d,c]=(0,s.useState)(String(t));return(0,s.useEffect)(()=>c(e=>p(e)===t?e:String(t)),[t]),(0,n.jsx)("input",{id:l,type:"number",min:a,max:r,step:1,value:d,onChange:e=>{c(e.target.value);let l=p(e.target.value);null!==l&&l>=a&&l<=r&&i(l)},onBlur:()=>{let e=p(d),l=null===e?t:Math.max(a,Math.min(r,e));c(String(l)),l!==t&&i(l)},style:{width:"9ch"},disabled:o})}function p(e){if(""===e.trim())return null;let l=Number(e);return Number.isInteger(l)?l:null}function j(e){let{msg:l,onSave:t}=e,{t:s}=(0,d.kj)();return(0,n.jsxs)("div",{className:"row",style:{marginTop:6},children:[t&&(0,n.jsx)("button",{className:"quiet",onClick:t,title:s("def.saveAnywayWhy"),children:s("def.saveAnyway")}),(0,n.jsx)("span",{className:"muted small",role:"status",children:l||s("def.savedAutomatically")})]})}function v(){var e;let{t:l}=(0,d.kj)(),[t,a]=(0,s.useState)(null),[r,i]=(0,s.useState)(""),[c,m]=(0,s.useState)(""),[u,x]=(0,s.useState)(""),[p,v]=(0,s.useState)(""),[y,g]=(0,s.useState)(!1),[w,b]=(0,s.useState)(""),[N,k]=(0,s.useState)(""),S=(0,s.useCallback)(async()=>{try{let e=await o.FH.project();a(e),i(e.rootDir),m(e.name),v("")}catch(e){v(e.message)}},[]);(0,s.useEffect)(()=>{S()},[S]);let F=async(e,l)=>{g(!0),x("");try{let t=await o.FH.setProject(e);return a(t),i(t.rootDir),x(l(t)),v(""),!0}catch(e){return v(e.message),!1}finally{g(!1)}},C=e=>F({rootDir:e},e=>e.rootDir?l("proj.saved",{dir:e.rootDir}):l("proj.cleared")),R=e=>F({name:e},()=>l("proj.nameSaved")),T=h(C),D=h(R),E=async(e,l)=>{g(!0);try{var t;let n=await o.FH.browseFolder(l.trim()||void 0);n.ok?e(n.path):n.cancelled||v(null!=(t=n.reason)?t:"")}catch(e){v(e.message)}finally{g(!1)}},M=null!=(e=null==t?void 0:t.others)?e:[],A=e=>e.map(e=>({name:e.name,rootDir:e.rootDir})),L=async()=>{await F({others:[...A(M),{name:w.trim(),rootDir:N.trim()}]},e=>l("proj.othersSaved",{n:e.others.length}))&&(b(""),k(""))};return(0,n.jsxs)("div",{className:"panel",id:"project",children:[(0,n.jsx)("h2",{children:l("proj.title")}),(0,n.jsx)("p",{className:"muted small",children:l("proj.intro")}),p&&(0,n.jsx)("div",{className:"err",children:p}),(0,n.jsx)("p",{className:"muted small",children:l("proj.listIntro")}),(0,n.jsx)(f,{name:c,dir:r,repoOk:!!(null==t?void 0:t.repoOk),repoProblem:null==t?void 0:t.repoProblem,isDefault:!0,busy:y,onNameInput:e=>{m(e),D(e)},onName:e=>void R(e),onDirInput:e=>{i(e),T(e)},onDir:e=>void C(e),onBrowse:()=>void E(e=>void C(e),r),onRemove:(null==t?void 0:t.rootDir)?()=>void C(""):void 0,removeLabel:l("proj.clear")}),(0,n.jsx)(j,{msg:u}),t&&!t.rootDir&&(0,n.jsx)("p",{className:"muted small",style:{marginTop:8},children:l("proj.none")}),M.map((e,t)=>(0,n.jsx)(f,{name:e.name,dir:e.rootDir,repoOk:e.repoOk,repoProblem:e.repoProblem,busy:y,onName:t=>void F({others:A(M.map(l=>l.name===e.name?{...l,name:t}:l))},()=>l("proj.nameSaved")),onDir:t=>void F({others:A(M.map(l=>l.name===e.name?{...l,rootDir:t}:l))},()=>l("proj.othersSaved",{n:M.length})),onBrowse:()=>void E(t=>void F({others:A(M.map(l=>l.name===e.name?{...l,rootDir:t}:l))},()=>l("proj.othersSaved",{n:M.length})),e.rootDir),onRemove:()=>{let t;t=e.name,F({others:A(M.filter(e=>e.name!==t))},e=>l("proj.othersSaved",{n:e.others.length}))},removeLabel:l("proj.otherRemove")},"other-".concat(t))),(0,n.jsx)("h3",{id:"others",children:l("proj.addTitle")}),(0,n.jsx)("p",{className:"muted small",children:l("proj.othersIntro")}),(0,n.jsxs)("div",{className:"row",style:{marginTop:8},children:[(0,n.jsx)("input",{type:"text","aria-label":l("proj.entryName"),value:w,onChange:e=>b(e.target.value),placeholder:l("proj.entryName"),disabled:y,style:{width:160}}),(0,n.jsx)("input",{type:"text",className:"grow","aria-label":l("proj.entryDir"),value:N,onChange:e=>k(e.target.value),placeholder:"C:\\Projects\\my-app-tests",disabled:y}),(0,n.jsx)("button",{onClick:()=>void E(e=>k(e),N),disabled:y,children:l("mirror.browse")}),(0,n.jsx)("button",{className:"primary",onClick:()=>void L(),disabled:y||!w.trim()||!N.trim(),children:l("proj.otherAdd")})]}),(0,n.jsx)("h3",{children:l("proj.affects")}),(0,n.jsxs)("ul",{className:"muted small",style:{margin:0,paddingLeft:20},children:[(0,n.jsx)("li",{children:l("proj.affectsNew")}),(0,n.jsx)("li",{children:l("proj.affectsExisting")}),(0,n.jsx)("li",{children:l("proj.affectsPlan")}),(0,n.jsx)("li",{children:l("proj.affectsNever")})]})]})}function f(e){var l;let{name:t,dir:r,repoOk:i,repoProblem:o,isDefault:c=!1,busy:m,onNameInput:u,onName:h,onDirInput:x,onDir:p,onBrowse:j,onRemove:v,removeLabel:f}=e,{t:y}=(0,d.kj)(),g=(0,s.useId)(),[w,b]=(0,s.useState)(t),[N,k]=(0,s.useState)(r);return(0,s.useEffect)(()=>b(t),[t]),(0,s.useEffect)(()=>k(r),[r]),(0,n.jsxs)("div",{className:"panel inner",style:{marginTop:10},children:[(0,n.jsxs)("div",{className:"row",children:[(0,n.jsxs)("div",{style:{width:"min(200px, 100%)"},children:[(0,n.jsx)("label",{htmlFor:"".concat(g,"-name"),children:y("proj.entryName")}),(0,n.jsx)("input",{id:"".concat(g,"-name"),type:"text",value:w,onChange:e=>{b(e.target.value),null==u||u(e.target.value)},onBlur:()=>{(w!==t||u)&&h(w)},placeholder:r?null!=(l=r.replace(/[\/]+$/,"").split(/[\/]/).pop())?l:"":y("proj.namePlaceholder")})]}),(0,n.jsxs)("div",{className:"grow",children:[(0,n.jsx)("label",{htmlFor:"".concat(g,"-dir"),children:y("proj.entryDir")}),(0,n.jsx)("input",{id:"".concat(g,"-dir"),type:"text",value:N,onChange:e=>{k(e.target.value),null==x||x(e.target.value)},onBlur:()=>{(N!==r||x)&&p(N)},placeholder:"C:\\Projects\\my-app"})]}),(0,n.jsx)("button",{onClick:j,disabled:m,children:y("mirror.browse")}),v&&(0,n.jsx)("button",{className:"quiet",onClick:v,disabled:m,children:f})]}),(0,n.jsxs)("div",{className:"row small",style:{marginTop:6},children:[c&&(0,n.jsx)("span",{className:"chip",title:y("proj.isDefaultWhy"),children:y("proj.isDefault")}),r&&(0,n.jsx)("span",{className:"badge ".concat(i?"done":""),title:i?y("proj.isRepo"):o,children:y(i?"proj.otherRepo":"proj.otherNotRepo")}),r&&!i&&(0,n.jsx)("span",{className:"muted",children:o||y("proj.notRepoWhy")})]}),r&&i&&(0,n.jsx)(a.b,{dir:r})]})}function y(){let{t:e}=(0,d.kj)(),[l,t]=(0,s.useState)(null),a=(0,s.useRef)(null),r=(0,s.useRef)(Promise.resolve()),[i,c]=(0,s.useState)(2),[m,u]=(0,s.useState)(2),[p,v]=(0,s.useState)(60),[f,y]=(0,s.useState)(240),[g,w]=(0,s.useState)(900),[b,N]=(0,s.useState)("none"),[k,S]=(0,s.useState)("confirm"),[F,C]=(0,s.useState)("ask"),[R,T]=(0,s.useState)(""),[D,E]=(0,s.useState)("");(0,s.useEffect)(()=>{o.FH.settings().then(e=>{var l,n,s,r,i,o;a.current=e.raw,t(e.raw);let d=null!=(l=e.raw.limits)?l:{};c("number"==typeof d.retryBlockedInFreshChat?d.retryBlockedInFreshChat:2),u("number"==typeof d.minApproachesBeforeBlocked?d.minApproachesBeforeBlocked:2),v("number"==typeof d.maxIterations?d.maxIterations:60),y("number"==typeof d.maxRunMinutes?d.maxRunMinutes:240);let m=null!=(n=e.raw.copilot)?n:{};w("number"==typeof m.replyTimeoutSec?m.replyTimeoutSec:900);let h=null!=(s=e.raw.execution)?s:{};N(null!=(r=h.isolation)?r:"none"),S(null!=(i=h.mode)?i:"confirm"),C(null!=(o=h.networkFetch)?o:"ask")}).catch(e=>E(e.message))},[]);let M=(l,n,s)=>{let i=async()=>{var r;if(!a.current)return;let i=await o.FH.settings().then(e=>e.raw).catch(()=>a.current),d={...i,[l]:{...null!=(r=i[l])?r:{},[n]:s}};T("");try{await o.FH.saveSettings(d),a.current=d,t(d),T(e("exec.saved")),E("")}catch(e){E(e.message)}},d=r.current.then(i);return r.current=d.catch(()=>void 0),d},A=h(e=>M("limits","retryBlockedInFreshChat",e)),L=h(e=>M("limits","minApproachesBeforeBlocked",e)),B=h(e=>M("limits","maxIterations",e)),I=h(e=>M("limits","maxRunMinutes",e)),P=h(e=>M("copilot","replyTimeoutSec",e)),H=(e,l)=>M("execution",e,l);return(0,n.jsxs)("div",{className:"panel",id:"execution",children:[(0,n.jsx)("h2",{children:e("exec.title")}),(0,n.jsx)("p",{className:"muted small",children:e("exec.intro")}),D&&(0,n.jsx)("div",{className:"err",children:D}),(0,n.jsx)("label",{htmlFor:"min-approaches",children:e("exec.minApproaches")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)(x,{id:"min-approaches",value:m,min:2,max:20,onChange:e=>{u(e),L(e)},disabled:!l}),(0,n.jsx)("span",{className:"muted small",children:e("exec.minApproachesUnit")})]}),(0,n.jsx)("p",{className:"why",children:e("exec.minApproachesWhy")}),(0,n.jsx)("label",{htmlFor:"retry-blocked",children:e("exec.retryBlocked")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)(x,{id:"retry-blocked",value:i,min:0,max:5,onChange:e=>{c(e),A(e)},disabled:!l}),(0,n.jsx)("span",{className:"muted small",children:e("exec.retryBlockedTimes")})]}),(0,n.jsx)("p",{className:"why",children:e("exec.retryBlockedWhy")}),(0,n.jsx)("label",{htmlFor:"max-iterations",children:e("exec.maxIterations")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)(x,{id:"max-iterations",value:p,min:5,max:200,onChange:e=>{v(e),B(e)},disabled:!l}),(0,n.jsx)("span",{className:"muted small",children:e("exec.maxIterationsUnit")})]}),(0,n.jsx)("p",{className:"why",children:e("exec.maxIterationsWhy")}),(0,n.jsx)("label",{htmlFor:"max-minutes",children:e("exec.maxRunMinutes")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)(x,{id:"max-minutes",value:f,min:10,max:1440,onChange:e=>{y(e),I(e)},disabled:!l}),(0,n.jsx)("span",{className:"muted small",children:e("exec.maxRunMinutesUnit")})]}),(0,n.jsx)("p",{className:"why",children:e("exec.maxRunMinutesWhy")}),(0,n.jsx)("label",{htmlFor:"reply-timeout",children:e("exec.replyTimeout")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)(x,{id:"reply-timeout",value:g,min:60,max:10800,onChange:e=>{w(e),P(e)},disabled:!l}),(0,n.jsx)("span",{className:"muted small",children:e("exec.replyTimeoutUnit")})]}),(0,n.jsx)("p",{className:"why",children:e("exec.replyTimeoutWhy")}),(0,n.jsx)("label",{htmlFor:"isolation",children:e("exec.isolation")}),(0,n.jsxs)("select",{id:"isolation",value:b,onChange:e=>{let l=e.target.value;N(l),H("isolation",l)},disabled:!l,children:[(0,n.jsx)("option",{value:"none",children:e("exec.isolationNone")}),(0,n.jsx)("option",{value:"none-accepted",children:e("exec.isolationNoneAccepted")}),(0,n.jsx)("option",{value:"separate-account",children:e("exec.isolationAccount")}),(0,n.jsx)("option",{value:"sandbox",children:e("exec.isolationSandbox")}),(0,n.jsx)("option",{value:"vm",children:e("exec.isolationVm")})]}),(0,n.jsx)("p",{className:"why",children:e("exec.isolationWhy")}),(0,n.jsx)("label",{htmlFor:"start-mode",children:e("exec.startMode")}),(0,n.jsxs)("select",{id:"start-mode",value:k,onChange:e=>{let l=e.target.value;S(l),H("mode",l)},disabled:!l,children:[(0,n.jsx)("option",{value:"confirm",children:e("exec.startModeAsk")}),(0,n.jsx)("option",{value:"unattended",children:e("exec.startModeAuto")})]}),(0,n.jsx)("p",{className:"why",children:e("exec.startModeWhy")}),(0,n.jsx)("label",{htmlFor:"network-fetch",children:e("exec.networkFetch")}),(0,n.jsxs)("select",{id:"network-fetch",value:F,onChange:e=>{let l=e.target.value;C(l),H("networkFetch",l)},disabled:!l,children:[(0,n.jsx)("option",{value:"ask",children:e("exec.networkFetchAsk")}),(0,n.jsx)("option",{value:"refuse",children:e("exec.networkFetchRefuse")}),(0,n.jsx)("option",{value:"run",children:e("exec.networkFetchRun")})]}),(0,n.jsx)(j,{msg:R}),(0,n.jsx)("p",{className:"why",children:e("exec.networkFetchWhy")})]})}function g(e){var l;let{catalogue:t,setCatalogue:a,refreshModels:r,refreshing:i,refreshMsg:c}=e,{t:u}=(0,d.kj)(),h=(0,d.W3)(),[x,p]=(0,s.useState)(""),[v,f]=(0,s.useState)(""),[y,g]=(0,s.useState)(!1),w=null!=(l=null==t?void 0:t.defaultModel)?l:"",b=async e=>{g(!0),p("");try{let l=await o.FH.setDefaultModel(e);t&&a({...t,defaultModel:l.defaultModel}),p(l.defaultModel?u("def.modelSaved",{name:l.defaultModel}):u("def.modelCleared")),f("")}catch(e){f(e.message)}finally{g(!1)}};return(0,n.jsxs)("div",{className:"panel",id:"model",children:[(0,n.jsx)("h2",{children:u("def.modelTitle")}),(0,n.jsx)("p",{className:"muted small",children:u("def.modelIntro")}),v&&(0,n.jsx)("div",{className:"err",children:v}),(0,n.jsx)("label",{htmlFor:"default-model",children:u("def.modelField")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)(m.Y,{id:"default-model",chosen:w,onChange:e=>void b(e),none:u("def.modelNone"),catalogue:t,disabled:y||i}),(0,n.jsx)("button",{className:"quiet",onClick:()=>void b(""),disabled:y||!w,children:u("proj.clear")}),(0,n.jsx)("button",{onClick:()=>void r(),disabled:y||i,children:u("model.refresh")})]}),(0,n.jsx)(j,{msg:x||c}),(0,n.jsx)("p",{className:"muted small",style:{marginTop:8},children:(null==t?void 0:t.readAt)?u("model.readAt",{t:h(t.readAt),n:t.options.length}):u("model.neverRead")}),(0,n.jsx)("h3",{children:u("proj.affects")}),(0,n.jsxs)("ul",{className:"muted small",style:{margin:0,paddingLeft:20},children:[(0,n.jsx)("li",{children:u("def.modelAffectsNew")}),(0,n.jsx)("li",{children:u("def.modelAffectsExisting")}),(0,n.jsx)("li",{children:u("def.modelAffectsBatch")})]})]})}function w(e){var l,t;let{catalogue:a,setCatalogue:r,refreshModels:c,refreshing:u,refreshMsg:h}=e,{t:x}=(0,d.kj)(),[p,v]=(0,s.useState)(""),[f,y]=(0,s.useState)(""),[g,w]=(0,s.useState)(!1),b=null!=(l=null==a?void 0:a.defaultReviewModel)?l:"",N=async e=>{w(!0),v("");try{let l=await o.FH.setDefaultReviewModel(e);a&&r({...a,defaultReviewModel:l.defaultReviewModel}),v(l.defaultReviewModel?x("def.reviewSaved",{name:l.defaultReviewModel}):x("def.reviewCleared")),y("")}catch(e){y(e.message)}finally{w(!1)}},k=""!==b&&b===(null!=(t=null==a?void 0:a.defaultModel)?t:"");return(0,n.jsxs)("div",{className:"panel",id:"review",children:[(0,n.jsx)("h2",{children:x("def.reviewTitle")}),(0,n.jsx)("p",{className:"muted small",children:x("def.reviewIntro")}),f&&(0,n.jsx)("div",{className:"err",children:f}),(0,n.jsx)("label",{htmlFor:"default-review-model",children:x("def.reviewField")}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)(m.Y,{id:"default-review-model",chosen:b,onChange:e=>void N(e),none:x("def.reviewNone"),catalogue:a,disabled:g||u}),(0,n.jsx)("button",{className:"quiet",onClick:()=>void N(""),disabled:g||!b,children:x("proj.clear")}),(0,n.jsx)("button",{onClick:()=>void c(),disabled:g||u,children:x("model.refresh")})]}),k&&(0,n.jsx)("p",{className:"why",style:{color:"var(--warn)"},children:x("def.reviewSame")}),(0,n.jsx)(j,{msg:p||h}),(0,n.jsx)("h3",{children:x("proj.affects")}),(0,n.jsxs)("ul",{className:"muted small",style:{margin:0,paddingLeft:20},children:[(0,n.jsx)("li",{children:x("def.reviewAffectsNew")}),(0,n.jsx)("li",{children:x("def.reviewAffectsExisting")}),(0,n.jsx)("li",{children:x("def.reviewAffectsBatch")})]}),(0,n.jsxs)("div",{className:"row",style:{marginTop:12},children:[(0,n.jsx)(i(),{href:"/",className:"button-link plain",children:x("proj.toSessions")}),(0,n.jsx)(i(),{href:"/import",className:"button-link quiet",children:x("proj.toImport")})]})]})}},4784:(e,l,t)=>{"use strict";t.d(l,{Y:()=>i});var n=t(3365),s=t(1521),a=t(5549),r=t(867);function i(e){var l,t;let{id:i,chosen:o,onChange:d,none:c,catalogue:m,disabled:u=!1,style:h}=e,{t:x}=(0,r.kj)(),p=function(e){let[l,t]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(void 0!==e)return;let l=!0;return a.FH.models().then(e=>{l&&t(e)}).catch(()=>void 0),()=>{l=!1}},[e]),void 0!==e?e:l}(m),j=null!=(l=null==p?void 0:p.options)?l:[],v=j.some(e=>e.name===o),f=j.filter(e=>!e.group),y=new Map;for(let e of j)e.group&&y.set(e.group,[...null!=(t=y.get(e.group))?t:[],e]);return(0,n.jsxs)("select",{id:i,value:o,onChange:e=>d(e.target.value),disabled:u,style:{width:"auto",minWidth:280,...h},children:[(0,n.jsx)("option",{value:"",children:c}),o&&!v&&(0,n.jsx)("option",{value:o,children:x("model.notInList",{name:o})}),f.map(e=>(0,n.jsxs)("option",{value:e.name,disabled:e.disabled,children:[e.name,e.disabled?" — ".concat(x("model.unavailable")):""]},e.name)),[...y.entries()].map(e=>{let[l,t]=e;return(0,n.jsx)("optgroup",{label:l,children:t.map(e=>(0,n.jsxs)("option",{value:e.name,disabled:e.disabled,children:[e.name,e.disabled?" — ".concat(x("model.unavailable")):""]},e.name))},l)})]})}},4969:(e,l,t)=>{"use strict";t.d(l,{V:()=>a});var n=t(1521);let s='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function a(e,l,t){(0,n.useEffect)(()=>{var n,a;if(!l)return;let r=document.activeElement instanceof HTMLElement?document.activeElement:null,i=e.current,o=null!=(a=null!=(n=null==t?void 0:t.current)?n:null==i?void 0:i.querySelector(s))?a:null;null==o||o.focus();let d=e=>{if("Tab"!==e.key||!i)return;let l=Array.from(i.querySelectorAll(s)).filter(e=>null!==e.offsetParent);if(0===l.length)return;let t=l[0],n=l[l.length-1],a=i.contains(document.activeElement);e.shiftKey&&(document.activeElement===t||!a)?(e.preventDefault(),n.focus()):e.shiftKey||document.activeElement!==n&&a||(e.preventDefault(),t.focus())};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d),r&&document.contains(r)&&r.focus()}},[e,l,t])}}},e=>{e.O(0,[197,867,549,347,131,358],()=>e(e.s=1896)),_N_E=e.O()}]);
|
/package/dist/web/_next/static/{IwNZiBrEMAcXEUFj2miiU → GhdY7nVcYi-WV3j7saVPK}/_buildManifest.js
RENAMED
|
File without changes
|
/package/dist/web/_next/static/{IwNZiBrEMAcXEUFj2miiU → GhdY7nVcYi-WV3j7saVPK}/_ssgManifest.js
RENAMED
|
File without changes
|