conductor-remote 1.131.4 → 1.131.5
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/assets/{AutoModelSettings-SBdRr_mv.js → AutoModelSettings-CFlOKb1W.js} +1 -1
- package/dist/assets/{PierrePatch-BmY2b7Ei.js → PierrePatch-BExA4mpZ.js} +1 -1
- package/dist/assets/{index-BAEVNqQy.js → index-D7ZV7qS_.js} +4 -4
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/dist-node/scripts/service/commands.js +2 -2
- package/dist-node/scripts/service/flags.js +8 -0
- package/dist-node/scripts/service/installation.js +53 -3
- package/dist-node/scripts/service/launch-agent.js +14 -0
- package/dist-node/scripts/service.js +1 -1
- package/dist-node/src/host/ports.js +82 -0
- package/dist-node/src/server.js +16 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as C,a as w,b as A,r as u,c as M,j as s,X as R,R as p,d as g,e as S}from"./index-
|
|
1
|
+
import{u as C,a as w,b as A,r as u,c as M,j as s,X as R,R as p,d as g,e as S}from"./index-D7ZV7qS_.js";const r="w-full rounded-xl border border-border bg-bg px-3 py-2 text-base outline-none focus:border-accent/60";function $({onClose:m}){const n=C(),j=w(),v=A(),[N,a]=u.useState(),[i,x]=u.useState(!1),[f,h]=u.useState(),t=N??n.data?.config,c=j.data?.groups??[],d=[...new Set(c.flatMap(e=>e.models))],y=d.filter(e=>/^(?:GPT-)?\d[\d.]*(?: (?:Luna|Terra|Sol|Astra))?$/.test(e)||/^opencode(?:-go)?\/muse-spark-[a-z0-9.-]+-contributor(?:-free)?$/.test(e)),k=async()=>{if(!(!t||i)){x(!0),h(void 0);try{const e=await S.updateAutoModelConfig(t);v.setQueryData(["auto-model-config"],e),m()}catch(e){h(e instanceof Error?e.message:"Could not save Auto settings.")}finally{x(!1)}}},b=e=>({model:e.model,effort:e.effort,fast:e.fast});return M.createPortal(s.jsxs("div",{className:"fixed inset-0 z-[70] flex flex-col bg-bg",role:"dialog","aria-modal":"true","aria-label":"Auto model settings",children:[s.jsxs("header",{className:"pt-safe flex items-center gap-3 border-b border-border p-3",children:[s.jsx("span",{className:"flex-1 font-semibold",children:"Auto models"}),s.jsx("button",{type:"button",onClick:()=>{k()},disabled:!t||i,className:"ctl text-accent",children:i?"Saving…":"Save"}),s.jsx("button",{type:"button",onClick:m,"aria-label":"Close Auto settings",className:"ctl",children:s.jsx(R,{size:18})})]}),s.jsxs("div",{className:"mx-auto flex w-full max-w-2xl flex-1 flex-col gap-4 overflow-y-auto p-4 pb-safe",children:[s.jsx("p",{className:"text-sm text-muted",children:"Auto reads your first message and attachments, then selects a model once. You can change the model afterward."}),f||n.isError?s.jsx("p",{className:"text-sm text-del",children:f??"Could not load Auto settings."}):null,t?s.jsxs(s.Fragment,{children:[s.jsxs("label",{className:"flex items-center gap-3 text-sm",children:[s.jsx("input",{type:"checkbox",checked:t.defaultAuto,onChange:e=>a({...t,defaultAuto:e.target.checked})}),"Use Auto by default for new workspaces and chats"]}),s.jsx(p,{name:"Router",role:t.router,models:y,invalid:g(t.router,c),onChange:e=>a({...t,router:b(e)}),canRemove:!1,onRemove:()=>{},showPreamble:!1}),s.jsx("p",{className:"text-xs text-muted",children:"Luna is the initial router. Muse Spark’s free and contributor options remain separate choices."}),t.profiles.map(e=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(p,{name:e.id,role:e,models:d,invalid:g(e,c),onChange:l=>a({...t,profiles:t.profiles.map(o=>o.id===e.id?{...o,...b(l)}:o)}),canRemove:t.profiles.length>1&&e.id!==t.fallback,showPreamble:!1,onRemove:()=>a({...t,profiles:t.profiles.filter(l=>l.id!==e.id)})}),s.jsxs("label",{className:"block text-xs text-muted",children:["When to use ",e.id,s.jsx("textarea",{className:`${r} mt-1`,rows:2,maxLength:1e3,value:e.description,onChange:l=>a({...t,profiles:t.profiles.map(o=>o.id===e.id?{...o,description:l.target.value}:o)})})]})]},e.id)),s.jsx("button",{type:"button",className:"ctl self-start",disabled:t.profiles.length>=16,onClick:()=>{let e=1;for(;t.profiles.some(l=>l.id===`profile${e}`);)e++;a({...t,profiles:[...t.profiles,{id:`profile${e}`,model:d[0]??"",description:"Describe the tasks this profile should handle."}]})},children:"Add profile"}),s.jsxs("label",{className:"block text-sm",children:["Fallback profile",s.jsx("select",{className:`${r} mt-1`,value:t.fallback,onChange:e=>a({...t,fallback:e.target.value}),children:t.profiles.map(e=>s.jsxs("option",{value:e.id,children:[e.id," · ",e.model]},e.id))})]}),s.jsx("p",{className:"text-xs text-muted",children:"Used when the router times out, returns an invalid choice, or lacks essential context."}),s.jsxs("label",{className:"block text-sm",children:["Routing rules",s.jsx("textarea",{className:`${r} mt-1`,rows:8,maxLength:12e3,value:t.rules,onChange:e=>a({...t,rules:e.target.value})})]}),s.jsxs("label",{className:"block text-sm",children:["Maximum selection time (seconds)",s.jsx("input",{className:`${r} mt-1`,type:"number",min:2,max:30,value:t.timeoutMs/1e3,onChange:e=>a({...t,timeoutMs:Number(e.target.value)*1e3})})]})]}):n.isLoading?s.jsx("p",{className:"text-muted",children:"Loading…"}):null]})]}),document.body)}export{$ as AutoModelSettings};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/diff-syntax/cpp-DddhVWhK.js","assets/diff-syntax/c-BIGW1oBm.js","assets/diff-syntax/html-pp8916En.js","assets/diff-syntax/javascript-wDzz0qaB.js","assets/diff-syntax/css-CLj8gQPS.js","assets/diff-syntax/php-Csjmro_R.js","assets/diff-syntax/xml-sdJ4AIDG.js","assets/diff-syntax/java-CylS5w8V.js","assets/diff-syntax/sql-CRqJ_cUM.js","assets/diff-syntax/json-Cp-IABpG.js","assets/diff-syntax/ruby-C-9S-GLb.js","assets/diff-syntax/typescript-BPQ3VLAy.js","assets/diff-syntax/jsx-g9-lgVsj.js","assets/diff-syntax/tsx-COt5Ahok.js","assets/diff-syntax/zsh-Yzrsuije.js","assets/diff-syntax/yml-DbVfSbck.js","assets/diff-syntax/scss-D5BDwBP9.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{w as er,s as Xs,f as Ba,g as Ga,h as za,i as gr,k as ja,_ as D,r as Q,j,p as Wa,l as Va}from"./index-
|
|
2
|
+
import{w as er,s as Xs,f as Ba,g as Ga,h as za,i as gr,k as ja,_ as D,r as Q,j,p as Wa,l as Va}from"./index-D7ZV7qS_.js";const mr={}.hasOwnProperty;function qa(e,t){const n=t||{};function i(r,...s){let o=i.invalid;const l=i.handlers;if(r&&mr.call(r,e)){const a=String(r[e]);o=mr.call(l,a)?l[a]:i.unknown}if(o)return o.call(this,r,...s)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}const Ys="diffs-container";(()=>{try{return!1}catch{return!1}})();const Ka=/(?=^From [a-f0-9]+ .+$)/m,Qs=/(?=^diff --git)/gm,Xa=new RegExp("(?<=\\n)"),Ya=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Qa=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Za=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Ja=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Zs="header-prefix",Js="header-filename-suffix",eo="header-metadata",tr="header-custom",le={dark:"pierre-dark",light:"pierre-light"},el="data-theme-css",tl="data-unsafe-css",nl="data-diffs-scrollbar-measure",to="--diffs-scrollbar-gutter-measured",il=1e5,rl={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},sl=Object.freeze({fromStart:0,fromEnd:0}),br={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},ol={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},gt=new Set;let mt=null;function no(e){gt.add(e),mt??=requestAnimationFrame(io)}function Ci(e){gt.delete(e)&>.size===0&&mt!=null&&(cancelAnimationFrame(mt),mt=null)}function io(e){const t=new Set(gt);gt.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}gt.size>0?mt=requestAnimationFrame(io):mt=null}function Si(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),s=new Set(Object.keys(t));for(const o of r)if(s.delete(o),!i.has(o)&&(!(o in t)||e[o]!==t[o]))return!1;for(const o of Array.from(s))if(!i.has(o))return!1;return!0}function nr(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function ro(e,t){const n=e?.theme??le,i=t?.theme??le,r=vr(e),s=vr(t);return nr(n,i)&&Si(e,t,["theme","parseDiffOptions"])&&Si(r,s)}function vr(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function wi(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Pe(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}const al=new TextEncoder,ll=new TextDecoder("utf-8",{ignoreBOM:!0}),dl=/[\uD800-\uDFFF]/,xi=1024;let ft=new Uint8Array(xi);function so(){ft.length!==xi&&(ft=new Uint8Array(xi))}function W(e){if(e.length===0)return e;if(dl.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;ft.length<t&&(ft=new Uint8Array(t));const{written:n}=al.encodeInto(e,ft);return ll.decode(ft.subarray(0,n))}function Se(e,t){return e-(t===0?0:1)}function ie(e,t){return Se(e,t)+t}const cl=4096,ul=.5;function hl(e){for(const t of e.hunks){for(let n=0;n<t.hunkContent.length;n++){const i=t.hunkContent[n];if(i.type!=="change")continue;const r=pl(e,i);r!=null&&(t.hunkContent.splice(n,1,...r),n+=r.length-1)}fl(t,e)}}function fl(e,t){const{hunkContent:n}=e;for(let i=1;i<n.length;i++){const r=n[i],s=n[i-1];if(r.type!=="change"||r.additions>0&&r.deletions>0||s.type!=="context")continue;const o=r.additions>0,l=o?t.additionLines:t.deletionLines,a=o?r.additionLineIndex:r.deletionLineIndex,d=o?r.additions:r.deletions,c=l[a]??"";if(c.trim()!=="")continue;let u=!0;for(let v=1;v<d;v++)if(l[a+v]!==c){u=!1;break}if(!u)continue;let h=0;for(;h<s.lines&&t.additionLines[s.additionLineIndex+s.lines-1-h]===c;)h++;if(h===0||i===1&&h===s.lines)continue;r.additionLineIndex-=h,r.deletionLineIndex-=h;const f=r.additionLineIndex+r.additions,p=r.deletionLineIndex+r.deletions,g=n[i+1];g?.type==="context"?(g.lines+=h,g.additionLineIndex=f,g.deletionLineIndex=p):n.splice(i+1,0,{type:"context",lines:h,additionLineIndex:f,deletionLineIndex:p}),s.lines-=h,s.lines===0&&(n.splice(i-1,1),i--)}}function pl(e,t){const{deletions:n,additions:i,deletionLineIndex:r,additionLineIndex:s}=t,o=Math.min(n,i),l=Math.abs(i-n);if(o===0||l===0||o*(l+1)>cl)return null;const a=[];for(let g=0;g<n;g++)a.push(yr(e.deletionLines[r+g]??""));const d=[];for(let g=0;g<i;g++)d.push(yr(e.additionLines[s+g]??""));const c=i>n;let u=0,h=-1;for(let g=0;g<=l;g++){let v=0;for(let m=0;m<o;m++)v+=ml(a[m+(c?0:g)],d[m+(c?g:0)]);g===0?h=v+o*ul:v>h&&(h=v,u=g)}if(u===0)return null;const f=[],p=(g,v,m,b)=>{(g>0||v>0)&&f.push({type:"change",deletions:g,additions:v,deletionLineIndex:m,additionLineIndex:b})};return c?(p(0,u,r,s),p(o,o,r,s+u),p(0,i-o-u,r+o,s+u+o)):(p(u,0,r,s),p(o,o,r+u,s),p(n-o-u,0,r+u+o,s+o)),f}const gl=/\s+/g;function yr(e){return e.replace(gl,"")}function ml(e,t){if(e===t)return 1;const n=Math.max(e.length,t.length),i=Math.min(e.length,t.length);if(i===0)return 0;let r=0;for(;r<i&&e[r]===t[r];)r++;let s=0;for(;s<i-r&&e[e.length-1-s]===t[t.length-1-s];)s++;return(r+s)/n}function bl(e,t,n){try{return vl(e,t,n)}finally{so()}}function vl(e,t,n=!1){const i=_l(e),r=i?wl(e):xl(e);let s;const o=[];for(const l of r){if(i&&!Qs.test(l)){if(s==null)s=W(l);else{if(n)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",l)}continue}else if(!i&&!kl(l)){if(s==null)s=W(l);else{if(n)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",l)}continue}const a=oo(l,{cacheKey:void 0,isGitDiff:i,throwOnError:n});a!=null&&o.push(a)}return{patchMetadata:s,files:o}}function yl(e,t){try{return oo(e,t)}finally{so()}}function oo(e,{cacheKey:t,isGitDiff:n=Qs.test(e),oldFile:i,newFile:r,throwOnError:s=!1}={}){let o=0;const l=uo(e,"@@ ");let a;const d=i==null||r==null;let c=0,u=0;for(const h of l){const f=ao(h),p=f[0];if(p==null){if(s)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",h);continue}const g=co(p);let v=0,m=0;if(g==null||a==null){if(a!=null){if(s)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",h);continue}a={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:d,additionLines:!d&&i!=null&&r!=null?Cr(r.contents):[],deletionLines:!d&&i!=null&&r!=null?Cr(i.contents):[],cacheKey:xr(t)},a.additionLines.length===1&&r?.contents===""&&(a.additionLines.length=0),a.deletionLines.length===1&&i?.contents===""&&(a.deletionLines.length=0);for(const k of f){if(k.startsWith("diff --git")){const F=k.trim().match(Za),L=F?.[1]??F?.[2],A=F?.[3]??F?.[4];if(L==null||A==null){if(s)throw Error("parsePatchContent: invalid git diff header");console.error("parsePatchContent: invalid git diff header",k);continue}a.name=W(A.trim()),L!==A&&(a.prevName=W(L.trim()));continue}const _=k.startsWith("---")||k.startsWith("+++")?k.match(n?Qa:Ya):null;if(_!=null){const[,F,L]=_;if(F==="---"&&L!=="/dev/null"){const A=W(L.trim());a.prevName=A,a.name=A}else F==="+++"&&L!=="/dev/null"&&(a.name=W(L.trim()))}else if(n){if(k.startsWith("new mode ")&&(a.mode=W(k.slice(8).trim())),k.startsWith("old mode ")&&(a.prevMode=W(k.slice(8).trim())),k.startsWith("new file mode")&&(a.type="new",a.mode=W(k.slice(13).trim())),k.startsWith("deleted file mode")&&(a.type="deleted",a.mode=W(k.slice(17).trim())),k.startsWith("similarity index")&&(k.startsWith("similarity index 100%")?a.type="rename-pure":a.type="rename-changed"),k.startsWith("index ")){const[,F,L,A]=k.trim().match(Ja)??[];F!=null&&(a.prevObjectId=W(F)),L!=null&&(a.newObjectId=W(L)),A!=null&&(a.mode=W(A))}k.startsWith("rename from ")&&(a.prevName=W(k.slice(12).trim())),k.startsWith("rename to ")&&(a.name=W(k.slice(10).trim()))}}continue}let b,y;for(;f.length>0&&(f[f.length-1]===`
|
|
3
3
|
`||f[f.length-1]==="\r"||f[f.length-1]===`\r
|
|
4
4
|
`||f[f.length-1]==="");)f.pop();const{additionStart:S,deletionStart:C}=g;c=d?c:C-1,u=d?u:S-1;const w={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:g.additionCount,additionStart:S,additionLines:v,deletionCount:g.deletionCount,deletionStart:C,deletionLines:m,deletionLineIndex:c,additionLineIndex:u,hunkContent:[],hunkContext:xr(g.hunkContext),hunkSpecs:W(p),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let x=0,E=0;for(let k=1;k<f.length;k++){const _=f[k];if(x>=w.additionCount&&E>=w.deletionCount&&!_.startsWith("\\")){if(s&&Ll(_)&&!El(_))throw Error("parsePatchContent: hunk has more lines than expected");break}const F=_[0];if(F!=="+"&&F!=="-"&&F!==" "&&F!=="\\"){if(s)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${F}", full line: "${_}"`),console.error("processFile: invalid rawLine:",_);continue}const L=Rl(F);if(L==="addition"){if(s&&x>=w.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const A=jn(_);(b==null||b.type!=="change")&&(b=Wn("change",c,u),w.hunkContent.push(b)),u++,x++,d&&a.additionLines.push(A),b.additions++,v++,y="addition"}else if(L==="deletion"){if(s&&E>=w.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const A=jn(_);(b==null||b.type!=="change")&&(b=Wn("change",c,u),w.hunkContent.push(b)),c++,E++,d&&a.deletionLines.push(A),b.deletions++,m++,y="deletion"}else if(L==="context"){if(s&&(E>=w.deletionCount||x>=w.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const A=jn(_);(b==null||b.type!=="context")&&(b=Wn("context",c,u),w.hunkContent.push(b)),u++,c++,x++,E++,d&&(a.deletionLines.push(A),a.additionLines.push(A)),b.lines++,y="context"}else if(L==="metadata"&&b!=null){if(b.type==="context"?(w.noEOFCRAdditions=!0,w.noEOFCRDeletions=!0):y==="deletion"?w.noEOFCRDeletions=!0:y==="addition"&&(w.noEOFCRAdditions=!0),d&&(y==="addition"||y==="context")){const A=a.additionLines.length-1;A>=0&&(a.additionLines[A]=Pe(a.additionLines[A]))}if(d&&(y==="deletion"||y==="context")){const A=a.deletionLines.length-1;A>=0&&(a.deletionLines[A]=Pe(a.deletionLines[A]))}}}if(s&&(x!==w.additionCount||E!==w.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");w.additionLines=v,w.deletionLines=m,w.collapsedBefore=Math.max(Se(w.additionStart,w.additionCount)-o,0),a.hunks.push(w),o=ie(w.additionStart,w.additionCount);for(const k of w.hunkContent)k.type==="context"?(w.splitLineCount+=k.lines,w.unifiedLineCount+=k.lines):(w.splitLineCount+=Math.max(k.additions,k.deletions),w.unifiedLineCount+=k.deletions+k.additions);w.splitLineStart=a.splitLineCount+w.collapsedBefore,w.unifiedLineStart=a.unifiedLineCount+w.collapsedBefore,a.splitLineCount+=w.collapsedBefore+w.splitLineCount,a.unifiedLineCount+=w.collapsedBefore+w.unifiedLineCount}if(a!=null){if(s&&d&&!n&&a.hunks.length===0)throw Error("parsePatchContent: unified file has no hunks");if(a.hunks.length>0&&!d&&a.additionLines.length>0&&a.deletionLines.length>0){const h=a.hunks[a.hunks.length-1],f=ie(h.additionStart,h.additionCount),p=a.additionLines.length,g=Math.max(p-f,0);a.splitLineCount+=g,a.unifiedLineCount+=g}return n||(a.prevName!=null&&a.name!==a.prevName?a.hunks.length>0?a.type="rename-changed":a.type="rename-pure":(i==null||i.contents==="")&&r!=null&&r.contents!==""?a.type="new":i!=null&&i.contents!==""&&(r==null||r.contents==="")&&(a.type="deleted")),a.type!=="rename-pure"&&a.type!=="rename-changed"&&(a.prevName=void 0),hl(a),a}}function Cl(e,t,n=!1){const i=[],r=Sl(e)?e.split(Ka):[e];for(const s of r)try{i.push(bl(s,t!=null?`${t}-${i.length}`:void 0,n))}catch(o){if(n)throw o;console.error(o)}return i}function Sl(e){return e.startsWith("From ")||e.includes(`
|
|
5
5
|
From `)}function Cr(e){const t=ao(e);for(let n=0;n<t.length;n++)t[n]=W(t[n]);return t}function ao(e){if(e.length===0)return[""];const t=[];let n=0;for(;;){const i=e.indexOf(`
|