copilot-operator 0.1.34 → 0.1.36
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.service.js +30 -1
- package/dist/src/cli.js +11 -8
- package/dist/src/config/schema.js +6 -0
- package/dist/src/orchestrator/taskRunner.js +82 -10
- package/dist/src/plan/systemGuide.js +40 -0
- package/dist/src/transport/copilotTransport.js +107 -18
- package/dist/src/transport/locators.js +7 -2
- package/dist/src/transport/modelMatch.js +12 -1
- package/dist/web/404.html +2 -2
- package/dist/web/_next/static/chunks/867-d4f5bd8c5805bffb.js +1 -0
- package/dist/web/_next/static/chunks/app/defaults/page-879158e9e550eea7.js +1 -0
- package/dist/web/_next/static/chunks/app/layout-630b663626cebe4a.js +1 -0
- package/dist/web/appearance.html +2 -2
- package/dist/web/appearance.txt +10 -10
- package/dist/web/defaults.html +2 -2
- package/dist/web/defaults.txt +10 -10
- package/dist/web/history.html +2 -2
- package/dist/web/history.txt +10 -10
- package/dist/web/import.html +2 -2
- package/dist/web/import.txt +10 -10
- package/dist/web/index.html +2 -2
- package/dist/web/index.txt +10 -10
- package/dist/web/level1.html +2 -2
- package/dist/web/level1.txt +10 -10
- package/dist/web/presets.html +2 -2
- package/dist/web/presets.txt +10 -10
- package/dist/web/sessions/view.html +2 -2
- package/dist/web/sessions/view.txt +10 -10
- package/dist/web/system.html +2 -2
- package/dist/web/system.txt +10 -10
- package/package.json +2 -1
- package/dist/web/_next/static/chunks/867-dfaaa8047cbf2fc2.js +0 -1
- package/dist/web/_next/static/chunks/app/defaults/page-54f8f1ab4cac47fa.js +0 -1
- package/dist/web/_next/static/chunks/app/layout-3efbb282292ccc38.js +0 -1
- /package/dist/web/_next/static/{pfa56tOBq6o-WBQZnyUn2 → rWkIIFdTKzD4fL0Pe-y-9}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{pfa56tOBq6o-WBQZnyUn2 → rWkIIFdTKzD4fL0Pe-y-9}/_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 a=t(3365),n=t(1521),s=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 a;return a={kind:"confirm",message:e,...l,resolve:t},void(i?i(a):o.push(a))})}function c(e){var l,t;let{children:d}=e,{t:c}=(0,s.kj)(),[m,u]=(0,n.useState)([]),h=(0,n.useRef)(null),p=(0,n.useRef)(null);(0,n.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 x=m[0],j=(0,n.useCallback)(e=>{x&&(x.resolve(e),u(e=>e.slice(1)))},[x]);return(0,r.V)(p,!!x,h),(0,n.useEffect)(()=>{if(!x)return;let e=e=>{"Escape"===e.key&&(e.preventDefault(),j(!1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[x,j]),(0,a.jsxs)(a.Fragment,{children:[d,x&&(0,a.jsx)("div",{className:"modal-backdrop",onClick:()=>j(!1),role:"presentation",children:(0,a.jsxs)("div",{ref:p,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,a.jsx)("h2",{id:"modal-title",children:null!=(l=x.title)?l:c("confirm"===x.kind?"dialog.confirmTitle":"dialog.noticeTitle")}),(0,a.jsx)("div",{id:"modal-body",className:"modal-body",children:x.message}),(0,a.jsxs)("div",{className:"row modal-actions",children:["confirm"===x.kind&&(0,a.jsx)("button",{type:"button",className:"quiet",onClick:()=>j(!1),children:c("dialog.cancel")}),(0,a.jsx)("button",{ref:h,type:"button",className:x.danger?"danger":"primary",onClick:()=>j(!0),children:null!=(t=x.okLabel)?t:c("dialog.ok")})]})]})})]})}},1896:(e,l,t)=>{Promise.resolve().then(t.bind(t,3197))},3197:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>u});var a=t(3365),n=t(1521),s=t(8596),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,n.useState)(null),[s,r]=(0,n.useState)(!1),[i,m]=(0,n.useState)("");(0,n.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 a=await o.FH.models().then(()=>o.FH.refreshModels());t(a),m(0===a.options.length?null!=(l=a.note)?l:e("model.none"):e("model.refreshed",{n:a.options.length}))}catch(e){m(e.message)}finally{r(!1)}}},h={catalogue:l,setCatalogue:t,refreshModels:u,refreshing:s,refreshMsg:i};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"panel",children:[(0,a.jsx)("h2",{children:e("def.title")}),(0,a.jsx)("p",{className:"muted small",children:e("def.intro")}),(0,a.jsx)("p",{className:"why",children:e("def.autoSave")})]}),(0,a.jsx)(v,{}),(0,a.jsx)(g,{}),(0,a.jsx)(b,{...h}),(0,a.jsx)(w,{...h}),(0,a.jsx)(y,{})]})}function h(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:900,t=(0,n.useRef)(null),a=(0,n.useRef)(null),s=(0,n.useRef)(e);return s.current=e,(0,n.useEffect)(()=>()=>{t.current&&clearTimeout(t.current),a.current&&s.current(a.current.value)},[]),e=>{t.current&&clearTimeout(t.current),a.current={value:e},t.current=setTimeout(()=>{a.current=null,s.current(e)},l)}}function p(e){let{id:l,value:t,min:s,max:r,onChange:i,disabled:o}=e,[d,c]=(0,n.useState)(String(t));return(0,n.useEffect)(()=>c(e=>x(e)===t?e:String(t)),[t]),(0,a.jsx)("input",{id:l,type:"number",min:s,max:r,step:1,value:d,onChange:e=>{c(e.target.value);let l=x(e.target.value);null!==l&&l>=s&&l<=r&&i(l)},onBlur:()=>{let e=x(d),l=null===e?t:Math.max(s,Math.min(r,e));c(String(l)),l!==t&&i(l)},style:{width:"9ch"},disabled:o})}function x(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:n}=(0,d.kj)();return(0,a.jsxs)("div",{className:"row",style:{marginTop:6},children:[t&&(0,a.jsx)("button",{className:"quiet",onClick:t,title:n("def.saveAnywayWhy"),children:n("def.saveAnyway")}),(0,a.jsx)("span",{className:"muted small",role:"status",children:l||n("def.savedAutomatically")})]})}function v(){var e;let{t:l}=(0,d.kj)(),[t,s]=(0,n.useState)(null),[r,i]=(0,n.useState)(""),[c,m]=(0,n.useState)(""),[u,p]=(0,n.useState)(""),[x,v]=(0,n.useState)(""),[y,g]=(0,n.useState)(!1),[b,w]=(0,n.useState)(""),[N,k]=(0,n.useState)(""),S=(0,n.useCallback)(async()=>{try{let e=await o.FH.project();s(e),i(e.rootDir),m(e.name),v("")}catch(e){v(e.message)}},[]);(0,n.useEffect)(()=>{S()},[S]);let C=async(e,l)=>{g(!0),p("");try{let t=await o.FH.setProject(e);return s(t),i(t.rootDir),p(l(t)),v(""),!0}catch(e){return v(e.message),!1}finally{g(!1)}},F=e=>C({rootDir:e},e=>e.rootDir?l("proj.saved",{dir:e.rootDir}):l("proj.cleared")),R=e=>C({name:e},()=>l("proj.nameSaved")),M=h(F),T=h(R),E=async(e,l)=>{g(!0);try{var t;let a=await o.FH.browseFolder(l.trim()||void 0);a.ok?e(a.path):a.cancelled||v(null!=(t=a.reason)?t:"")}catch(e){v(e.message)}finally{g(!1)}},D=null!=(e=null==t?void 0:t.others)?e:[],B=e=>e.map(e=>({name:e.name,rootDir:e.rootDir})),A=async()=>{await C({others:[...B(D),{name:b.trim(),rootDir:N.trim()}]},e=>l("proj.othersSaved",{n:e.others.length}))&&(w(""),k(""))};return(0,a.jsxs)("div",{className:"panel",id:"project",children:[(0,a.jsx)("h2",{children:l("proj.title")}),(0,a.jsx)("p",{className:"muted small",children:l("proj.intro")}),x&&(0,a.jsx)("div",{className:"err",children:x}),(0,a.jsx)("p",{className:"muted small",children:l("proj.listIntro")}),(0,a.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),T(e)},onName:e=>void R(e),onDirInput:e=>{i(e),M(e)},onDir:e=>void F(e),onBrowse:()=>void E(e=>void F(e),r),onRemove:(null==t?void 0:t.rootDir)?()=>void F(""):void 0,removeLabel:l("proj.clear")}),(0,a.jsx)(j,{msg:u}),t&&!t.rootDir&&(0,a.jsx)("p",{className:"muted small",style:{marginTop:8},children:l("proj.none")}),D.map((e,t)=>(0,a.jsx)(f,{name:e.name,dir:e.rootDir,repoOk:e.repoOk,repoProblem:e.repoProblem,busy:y,onName:t=>void C({others:B(D.map(l=>l.name===e.name?{...l,name:t}:l))},()=>l("proj.nameSaved")),onDir:t=>void C({others:B(D.map(l=>l.name===e.name?{...l,rootDir:t}:l))},()=>l("proj.othersSaved",{n:D.length})),onBrowse:()=>void E(t=>void C({others:B(D.map(l=>l.name===e.name?{...l,rootDir:t}:l))},()=>l("proj.othersSaved",{n:D.length})),e.rootDir),onRemove:()=>{let t;t=e.name,C({others:B(D.filter(e=>e.name!==t))},e=>l("proj.othersSaved",{n:e.others.length}))},removeLabel:l("proj.otherRemove")},"other-".concat(t))),(0,a.jsx)("h3",{id:"others",children:l("proj.addTitle")}),(0,a.jsx)("p",{className:"muted small",children:l("proj.othersIntro")}),(0,a.jsxs)("div",{className:"row",style:{marginTop:8},children:[(0,a.jsx)("input",{type:"text","aria-label":l("proj.entryName"),value:b,onChange:e=>w(e.target.value),placeholder:l("proj.entryName"),disabled:y,style:{width:160}}),(0,a.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,a.jsx)("button",{onClick:()=>void E(e=>k(e),N),disabled:y,children:l("mirror.browse")}),(0,a.jsx)("button",{className:"primary",onClick:()=>void A(),disabled:y||!b.trim()||!N.trim(),children:l("proj.otherAdd")})]}),(0,a.jsx)("h3",{children:l("proj.affects")}),(0,a.jsxs)("ul",{className:"muted small",style:{margin:0,paddingLeft:20},children:[(0,a.jsx)("li",{children:l("proj.affectsNew")}),(0,a.jsx)("li",{children:l("proj.affectsExisting")}),(0,a.jsx)("li",{children:l("proj.affectsPlan")}),(0,a.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:p,onDir:x,onBrowse:j,onRemove:v,removeLabel:f}=e,{t:y}=(0,d.kj)(),g=(0,n.useId)(),[b,w]=(0,n.useState)(t),[N,k]=(0,n.useState)(r);return(0,n.useEffect)(()=>w(t),[t]),(0,n.useEffect)(()=>k(r),[r]),(0,a.jsxs)("div",{className:"panel inner",style:{marginTop:10},children:[(0,a.jsxs)("div",{className:"row",children:[(0,a.jsxs)("div",{style:{width:"min(200px, 100%)"},children:[(0,a.jsx)("label",{htmlFor:"".concat(g,"-name"),children:y("proj.entryName")}),(0,a.jsx)("input",{id:"".concat(g,"-name"),type:"text",value:b,onChange:e=>{w(e.target.value),null==u||u(e.target.value)},onBlur:()=>{(b!==t||u)&&h(b)},placeholder:r?null!=(l=r.replace(/[\/]+$/,"").split(/[\/]/).pop())?l:"":y("proj.namePlaceholder")})]}),(0,a.jsxs)("div",{className:"grow",children:[(0,a.jsx)("label",{htmlFor:"".concat(g,"-dir"),children:y("proj.entryDir")}),(0,a.jsx)("input",{id:"".concat(g,"-dir"),type:"text",value:N,onChange:e=>{k(e.target.value),null==p||p(e.target.value)},onBlur:()=>{(N!==r||p)&&x(N)},placeholder:"C:\\Projects\\my-app"})]}),(0,a.jsx)("button",{onClick:j,disabled:m,children:y("mirror.browse")}),v&&(0,a.jsx)("button",{className:"quiet",onClick:v,disabled:m,children:f})]}),(0,a.jsxs)("div",{className:"row small",style:{marginTop:6},children:[c&&(0,a.jsx)("span",{className:"chip",title:y("proj.isDefaultWhy"),children:y("proj.isDefault")}),r&&(0,a.jsx)("span",{className:"badge ".concat(i?"done":""),title:i?y("proj.isRepo"):o,children:y(i?"proj.otherRepo":"proj.otherNotRepo")}),r&&!i&&(0,a.jsx)("span",{className:"muted",children:o||y("proj.notRepoWhy")})]}),r&&i&&(0,a.jsx)(s.E,{dir:r})]})}function y(){let{t:e}=(0,d.kj)(),[l,t]=(0,n.useState)(null),s=(0,n.useRef)(null),r=(0,n.useRef)(Promise.resolve()),[i,c]=(0,n.useState)(2),[m,u]=(0,n.useState)(2),[x,v]=(0,n.useState)(2),[f,y]=(0,n.useState)(60),[g,b]=(0,n.useState)(240),[w,N]=(0,n.useState)(900),[k,S]=(0,n.useState)("none"),[C,F]=(0,n.useState)("confirm"),[R,M]=(0,n.useState)("ask"),[T,E]=(0,n.useState)(""),[D,B]=(0,n.useState)("");(0,n.useEffect)(()=>{o.FH.settings().then(e=>{var l,a,n,r,i,o;s.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.maxReviewRounds?d.maxReviewRounds:2),y("number"==typeof d.maxIterations?d.maxIterations:60),b("number"==typeof d.maxRunMinutes?d.maxRunMinutes:240);let m=null!=(a=e.raw.copilot)?a:{};N("number"==typeof m.replyTimeoutSec?m.replyTimeoutSec:900);let h=null!=(n=e.raw.execution)?n:{};S(null!=(r=h.isolation)?r:"none"),F(null!=(i=h.mode)?i:"confirm"),M(null!=(o=h.networkFetch)?o:"ask")}).catch(e=>B(e.message))},[]);let A=(l,a,n)=>{let i=async()=>{var r;if(!s.current)return;let i=await o.FH.settings().then(e=>e.raw).catch(()=>s.current),d={...i,[l]:{...null!=(r=i[l])?r:{},[a]:n}};E("");try{await o.FH.saveSettings(d),s.current=d,t(d),E(e("exec.saved")),B("")}catch(e){B(e.message)}},d=r.current.then(i);return r.current=d.catch(()=>void 0),d},I=h(e=>A("limits","retryBlockedInFreshChat",e)),H=h(e=>A("limits","minApproachesBeforeBlocked",e)),W=h(e=>A("limits","maxReviewRounds",e)),P=h(e=>A("limits","maxIterations",e)),L=h(e=>A("limits","maxRunMinutes",e)),O=h(e=>A("copilot","replyTimeoutSec",e)),q=(e,l)=>A("execution",e,l);return(0,a.jsxs)("div",{className:"panel",id:"execution",children:[(0,a.jsx)("h2",{children:e("exec.title")}),(0,a.jsx)("p",{className:"muted small",children:e("exec.intro")}),D&&(0,a.jsx)("div",{className:"err",children:D}),(0,a.jsx)("label",{htmlFor:"min-approaches",children:e("exec.minApproaches")}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)(p,{id:"min-approaches",value:m,min:2,max:20,onChange:e=>{u(e),H(e)},disabled:!l}),(0,a.jsx)("span",{className:"muted small",children:e("exec.minApproachesUnit")})]}),(0,a.jsx)("p",{className:"why",children:e("exec.minApproachesWhy")}),(0,a.jsx)("label",{htmlFor:"max-review-rounds",children:e("exec.maxReviewRounds")}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)(p,{id:"max-review-rounds",value:x,min:1,max:6,onChange:e=>{v(e),W(e)},disabled:!l}),(0,a.jsx)("span",{className:"muted small",children:e("exec.maxReviewRoundsUnit")})]}),(0,a.jsx)("p",{className:"why",children:e("exec.maxReviewRoundsWhy")}),(0,a.jsx)("label",{htmlFor:"retry-blocked",children:e("exec.retryBlocked")}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)(p,{id:"retry-blocked",value:i,min:0,max:5,onChange:e=>{c(e),I(e)},disabled:!l}),(0,a.jsx)("span",{className:"muted small",children:e("exec.retryBlockedTimes")})]}),(0,a.jsx)("p",{className:"why",children:e("exec.retryBlockedWhy")}),(0,a.jsx)("label",{htmlFor:"max-iterations",children:e("exec.maxIterations")}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)(p,{id:"max-iterations",value:f,min:5,max:200,onChange:e=>{y(e),P(e)},disabled:!l}),(0,a.jsx)("span",{className:"muted small",children:e("exec.maxIterationsUnit")})]}),(0,a.jsx)("p",{className:"why",children:e("exec.maxIterationsWhy")}),(0,a.jsx)("label",{htmlFor:"max-minutes",children:e("exec.maxRunMinutes")}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)(p,{id:"max-minutes",value:g,min:10,max:1440,onChange:e=>{b(e),L(e)},disabled:!l}),(0,a.jsx)("span",{className:"muted small",children:e("exec.maxRunMinutesUnit")})]}),(0,a.jsx)("p",{className:"why",children:e("exec.maxRunMinutesWhy")}),(0,a.jsx)("label",{htmlFor:"reply-timeout",children:e("exec.replyTimeout")}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)(p,{id:"reply-timeout",value:w,min:60,max:10800,onChange:e=>{N(e),O(e)},disabled:!l}),(0,a.jsx)("span",{className:"muted small",children:e("exec.replyTimeoutUnit")})]}),(0,a.jsx)("p",{className:"why",children:e("exec.replyTimeoutWhy")}),(0,a.jsx)("label",{htmlFor:"isolation",children:e("exec.isolation")}),(0,a.jsxs)("select",{id:"isolation",value:k,onChange:e=>{let l=e.target.value;S(l),q("isolation",l)},disabled:!l,children:[(0,a.jsx)("option",{value:"none",children:e("exec.isolationNone")}),(0,a.jsx)("option",{value:"none-accepted",children:e("exec.isolationNoneAccepted")}),(0,a.jsx)("option",{value:"separate-account",children:e("exec.isolationAccount")}),(0,a.jsx)("option",{value:"sandbox",children:e("exec.isolationSandbox")}),(0,a.jsx)("option",{value:"vm",children:e("exec.isolationVm")})]}),(0,a.jsx)("p",{className:"why",children:e("exec.isolationWhy")}),(0,a.jsx)("label",{htmlFor:"start-mode",children:e("exec.startMode")}),(0,a.jsxs)("select",{id:"start-mode",value:C,onChange:e=>{let l=e.target.value;F(l),q("mode",l)},disabled:!l,children:[(0,a.jsx)("option",{value:"confirm",children:e("exec.startModeAsk")}),(0,a.jsx)("option",{value:"unattended",children:e("exec.startModeAuto")})]}),(0,a.jsx)("p",{className:"why",children:e("exec.startModeWhy")}),(0,a.jsx)("label",{htmlFor:"network-fetch",children:e("exec.networkFetch")}),(0,a.jsxs)("select",{id:"network-fetch",value:R,onChange:e=>{let l=e.target.value;M(l),q("networkFetch",l)},disabled:!l,children:[(0,a.jsx)("option",{value:"ask",children:e("exec.networkFetchAsk")}),(0,a.jsx)("option",{value:"refuse",children:e("exec.networkFetchRefuse")}),(0,a.jsx)("option",{value:"run",children:e("exec.networkFetchRun")})]}),(0,a.jsx)(j,{msg:T}),(0,a.jsx)("p",{className:"why",children:e("exec.networkFetchWhy")})]})}function g(){let{t:e}=(0,d.kj)(),[l,t]=(0,n.useState)(""),[s,r]=(0,n.useState)(!1),[i,c]=(0,n.useState)(""),[m,u]=(0,n.useState)(""),h=async()=>{r(!0),u(""),c(e("login.waiting"));try{let e=await o.FH.login(l);e.ok?c(e.message):(c(""),u(e.message))}catch(e){c(""),u(e.message)}finally{r(!1)}};return(0,a.jsxs)("div",{className:"panel",id:"login",children:[(0,a.jsx)("h2",{children:e("login.title")}),(0,a.jsx)("p",{className:"muted small",children:e("login.intro")}),m&&(0,a.jsx)("div",{className:"err",children:m}),(0,a.jsx)("label",{htmlFor:"login-account",children:e("login.account")}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("input",{id:"login-account",type:"email",className:"grow",value:l,onChange:e=>t(e.target.value),placeholder:"name@company.com",disabled:s}),(0,a.jsx)("button",{className:"primary",onClick:()=>void h(),disabled:s,children:s?e("login.busy"):e("login.button")})]}),(0,a.jsx)("p",{className:"why",children:e("login.accountWhy")}),i&&(0,a.jsx)("div",{className:"small",role:"status",children:i})]})}function b(e){var l;let{catalogue:t,setCatalogue:s,refreshModels:r,refreshing:i,refreshMsg:c}=e,{t:u}=(0,d.kj)(),h=(0,d.W3)(),[p,x]=(0,n.useState)(""),[v,f]=(0,n.useState)(""),[y,g]=(0,n.useState)(!1),b=null!=(l=null==t?void 0:t.defaultModel)?l:"",w=async e=>{g(!0),x("");try{let l=await o.FH.setDefaultModel(e);t&&s({...t,defaultModel:l.defaultModel}),x(l.defaultModel?u("def.modelSaved",{name:l.defaultModel}):u("def.modelCleared")),f("")}catch(e){f(e.message)}finally{g(!1)}};return(0,a.jsxs)("div",{className:"panel",id:"model",children:[(0,a.jsx)("h2",{children:u("def.modelTitle")}),(0,a.jsx)("p",{className:"muted small",children:u("def.modelIntro")}),v&&(0,a.jsx)("div",{className:"err",children:v}),(0,a.jsx)("label",{htmlFor:"default-model",children:u("def.modelField")}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)(m.Y,{id:"default-model",chosen:b,onChange:e=>void w(e),none:u("def.modelNone"),catalogue:t,disabled:y||i}),(0,a.jsx)("button",{className:"quiet",onClick:()=>void w(""),disabled:y||!b,children:u("proj.clear")}),(0,a.jsx)("button",{onClick:()=>void r(),disabled:y||i,children:u("model.refresh")})]}),(0,a.jsx)(j,{msg:p||c}),(0,a.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,a.jsx)("h3",{children:u("proj.affects")}),(0,a.jsxs)("ul",{className:"muted small",style:{margin:0,paddingLeft:20},children:[(0,a.jsx)("li",{children:u("def.modelAffectsNew")}),(0,a.jsx)("li",{children:u("def.modelAffectsExisting")}),(0,a.jsx)("li",{children:u("def.modelAffectsBatch")})]})]})}function w(e){var l,t;let{catalogue:s,setCatalogue:r,refreshModels:c,refreshing:u,refreshMsg:h}=e,{t:p}=(0,d.kj)(),[x,v]=(0,n.useState)(""),[f,y]=(0,n.useState)(""),[g,b]=(0,n.useState)(!1),w=null!=(l=null==s?void 0:s.defaultReviewModel)?l:"",N=async e=>{b(!0),v("");try{let l=await o.FH.setDefaultReviewModel(e);s&&r({...s,defaultReviewModel:l.defaultReviewModel}),v(l.defaultReviewModel?p("def.reviewSaved",{name:l.defaultReviewModel}):p("def.reviewCleared")),y("")}catch(e){y(e.message)}finally{b(!1)}},k=""!==w&&w===(null!=(t=null==s?void 0:s.defaultModel)?t:"");return(0,a.jsxs)("div",{className:"panel",id:"review",children:[(0,a.jsx)("h2",{children:p("def.reviewTitle")}),(0,a.jsx)("p",{className:"muted small",children:p("def.reviewIntro")}),f&&(0,a.jsx)("div",{className:"err",children:f}),(0,a.jsx)("label",{htmlFor:"default-review-model",children:p("def.reviewField")}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)(m.Y,{id:"default-review-model",chosen:w,onChange:e=>void N(e),none:p("def.reviewNone"),catalogue:s,disabled:g||u}),(0,a.jsx)("button",{className:"quiet",onClick:()=>void N(""),disabled:g||!w,children:p("proj.clear")}),(0,a.jsx)("button",{onClick:()=>void c(),disabled:g||u,children:p("model.refresh")})]}),k&&(0,a.jsx)("p",{className:"why",style:{color:"var(--warn)"},children:p("def.reviewSame")}),(0,a.jsx)(j,{msg:x||h}),(0,a.jsx)("h3",{children:p("proj.affects")}),(0,a.jsxs)("ul",{className:"muted small",style:{margin:0,paddingLeft:20},children:[(0,a.jsx)("li",{children:p("def.reviewAffectsNew")}),(0,a.jsx)("li",{children:p("def.reviewAffectsExisting")}),(0,a.jsx)("li",{children:p("def.reviewAffectsBatch")})]}),(0,a.jsxs)("div",{className:"row",style:{marginTop:12},children:[(0,a.jsx)(i(),{href:"/",className:"button-link plain",children:p("proj.toSessions")}),(0,a.jsx)(i(),{href:"/import",className:"button-link quiet",children:p("proj.toImport")})]})]})}},4784:(e,l,t)=>{"use strict";t.d(l,{Y:()=>i});var a=t(3365),n=t(1521),s=t(5549),r=t(867);function i(e){var l,t,i;let{id:o,chosen:d,onChange:c,none:m,catalogue:u,disabled:h=!1,style:p}=e,{t:x}=(0,r.kj)(),j=function(e){let[l,t]=(0,n.useState)(null);return(0,n.useEffect)(()=>{if(void 0!==e)return;let l=!0;return s.FH.models().then(e=>{l&&t(e)}).catch(()=>void 0),()=>{l=!1}},[e]),void 0!==e?e:l}(u),v=null!=(l=null==j?void 0:j.options)?l:[],f=e=>e.toLowerCase().replace(/[-‐‑‒–—_]+/g," ").replace(/\s+/g," ").trim(),y=d?v.find(e=>f(e.name)===f(d)):void 0,g=null!=(t=null==y?void 0:y.name)?t:d,b=!!y,w=v.filter(e=>!e.group),N=new Map;for(let e of v)e.group&&N.set(e.group,[...null!=(i=N.get(e.group))?i:[],e]);return(0,a.jsxs)("select",{id:o,value:g,onChange:e=>c(e.target.value),disabled:h,style:{width:"auto",minWidth:280,...p},children:[(0,a.jsx)("option",{value:"",children:m}),d&&!b&&(0,a.jsx)("option",{value:d,children:x("model.notInList",{name:d})}),w.map(e=>(0,a.jsxs)("option",{value:e.name,disabled:e.disabled,children:[e.name,e.disabled?" — ".concat(x("model.unavailable")):""]},e.name)),[...N.entries()].map(e=>{let[l,t]=e;return(0,a.jsx)("optgroup",{label:l,children:t.map(e=>(0,a.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:()=>s});var a=t(1521);let n='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function s(e,l,t){(0,a.useEffect)(()=>{var a,s;if(!l)return;let r=document.activeElement instanceof HTMLElement?document.activeElement:null,i=e.current,o=null!=(s=null!=(a=null==t?void 0:t.current)?a:null==i?void 0:i.querySelector(n))?s:null;null==o||o.focus();let d=e=>{if("Tab"!==e.key||!i)return;let l=Array.from(i.querySelectorAll(n)).filter(e=>null!==e.offsetParent);if(0===l.length)return;let t=l[0],a=l[l.length-1],s=i.contains(document.activeElement);e.shiftKey&&(document.activeElement===t||!s)?(e.preventDefault(),a.focus()):e.shiftKey||document.activeElement!==a&&s||(e.preventDefault(),t.focus())};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d),r&&document.contains(r)&&r.focus()}},[e,l,t])}},8596:(e,l,t)=>{"use strict";t.d(l,{E:()=>i});var a=t(3365),n=t(1521),s=t(5549),r=t(867);function i(e){var l,t,i,o,d,c,m;let{dir:u,onDone:h}=e,{t:p}=(0,r.kj)(),x=(0,r.W3)(),[j,v]=(0,n.useState)(null),[f,y]=(0,n.useState)(""),[g,b]=(0,n.useState)(""),[w,N]=(0,n.useState)(""),[k,S]=(0,n.useState)(!1),C=e=>(null!=e?e:"—").slice(0,8),F=async e=>{b(""),N(""),y(e?"fetch":"prepare");try{v(await s.FH.preparePreview(u,e))}catch(e){b(e.message)}finally{y("")}},R=async()=>{if(null==j?void 0:j.fingerprint){b(""),y("prepare");try{var e,l;let t=await s.FH.prepareProject(u,j.fingerprint,{savedBranch:j.savedBranch,savedMainBranch:j.savedMainBranch});t.ok?(N(null!=(l=t.result)?l:""),v(null),null==h||h()):b(null!=(e=t.problem)?e:"")}catch(e){b(e.message)}finally{y("")}}},M=async e=>{try{await navigator.clipboard.writeText(e),S(!0),window.setTimeout(()=>S(!1),2500)}catch(e){b(p("plan.copyFailed"))}},T=e=>(0,a.jsxs)("ul",{style:{margin:"2px 0 6px",paddingLeft:20},children:[e.slice(0,30).map(e=>(0,a.jsx)("li",{children:(0,a.jsx)("code",{children:e})},e)),e.length>30&&(0,a.jsx)("li",{className:"muted",children:p("prep.more",{n:e.length-30})})]}),E=j&&!j.ok&&j.fetched&&!j.fetched.ok;return(0,a.jsxs)("div",{className:"prepare-folder small",style:{marginTop:8,overflowWrap:"anywhere"},children:[(0,a.jsx)("button",{type:"button",onClick:()=>void F(!0),disabled:!!f,children:p("prep.show")}),(0,a.jsx)("p",{className:"why",children:p("prep.why")}),(0,a.jsx)("p",{className:"why",children:p("prep.password")}),"fetch"===f&&(0,a.jsx)("p",{role:"status",children:p("prep.fetching")}),g&&(0,a.jsx)("p",{className:"err",role:"alert",children:g}),w&&(0,a.jsx)("p",{className:"notice",role:"status",children:w}),j&&!j.ok&&!E&&(0,a.jsx)("p",{className:"err",children:j.problem}),E&&(0,a.jsxs)("div",{className:"notice caution",style:{marginTop:8},children:[(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:p("prep.fetchFailed")})," ",(0,a.jsx)("code",{children:null==(l=j.fetched)?void 0:l.detail})]}),(null==(t=j.fetched)?void 0:t.auth)&&(0,a.jsx)("p",{children:p("prep.fetchAuth")}),(0,a.jsx)("div",{className:"row",children:(0,a.jsx)("button",{type:"button",onClick:()=>void F(!0),disabled:!!f,children:p("prep.retry")})}),j.fetchCommand&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{style:{marginTop:8},children:p("prep.ownTerminal")}),(0,a.jsx)("pre",{className:"sync-cmd",children:j.fetchCommand}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("button",{type:"button",onClick:()=>{var e;M(null!=(e=j.fetchCommand)?e:"")},children:p("prep.copyFetch")}),k&&(0,a.jsx)("span",{className:"badge done",children:p("prep.copied")}),(0,a.jsx)("button",{type:"button",onClick:()=>void F(!1),disabled:!!f,children:p("prep.useFetched")})]}),j.lastFetched&&(0,a.jsx)("p",{className:"muted",children:p("prep.lastFetched",{when:x(j.lastFetched)})})]})]}),(null==j?void 0:j.ok)&&(0,a.jsxs)("div",{className:"notice caution",style:{marginTop:8},children:[(0,a.jsx)("p",{children:p("prep.where",{target:null!=(i=j.target)?i:"",commit:C(j.targetCommit),branch:null!=(o=j.branch)?o:"HEAD",head:C(j.head)})}),!j.fetched&&(0,a.jsxs)("p",{className:"muted",children:[p("prep.notFetched")," ",j.lastFetched?p("prep.lastFetched",{when:x(j.lastFetched)}):p("prep.lastFetchedUnknown")]}),j.alreadyThere?(0,a.jsx)("p",{children:p("prep.already")}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("strong",{children:p("prep.willDo")}),(0,a.jsxs)("ol",{style:{margin:"4px 0",paddingLeft:20},children:[j.savedBranch&&(0,a.jsxs)("li",{children:[p("prep.keepChanges",{changed:j.changed.length,untracked:j.untracked.length,saved:j.savedBranch}),T([...j.changed,...j.untracked])]}),j.savedMainBranch&&(0,a.jsxs)("li",{children:[p("prep.keepMain",{n:j.mainOnlyCommits.length,branch:null!=(d=j.localBranch)?d:"",saved:j.savedMainBranch}),T(j.mainOnlyCommits)]}),(0,a.jsx)("li",{children:p("prep.moveTo",{branch:null!=(c=j.localBranch)?c:"",commit:C(j.targetCommit),target:null!=(m=j.target)?m:""})})]}),j.branchOnlyCommits.length>0&&j.branch&&(0,a.jsx)("p",{children:p("prep.branchStays",{branch:j.branch,n:j.branchOnlyCommits.length})}),(0,a.jsx)("p",{className:"muted",children:p("prep.ignored")}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("button",{type:"button",className:"primary",onClick:()=>void R(),disabled:!!f,children:p("prep.confirm")}),(0,a.jsx)("button",{type:"button",className:"quiet",onClick:()=>v(null),disabled:!!f,children:p("prep.cancel")})]})]})]})]})}}},e=>{e.O(0,[197,867,549,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:()=>{},1035:(e,t,n)=>{"use strict";n.d(t,{DialogHost:()=>d,Z:()=>c});var r=n(3365),a=n(1521),l=n(867),o=n(4969);let s=null,i=[];function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(n=>{var r;return r={kind:"confirm",message:e,...t,resolve:n},void(s?s(r):i.push(r))})}function d(e){var t,n;let{children:c}=e,{t:d}=(0,l.kj)(),[u,h]=(0,a.useState)([]),m=(0,a.useRef)(null),v=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(s=e=>h(t=>[...t,e]),i.length>0){let e=i.splice(0,i.length);h(t=>[...t,...e])}return()=>{s=null}},[]);let p=u[0],f=(0,a.useCallback)(e=>{p&&(p.resolve(e),h(e=>e.slice(1)))},[p]);return(0,o.V)(v,!!p,m),(0,a.useEffect)(()=>{if(!p)return;let e=e=>{"Escape"===e.key&&(e.preventDefault(),f(!1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[p,f]),(0,r.jsxs)(r.Fragment,{children:[c,p&&(0,r.jsx)("div",{className:"modal-backdrop",onClick:()=>f(!1),role:"presentation",children:(0,r.jsxs)("div",{ref:v,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,r.jsx)("h2",{id:"modal-title",children:null!=(t=p.title)?t:d("confirm"===p.kind?"dialog.confirmTitle":"dialog.noticeTitle")}),(0,r.jsx)("div",{id:"modal-body",className:"modal-body",children:p.message}),(0,r.jsxs)("div",{className:"row modal-actions",children:["confirm"===p.kind&&(0,r.jsx)("button",{type:"button",className:"quiet",onClick:()=>f(!1),children:d("dialog.cancel")}),(0,r.jsx)("button",{ref:m,type:"button",className:p.danger?"danger":"primary",onClick:()=>f(!0),children:null!=(n=p.okLabel)?n:d("dialog.ok")})]})]})})]})}},1702:(e,t,n)=>{"use strict";var r=n(9962);n.o(r,"usePathname")&&n.d(t,{usePathname:function(){return r.usePathname}}),n.o(r,"useSearchParams")&&n.d(t,{useSearchParams:function(){return r.useSearchParams}})},4969:(e,t,n)=>{"use strict";n.d(t,{V:()=>l});var r=n(1521);let a='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function l(e,t,n){(0,r.useEffect)(()=>{var r,l;if(!t)return;let o=document.activeElement instanceof HTMLElement?document.activeElement:null,s=e.current,i=null!=(l=null!=(r=null==n?void 0:n.current)?r:null==s?void 0:s.querySelector(a))?l:null;null==i||i.focus();let c=e=>{if("Tab"!==e.key||!s)return;let t=Array.from(s.querySelectorAll(a)).filter(e=>null!==e.offsetParent);if(0===t.length)return;let n=t[0],r=t[t.length-1],l=s.contains(document.activeElement);e.shiftKey&&(document.activeElement===n||!l)?(e.preventDefault(),r.focus()):e.shiftKey||document.activeElement!==r&&l||(e.preventDefault(),n.focus())};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c),o&&document.contains(o)&&o.focus()}},[e,t,n])}},5924:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,8197,23)),Promise.resolve().then(n.bind(n,6657)),Promise.resolve().then(n.bind(n,1035)),Promise.resolve().then(n.t.bind(n,952,23)),Promise.resolve().then(n.bind(n,8214)),Promise.resolve().then(n.bind(n,7712)),Promise.resolve().then(n.bind(n,8078)),Promise.resolve().then(n.bind(n,867))},6657:(e,t,n)=>{"use strict";n.d(t,{GlobalApprovals:()=>u});var r=n(3365),a=n(1521),l=n(8197),o=n.n(l),s=n(5549),i=n(867),c=n(1035),d=n(7527);function u(){let{t:e}=(0,i.kj)(),[t,n]=(0,a.useState)([]),[l,o]=(0,a.useState)({}),c=(0,a.useRef)({}),u=(0,a.useRef)(""),m=(0,a.useCallback)(async()=>{try{let e=await s.FH.approvals();n(e);let t=[...new Set(e.map(e=>e.sessionId).filter(e=>!(e in c.current)))],r=t.sort().join(",");if(t.length>0&&r!==u.current){for(let e of(u.current=r,await s.FH.sessions().catch(()=>[])))c.current[e.id]=e.name;o({...c.current})}}catch(e){}},[]);return((0,d.z)(m,2e3),(0,a.useEffect)(()=>{let n="copilot-operator";document.title=t.length>0?"(".concat(t.length,") ").concat(e("approval.tabTitle")," — ").concat(n):n},[t.length,e]),0===t.length)?null:(0,r.jsxs)("section",{className:"approval-banner",role:"alert","aria-live":"assertive",children:[(0,r.jsx)("h2",{children:e("approval.waitingHere")}),(0,r.jsx)("p",{className:"small",children:e("approval.waitingHereWhy")}),t.map(e=>{var t;return(0,r.jsx)(h,{approval:e,sessionName:null!=(t=l[e.sessionId])?t:e.sessionId,onDecided:()=>void m()},e.id)})]})}function h(e){let{approval:t,sessionName:n,onDecided:l}=e,{t:d}=(0,i.kj)(),u=(0,i.W3)(),[h,m]=(0,a.useState)(!1),[v,p]=(0,a.useState)(""),f=(0,a.useRef)(!1),k=async e=>{if(!f.current&&("run-all"!==e||await (0,c.Z)(d("approval.runAllConfirm")))){f.current=!0,m(!0),p("");try{await s.FH.decide(t.id,e)}catch(e){p(e.message)}finally{f.current=!1,m(!1),l()}}};return(0,r.jsxs)("div",{className:"approval",children:[(0,r.jsxs)("div",{className:"row",children:[(0,r.jsx)("strong",{children:d("approval.title",{n:t.stepId})}),(0,r.jsx)(o(),{href:(0,s.aT)(t.sessionId),children:n}),(0,r.jsx)("span",{className:"muted small",children:u(t.createdAt)})]}),(0,r.jsx)("pre",{style:{margin:"8px 0"},children:t.description}),t.network&&(0,r.jsx)("p",{className:"reason small",children:d("approval.network")}),v&&(0,r.jsx)("p",{className:"err",role:"alert",children:v}),(0,r.jsxs)("div",{className:"row",children:[(0,r.jsx)("button",{className:"primary",disabled:h,onClick:()=>void k("run"),children:d("approval.run")}),!t.network&&(0,r.jsx)("button",{disabled:h,onClick:()=>void k("run-all"),title:d("approval.runAllWhy"),children:d("approval.runAll")}),(0,r.jsx)("button",{disabled:h,onClick:()=>void k("skip"),children:d("approval.skip")}),(0,r.jsx)("button",{className:"danger",disabled:h,onClick:()=>void k("abort"),children:d("approval.abort")})]})]})}},7527:(e,t,n)=>{"use strict";n.d(t,{z:()=>a});var r=n(1521);function a(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=(0,r.useRef)(e);a.current=e,(0,r.useEffect)(()=>{let e;if(!n)return;let r=!1,l=async()=>{try{await a.current()}catch(e){}finally{r||(e=setTimeout(()=>void l(),t))}};return l(),()=>{r=!0,e&&clearTimeout(e)}},[t,n])}},7712:(e,t,n)=>{"use strict";n.d(t,{ScrollJump:()=>o});var r=n(3365),a=n(1521),l=n(867);function o(){let{t:e}=(0,l.kj)(),[t,n]=(0,a.useState)({long:!1,atTop:!0,atBottom:!1});return((0,a.useEffect)(()=>{let e=()=>{let e=document.documentElement;n({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,r.jsxs)("div",{className:"scroll-jump",children:[!t.atTop&&(0,r.jsx)("button",{type:"button","aria-label":e("scroll.top"),title:e("scroll.top"),onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:"↑"}),!t.atBottom&&(0,r.jsx)("button",{type:"button","aria-label":e("scroll.bottom"),title:e("scroll.bottom"),onClick:()=>window.scrollTo({top:document.documentElement.scrollHeight,behavior:"smooth"}),children:"↓"})]}):null}},8078:(e,t,n)=>{"use strict";n.d(t,{AppearanceProvider:()=>d,KP:()=>u});var r=n(3365),a=n(1521);let l="cop.appearance",o=["small","normal","large","huge","giant"];"\n(function () {\n try {\n var d = document.documentElement;\n var raw = localStorage.getItem('".concat(l,"');\n var a = raw ? JSON.parse(raw) : {};\n if (!a || typeof a !== 'object') a = {};\n d.dataset.theme = a.theme === 'dark' ? 'dark' : 'light';\n d.dataset.textsize = ").concat(JSON.stringify(o),".indexOf(a.textSize) >= 0 ? a.textSize : 'normal';\n d.dataset.contrast = a.highContrast ? 'high' : 'normal';\n d.dataset.motion = a.reduceMotion ? 'reduced' : 'normal';\n d.dataset.links = a.underlineLinks ? 'underline' : 'plain';\n d.dataset.focus = a.strongFocus ? 'strong' : 'normal';\n } catch (e) {}\n})();\n");let s={theme:"light",textSize:"normal",highContrast:!1,reduceMotion:!1,underlineLinks:!1,strongFocus:!1};function i(e){let t=document.documentElement;t.dataset.theme=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"}let c=(0,a.createContext)({appearance:s,set:()=>void 0,reset:()=>void 0,loaded:!1});function d(e){let{children:t}=e,[n,d]=(0,a.useState)(s),[u,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=s;try{let t=window.localStorage.getItem(l);t?e=function(e){let t=e&&"object"==typeof e?e:{},n=(e,t)=>"boolean"==typeof e?e:t;return{theme:"dark"===t.theme?"dark":"light"===t.theme?"light":s.theme,textSize:o.includes(t.textSize)?t.textSize:s.textSize,highContrast:n(t.highContrast,s.highContrast),reduceMotion:n(t.reduceMotion,s.reduceMotion),underlineLinks:n(t.underlineLinks,s.underlineLinks),strongFocus:n(t.strongFocus,s.strongFocus)}}(JSON.parse(t)):window.matchMedia("(prefers-color-scheme: dark)").matches&&(e={...e,theme:"dark"}),window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!t&&(e={...e,reduceMotion:!0})}catch(e){}d(e),i(e),h(!0)},[]);let m=(0,a.useCallback)(e=>{d(t=>{let n={...t,...e};i(n);try{window.localStorage.setItem(l,JSON.stringify(n))}catch(e){}return n})},[]),v=(0,a.useCallback)(()=>{d(s),i(s);try{window.localStorage.removeItem(l)}catch(e){}},[]);return(0,r.jsx)(c.Provider,{value:{appearance:n,set:m,reset:v,loaded:u},children:t})}function u(){return(0,a.useContext)(c)}},8214:(e,t,n)=>{"use strict";n.d(t,{Nav:()=>v,SkipLink:()=>m});var r=n(3365),a=n(1521),l=n(8197),o=n.n(l),s=n(1702),i=n(5549),c=n(7527),d=n(867);let u={sessions:(0,r.jsx)("path",{d:"M4 5h16v4H4zM4 11h16v4H4zM4 17h10v2H4z"}),defaults:(0,r.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"}),import:(0,r.jsx)("path",{d:"M12 3v10m0 0 4-4m-4 4-4-4M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),history:(0,r.jsx)("path",{d:"M12 3a9 9 0 1 0 8.5 6M12 7v5l3 2M3 4v5h5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),level1:(0,r.jsx)("path",{d:"M6 3h9l5 5v13H6zM14 3v6h6M9 13h7M9 17h7",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),presets:(0,r.jsx)("path",{d:"M5 4h14v4H5zM5 10h14v4H5zM5 16h9v4H5z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"}),appearance:(0,r.jsx)("path",{d:"M12 3a9 9 0 0 0 0 18c1.5 0 2-1 2-2s-1-1.5-1-2.5S14 15 15.5 15H17a4 4 0 0 0 4-4 8 8 0 0 0-9-8zM8 9a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm4 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"}),system:(0,r.jsx)("path",{d:"M4 5h16v10H4zM2 19h20M9 15v4M15 15v4",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round"})},h=[{href:"/",label:"nav.sessions",icon:"sessions"},{href:"/defaults",label:"nav.defaults",icon:"defaults"},{href:"/import",label:"nav.import",icon:"import"},{href:"/history",label:"nav.history",icon:"history"},{href:"/level1",label:"nav.level1",icon:"level1"},{href:"/presets",label:"nav.presets",icon:"presets"},{href:"/appearance",label:"nav.appearance",icon:"appearance"},{href:"/system",label:"nav.system",icon:"system"}];function m(){let{t:e}=(0,d.kj)();return(0,r.jsx)("a",{className:"skip-link",href:"#main",children:e("a11y.skip")})}function v(){let{t:e}=(0,d.kj)(),t=(0,s.usePathname)(),n=function(){let[e,t]=(0,a.useState)(0);return(0,c.z)(()=>i.FH.activity().then(e=>t(e.sessions)).catch(()=>void 0),4e3),e}();return(0,r.jsxs)("nav",{"aria-label":e("nav.label"),children:[h.map(a=>(0,r.jsxs)(o(),{href:a.href,"aria-current":t===a.href?"page":void 0,children:[(0,r.jsx)("svg",{className:"nav-icon",viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor","aria-hidden":"true",children:u[a.icon]}),(0,r.jsx)("span",{children:e(a.label)}),"/history"===a.href&&n>0&&(0,r.jsxs)("span",{className:"live",title:e("nav.liveTitle",{n:n}),children:[(0,r.jsx)("span",{className:"dot","aria-hidden":"true"}),e("nav.live")]})]},a.href)),(0,r.jsx)(d.c5,{})]})}}},e=>{e.O(0,[353,197,867,549,347,131,358],()=>e(e.s=5924)),_N_E=e.O()}]);
|
/package/dist/web/_next/static/{pfa56tOBq6o-WBQZnyUn2 → rWkIIFdTKzD4fL0Pe-y-9}/_buildManifest.js
RENAMED
|
File without changes
|
/package/dist/web/_next/static/{pfa56tOBq6o-WBQZnyUn2 → rWkIIFdTKzD4fL0Pe-y-9}/_ssgManifest.js
RENAMED
|
File without changes
|