local-operator-ui 0.52.9 → 0.52.10
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/out/main/index.js +128 -0
- package/out/renderer/assets/{_basePickBy-BG2VhiIr.js → _basePickBy-DfU-0OMa.js} +1 -1
- package/out/renderer/assets/{_baseUniq-G4ujmd2X.js → _baseUniq-Cf60T05n.js} +1 -1
- package/out/renderer/assets/{agent-details-page-CGBPck3M.js → agent-details-page-DupNgrsR.js} +1 -1
- package/out/renderer/assets/{agent-hub-page-oNcQi-BL.js → agent-hub-page-DleDc1gI.js} +1 -1
- package/out/renderer/assets/{agents-page-BM9GCJql.js → agents-page-BkyCjnFQ.js} +3 -3
- package/out/renderer/assets/{appearance-B-Sdp9IA.js → appearance-DZQCtGzt.js} +1 -1
- package/out/renderer/assets/{approvalsOverlay-CT-lsZQd.js → approvalsOverlay-ArPhFGMQ.js} +1 -1
- package/out/renderer/assets/{arc-BN6jtH3A.js → arc-fEAyQagZ.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-DsuIeLu0.js → architectureDiagram-IEHRJDOE-DjOxdPIv.js} +1 -1
- package/out/renderer/assets/{avatar-cropper-DlNZ1v12.js → avatar-cropper-D16ksP5n.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-DJvSMoVj.js → blockDiagram-JOT3LUYC-5-oQe6Hg.js} +1 -1
- package/out/renderer/assets/{book-open-Cp8uKo-d.js → book-open-Cc4Qb21L.js} +1 -1
- package/out/renderer/assets/browser-page-CheY_71A.js +1 -0
- package/out/renderer/assets/{browser-webauthn-prompt-CHryNF4a.js → browser-webauthn-prompt-Dc9AqNJW.js} +1 -1
- package/out/renderer/assets/{building-2-DjXAKQ-_.js → building-2-DnSBO_7V.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-BxuD4dqm.js → c4Diagram-VJAJSXHY-BIOwqCdp.js} +1 -1
- package/out/renderer/assets/channel-CAbqKi5K.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-B-9ZkOo4.js → chunk-4BMEZGHF-DM74xdpX.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-DYX_2Wnw.js → chunk-A2AXSNBT-DTDoq5W_.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-Bt8NwGtc.js → chunk-AEK57VVT-CxtPWm0S.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-Cgk8iMci.js → chunk-D6G4REZN-Bjwgn7JA.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-BjDeLAwH.js → chunk-RZ5BOZE2-Cz1t_ff3.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-PPlj1JKr.js → chunk-XZIHB7SX-Cx2f2oFX.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-fQHFRQre.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-fQHFRQre.js +1 -0
- package/out/renderer/assets/clone-lH5iTXYN.js +1 -0
- package/out/renderer/assets/{console-mirror-Icddfzc5.js → console-mirror-Be1UXdZX.js} +1 -1
- package/out/renderer/assets/{consoleCapture-D0hv_YWG.js → consoleCapture-owojwcFe.js} +1 -1
- package/out/renderer/assets/{conversation-input-sync-D9Xccwx1.js → conversation-input-sync-59C2VH9z.js} +4 -4
- package/out/renderer/assets/{dagre-OKDRZEBW-YoenwJF-.js → dagre-OKDRZEBW-CRWH_RFn.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-BxRRTg9E.js → diagram-SSKATNLV-BvXHb9nV.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-CwmxlyUn.js → diagram-VNBRO52H-BYVbLF6o.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-10_uYtjI.js → erDiagram-Q7BY3M3F-3BFtmsTF.js} +1 -1
- package/out/renderer/assets/{error-boundary-DfFcgZm0.js → error-boundary--DgTWGAQ.js} +1 -1
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-BIi6hVks.js → flowDiagram-4HSFHLVR-CtwFLhwt.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-D_OgK0jY.js → ganttDiagram-APWFNJXF-BcQzDi4k.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-DL22eEyk.js → gitGraphDiagram-7IBYFJ6S-Rdn1bGJ0.js} +1 -1
- package/out/renderer/assets/{graph-BD4wR-0f.js → graph-zJQyU8lA.js} +1 -1
- package/out/renderer/assets/{heart-bD3ezZjX.js → heart-K9BBaPRd.js} +1 -1
- package/out/renderer/assets/{index-CSQMTsGZ.js → index-BK8yBNNa.js} +1 -1
- package/out/renderer/assets/{index-zeRfNJaS.js → index-CCtgdHHn.js} +3 -3
- package/out/renderer/assets/{index-CVc_oCb8.js → index-DGMX2k_z.js} +1 -1
- package/out/renderer/assets/{index-C5MuLj2j.js → index-IJLdoh2_.js} +1 -1
- package/out/renderer/assets/infoDiagram-PH2N3AL5-BLrJMgnv.js +2 -0
- package/out/renderer/assets/{installer-Ddkg6-C5.js → installer-BqIFRN1B.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-ClJJE5-O.js → journeyDiagram-U35MCT3I-B69MjoFr.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-Vmh-ffzp.js → kanban-definition-NDS4AKOZ-C2cZYJGg.js} +1 -1
- package/out/renderer/assets/{layout-viZOtHI3.js → layout-DqdvdvIz.js} +1 -1
- package/out/renderer/assets/legacy-agents-page-Jrwbxc_A.js +33 -0
- package/out/renderer/assets/{library-page-d7jnJ1cM.js → library-page-BBZOeMKB.js} +3 -3
- package/out/renderer/assets/{log-in-DRqGQiMM.js → log-in-BguF0cMT.js} +1 -1
- package/out/renderer/assets/{mermaid.core-ZnA0Lmkj.js → mermaid.core-C74Lu-Og.js} +5 -5
- package/out/renderer/assets/{mesh-page-C972n1XX.js → mesh-page-BGVCExVu.js} +1 -1
- package/out/renderer/assets/{messages-BdH-KMeX.js → messages-CqvhgjgC.js} +8 -8
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-oyMq2Ffx.js → mindmap-definition-ALO5MXBD-Pua25oeD.js} +1 -1
- package/out/renderer/assets/{mini-XTqXeT0x.js → mini-CnOyRuzB.js} +1 -1
- package/out/renderer/assets/{notebook-pen-CgBQhdFa.js → notebook-pen-CYYzWKVu.js} +1 -1
- package/out/renderer/assets/{notifications-page-C0pIdEuW.js → notifications-page-BaGZSA3o.js} +1 -1
- package/out/renderer/assets/{org-access-D_YDOtGr.js → org-access-BsT6ienF.js} +1 -1
- package/out/renderer/assets/{org-surface-gate-BRBzEvbn.js → org-surface-gate-Bp50tkVp.js} +1 -1
- package/out/renderer/assets/{page-header-Bz2lz4LI.js → page-header-CrTly4cs.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-CJ7Aytd-.js → pieDiagram-IB7DONF6-B7O0-XBp.js} +1 -1
- package/out/renderer/assets/{project-markdown-DYciqMBs.js → project-markdown-BRlfZTkB.js} +1 -1
- package/out/renderer/assets/{projects-page-JmH0vUnI.js → projects-page-BK4_RzG1.js} +1 -1
- package/out/renderer/assets/{publication-validation-quCeNj-v.js → publication-validation-BsdGPymf.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-CLPvPjaT.js → quadrantDiagram-7GDLP6J5-2u8wfxzO.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-Dl4nMpzG.js → radar-MK3ICKWK-ZmHcgFsG.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-DKI9Bh07.js → radient-auth-buttons-VAvFX8bW.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-B3VtoeFm.js → requirementDiagram-KVF5MWMF-SBJAktgj.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-D0ll6mUD.js → sankeyDiagram-QLVOVGJD-DlJYg7ak.js} +1 -1
- package/out/renderer/assets/{schedules-page-Bj-EKraP.js → schedules-page-B0RhZ3B2.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-DI1TMyGm.js → sequenceDiagram-X6HHIX6F-CdvZLNtu.js} +1 -1
- package/out/renderer/assets/{settings-page-DTjdJ7Xe.js → settings-page-C_Ui4Qu2.js} +1 -1
- package/out/renderer/assets/{smartart-89hlq0Z-.js → smartart-Bp-6frEa.js} +1 -1
- package/out/renderer/assets/{stateDiagram-DGXRK772-AlwHo7F1.js → stateDiagram-DGXRK772-BTIzql3d.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-D7-M_MQG.js +1 -0
- package/out/renderer/assets/{team-bridge-page-vIR1dP5K.js → team-bridge-page-Y7kfORf7.js} +1 -1
- package/out/renderer/assets/{team-bridge-scope-preference-Dlf6h_m5.js → team-bridge-scope-preference-0e228o8i.js} +1 -1
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-B7rXhxSU.js → timeline-definition-BDJGKUSR-CV2qVMM7.js} +1 -1
- package/out/renderer/assets/{use-download-agent-mutation-DPsC_HGf.js → use-download-agent-mutation-D_BdjsyK.js} +1 -1
- package/out/renderer/assets/{use-session-snapshot-DO0nbiYH.js → use-session-snapshot-BGgV5JES.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-B5a0ZuzY.js → xychartDiagram-VJFVF3MP-zG2rJLeN.js} +1 -1
- package/out/renderer/browser-approvals-overlay.html +2 -2
- package/out/renderer/console-capture.html +5 -5
- package/out/renderer/index.html +7 -7
- package/out/renderer/installer.html +4 -4
- package/out/renderer/mini.html +7 -7
- package/package.json +1 -1
- package/out/renderer/assets/browser-page-onX8FqEA.js +0 -1
- package/out/renderer/assets/channel-Dpjqf8Pr.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-Bd3jAzCq.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-Bd3jAzCq.js +0 -1
- package/out/renderer/assets/clone-BgtnSptX.js +0 -1
- package/out/renderer/assets/infoDiagram-PH2N3AL5-M2sSQges.js +0 -2
- package/out/renderer/assets/legacy-agents-page-CUK9HFM4.js +0 -33
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-BMk0V1sn.js +0 -1
package/out/renderer/assets/{stateDiagram-DGXRK772-AlwHo7F1.js → stateDiagram-DGXRK772-BTIzql3d.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as W,a as P,S as N}from"./chunk-AEK57VVT-Bt8NwGtc.js";import{_ as u,c as t,d as H,l as S,e as C,k as z,u as U}from"./mermaid.core-ZnA0Lmkj.js";import{G as F}from"./graph-BD4wR-0f.js";import{l as O}from"./layout-viZOtHI3.js";import{q as J,u as X}from"./conversation-input-sync-D9Xccwx1.js";import"./chunk-RZ5BOZE2-BjDeLAwH.js";import"./index-C5MuLj2j.js";import"./messages-BdH-KMeX.js";import"./_baseUniq-G4ujmd2X.js";import"./_basePickBy-BG2VhiIr.js";import"./appearance-B-Sdp9IA.js";import"./roles-D1pcbxAx.js";import"./error-boundary-DfFcgZm0.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),G=u(()=>Object.keys(L),"keys"),I=u(()=>G().length,"size"),$={get:Y,set:D,keys:G,size:I},q=u(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),j=u(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Z=u((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),K=u((e,i)=>{const d=u(function(l,B,m){const k=l.append("tspan").attr("x",2*t().state.padding).text(B);m||k.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(x,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),c=Math.max(p.width,n.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",p.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Q=u((e,i,d)=>{const o=t().state.padding,n=2*t().state.padding,g=e.node().getBBox(),x=g.width,a=g.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let c=Math.max(p,x);c===x&&(c=c+n);let l;const B=e.node().getBBox();i.doc,l=a-o,p>x&&(l=(x-c)/2+o),Math.abs(a-B.x)<o&&p>x&&(l=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),p<=x&&s.attr("x",a+(c-n)/2-p/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let n=d;d=o,o=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let n=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const p=y.trim();if(p.length>0){const c=g.append("tspan");if(c.text(p),s===0){const l=c.node().getBBox();s+=l.height}n+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:n}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:n,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),_=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&q(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&tt(n,i),i.type==="note"&&at(i.note.text,n),i.type==="divider"&&j(n),i.type==="default"&&i.descriptions.length===0&&Z(n,i),i.type==="default"&&i.descriptions.length>0&&K(n,i);const g=n.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),A=0,it=u(function(e,i,d){const o=u(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,g=J().x(function(s){return s.x}).y(function(s){return s.y}).curve(X),x=e.append("path").attr("d",g(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),x.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:p}=U.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,k=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",p+l),w=h.node().getBBox();m=Math.max(m,w.width),k=Math.min(k,w.x),S.info(w.x,y,p+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,p)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",p+w*l-f)),E=l*c.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",p-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},rt=u(function(){},"setConf"),nt=u(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),st=u(function(e,i,d,o){b=t().state;const n=t().securityLevel;let g;n==="sandbox"&&(g=H("#i"+i));const x=n==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);nt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,x,a,o);const p=b.padding,c=s.node().getBBox(),l=c.width+p*2,B=c.height+p*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,n,g,x)=>{const a=new F({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){y=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),c=x.db.getRelations(),l=Object.keys(p);for(const r of l){const f=p[r];d&&(f.parentId=d);let h;if(f.doc){let w=i.append("g").attr("id",f.id).attr("class","stateGroup");h=R(f.doc,w,f.id,!o,n,g,x);{w=Q(w,f,o);let v=w.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[f.id]={y:b.compositTitleSize}}}else h=_(i,f,a);if(f.note){const w={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},v=_(i,w,a);f.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;c.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:dt(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),O(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),g.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let v=0,M=0;w&&(w.parentElement&&(v=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let k=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),it(i,a.edge(r),a.edge(r).relation))}),k=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=k.width+2*b.padding,E.height=k.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:rt,draw:st},St={parser:P,get db(){return new N(1)},renderer:ot,styles:W,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{St as diagram};
|
|
1
|
+
import{s as W,a as P,S as N}from"./chunk-AEK57VVT-CxtPWm0S.js";import{_ as u,c as t,d as H,l as S,e as C,k as z,u as U}from"./mermaid.core-C74Lu-Og.js";import{G as F}from"./graph-zJQyU8lA.js";import{l as O}from"./layout-DqdvdvIz.js";import{q as J,u as X}from"./conversation-input-sync-59C2VH9z.js";import"./chunk-RZ5BOZE2-Cz1t_ff3.js";import"./index-IJLdoh2_.js";import"./messages-CqvhgjgC.js";import"./_baseUniq-Cf60T05n.js";import"./_basePickBy-DfU-0OMa.js";import"./appearance-DZQCtGzt.js";import"./roles-D1pcbxAx.js";import"./error-boundary--DgTWGAQ.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),G=u(()=>Object.keys(L),"keys"),I=u(()=>G().length,"size"),$={get:Y,set:D,keys:G,size:I},q=u(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),j=u(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Z=u((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),K=u((e,i)=>{const d=u(function(l,B,m){const k=l.append("tspan").attr("x",2*t().state.padding).text(B);m||k.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(x,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),c=Math.max(p.width,n.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",p.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Q=u((e,i,d)=>{const o=t().state.padding,n=2*t().state.padding,g=e.node().getBBox(),x=g.width,a=g.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let c=Math.max(p,x);c===x&&(c=c+n);let l;const B=e.node().getBBox();i.doc,l=a-o,p>x&&(l=(x-c)/2+o),Math.abs(a-B.x)<o&&p>x&&(l=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),p<=x&&s.attr("x",a+(c-n)/2-p/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let n=d;d=o,o=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let n=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const p=y.trim();if(p.length>0){const c=g.append("tspan");if(c.text(p),s===0){const l=c.node().getBBox();s+=l.height}n+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:n}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:n,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),_=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&q(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&tt(n,i),i.type==="note"&&at(i.note.text,n),i.type==="divider"&&j(n),i.type==="default"&&i.descriptions.length===0&&Z(n,i),i.type==="default"&&i.descriptions.length>0&&K(n,i);const g=n.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),A=0,it=u(function(e,i,d){const o=u(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,g=J().x(function(s){return s.x}).y(function(s){return s.y}).curve(X),x=e.append("path").attr("d",g(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),x.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:p}=U.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,k=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",p+l),w=h.node().getBBox();m=Math.max(m,w.width),k=Math.min(k,w.x),S.info(w.x,y,p+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,p)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",p+w*l-f)),E=l*c.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",p-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},rt=u(function(){},"setConf"),nt=u(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),st=u(function(e,i,d,o){b=t().state;const n=t().securityLevel;let g;n==="sandbox"&&(g=H("#i"+i));const x=n==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);nt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,x,a,o);const p=b.padding,c=s.node().getBBox(),l=c.width+p*2,B=c.height+p*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,n,g,x)=>{const a=new F({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){y=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),c=x.db.getRelations(),l=Object.keys(p);for(const r of l){const f=p[r];d&&(f.parentId=d);let h;if(f.doc){let w=i.append("g").attr("id",f.id).attr("class","stateGroup");h=R(f.doc,w,f.id,!o,n,g,x);{w=Q(w,f,o);let v=w.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[f.id]={y:b.compositTitleSize}}}else h=_(i,f,a);if(f.note){const w={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},v=_(i,w,a);f.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;c.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:dt(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),O(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),g.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let v=0,M=0;w&&(w.parentElement&&(v=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let k=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),it(i,a.edge(r),a.edge(r).relation))}),k=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=k.width+2*b.padding,E.height=k.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:rt,draw:st},St={parser:P,get db(){return new N(1)},renderer:ot,styles:W,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{St as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as r,b as e,a,S as i}from"./chunk-AEK57VVT-CxtPWm0S.js";import{_ as s}from"./mermaid.core-C74Lu-Og.js";import"./chunk-RZ5BOZE2-Cz1t_ff3.js";import"./conversation-input-sync-59C2VH9z.js";import"./index-IJLdoh2_.js";import"./messages-CqvhgjgC.js";import"./appearance-DZQCtGzt.js";import"./roles-D1pcbxAx.js";import"./error-boundary--DgTWGAQ.js";var f={parser:a,get db(){return new i(2)},renderer:e,styles:r,init:s(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{f as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,c as U,r as u}from"./index-
|
|
1
|
+
import{j as t,c as U,r as u}from"./index-IJLdoh2_.js";import{c2 as eu,t as Yr,N as Kl,c3 as nu,c4 as tu,v as At,c5 as iu,bO as Ca,c6 as au,c7 as Zr,c8 as ru,c9 as tn,ca as su,cb as ou,c1 as Ul,cc as mr,cd as Hl,c as lu,ce as di,cf as du,cg as cu,ch as Gl,ci as Wl,cj as uu,ck as mu,cl as hu,cm as gu,cn as pu,co as so,cp as fu,a as ka,cq as ku,cr as Vl,cs as wu,ct as bu,cu as wa,aZ as Ta,cv as yu,cw as xu,cx as vu,cy as Jl,R as ju,cz as _u,cA as Nu,cB as Ql,cC as es,cD as Bu,cE as Su,cF as at,cG as oo,cH as lo,cI as Eu,cJ as Iu,cK as Ru,cL as hr,cM as Cu,cN as Tu,cO as Au,cP as Mu,cQ as zu,cR as Pu,cS as co,cT as Ou,cU as Du,cV as Lu,cW as qu,cX as Fu,cY as $u,cZ as Ku,c_ as Uu,c$ as Hu,d0 as Gu,d1 as Wu,d2 as Vu,d3 as Ju,d4 as Qu,d5 as Xu,d6 as Yu,d7 as Zu,d8 as em,d9 as nm,da as tm,db as im,dc as am,dd as rm,de as sm,df as om,dg as uo,dh as mo}from"./index-CCtgdHHn.js";import{b2 as gr,di as ns,dj as lm,dk as dm,dl as nn,dm as ts,dn as rt,dp as cm,dq as is,dr as pr,ds as mi,cB as Xl,dt as ba,du as Yl,dv as as,dw as ya,dx as cn,c5 as Zl,dy as ed,dz as xa,dA as um,dB as mm,dC as hm,dD as gm,cM as rs,dE as pm,b5 as fm,az as km,dF as wm,dG as bm,dH as ym,aF as ca,dI as xm,dJ as vm,dK as jm,dL as ho,dM as _m,dN as Nm,dO as Bm,dP as Sm,b1 as Em,dQ as Im,dR as It,dS as Rm,dT as Cm,dU as nd,a1 as Aa,dV as Tm,dW as Am,dX as go,dY as Mm,dZ as zm,cv as ct,d_ as Ma,d$ as td,e0 as ot,e1 as id,cQ as za,c_ as Pm,bx as ad,e2 as rd,e3 as sd,e4 as Om,e5 as Dm,e6 as Lm,e7 as od,e8 as pi,e9 as hi,d8 as qm,cW as ld,ea as Fm,eb as dd,ec as va,ed as ja,ee as cd,ef as $m,eg as po,eh as Km,r as Um,ca as Hm,ei as ud,ej as Gm,ek as Wm,el as Vm,em as Jm,en as md,eo as ss,ep as hd,eq as Qm,aR as We,er as Xm,es as Ym,et as Zm,cK as Pa,eu as Oa,ev as os,ew as ri,d5 as gd,cG as ls,ex as eh,ey as pd,ez as fd,eA as fo,bv as nh,aS as yn,eB as th,eC as ih,eD as ah,eE as kd,eF as rh,eG as wd,eH as _a,eI as fr,eJ as bd,eK as sh,eL as oh,eM as ko,eN as wo,eO as bo,eP as yo,cI as lh,eQ as xo,eR as dh,eS as kr,eT as ch,eU as uh,ad as mh,bu as hh,cb as gh,eV as ph,eW as fh,eX as kh,eY as wh,eZ as bh,e_ as wr,e$ as yh,f0 as xh}from"./conversation-input-sync-59C2VH9z.js";import{N as In,u as ut,h as Da,m as La,s as vh,al as ds,ar as yd,aA as jh,n as ua,ao as _h,H as En,aB as Nh,aC as vo,aD as Bh,L as G,aE as Sh,aF as xd,aG as Eh,aH as vd,aI as jd,ai as qa,d as br,au as jo,aJ as yr,aK as st,aL as _o,a as Ih,t as Ti}from"./appearance-DZQCtGzt.js";import{c as Cn,u as ge,A as zi,B as X,aj as _d,X as mt,a7 as Nd,ai as Bd,a8 as Rh,a9 as Sd,ak as Ch,i as gi,n as Mt,o as zt,y as Ed,p as Pt,z as Ot,S as Ze,K as Li,w as $i,h as Th,F as Fa,J as Id,al as cs,r as us,a as Ah,D as Ki,b as Ui,d as Hi,I as Rd,H as si,l as zr,m as Na,e as Gi,am as Ba,f as ci,an as Mh,aa as zh,ao as Ph,ap as Oh,a6 as Dh,aq as Lh,ar as qh,as as qi,k as Fh,at as ms,q as $h}from"./error-boundary--DgTWGAQ.js";import{t as o}from"./messages-CqvhgjgC.js";import{r as Kh,u as Uh,a as Hh,D as Gh,b as Wh,c as No,s as Vh,w as Jh}from"./team-bridge-scope-preference-0e228o8i.js";import{I as Cd,L as Qh}from"./log-in-BguF0cMT.js";import{B as Xh}from"./building-2-DnSBO_7V.js";import"./console-mirror-Be1UXdZX.js";import"./roles-D1pcbxAx.js";/**
|
|
2
2
|
* @license lucide-react v0.507.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as t,c as h}from"./index-
|
|
1
|
+
import{r as o,j as t,c as h}from"./index-IJLdoh2_.js";import{N as S,u as N,d as w}from"./index-CCtgdHHn.js";import{u as I,A as E,q as A,B as y,X as k}from"./error-boundary--DgTWGAQ.js";import{t as i}from"./messages-CqvhgjgC.js";import{v as B}from"./appearance-DZQCtGzt.js";import{aR as m,aS as j,aT as D}from"./conversation-input-sync-59C2VH9z.js";let _;function J(e){_=e}function K(e){const n=_===e;return _=void 0,n}const X=({consentText:e,pending:n,failure:s,onTurnOff:a,onDismiss:r,defaultExpanded:d=!1})=>{I();const[c,b]=o.useState(d),u=o.useId(),g=o.useId(),f=n!==null,l=n==="turn_off";return t.jsx("section",{"data-agent-messages-banner":"default-on","aria-label":i("ui.agentMessages.banner.title"),children:t.jsx(E,{variant:"info",className:h(S,"items-start border-transparent"),children:t.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-2",children:[t.jsxs("div",{className:"flex w-full min-w-0 items-start gap-3",children:[t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[t.jsx(A,{children:i("ui.agentMessages.banner.title")}),t.jsx("p",{className:"text-body-sm text-ink-muted",children:i("ui.agentMessages.banner.body")})]}),t.jsx(y,{variant:"ghost",size:"icon-sm",className:"shrink-0 text-ink-muted","aria-label":i("ui.agentMessages.banner.dismiss"),disabled:f,onClick:r,"data-agent-messages-banner-action":"dismiss",children:t.jsx(k,{"aria-hidden":"true"})})]}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx(y,{variant:"secondary",size:"sm",disabled:f,onClick:a,"aria-describedby":g,"data-agent-messages-banner-action":"turn_off",children:t.jsxs("span",{className:"grid",children:[t.jsx("span",{className:h("col-start-1 row-start-1",l&&"invisible"),"aria-hidden":l,children:i("ui.agentMessages.banner.turn_off")}),t.jsx("span",{className:h("col-start-1 row-start-1",!l&&"invisible"),"aria-hidden":!l,children:i("ui.agentMessages.banner.turning_off")})]})}),t.jsx(y,{variant:"ghost",size:"sm",className:"text-ink","aria-expanded":c,"aria-controls":c?u:void 0,onClick:()=>b(x=>!x),"data-agent-messages-banner-action":"read",children:c?i("ui.agentMessages.banner.hide"):i("ui.agentMessages.banner.read")}),t.jsx("span",{id:g,className:"text-pretty text-meta text-ink-muted",children:i("ui.agentMessages.banner.turn_off_hint")})]}),c&&t.jsx("section",{id:u,className:"rounded-md bg-sunken p-3 @max-[1024px]/bridge:max-h-[35dvh] @max-[1024px]/bridge:overflow-y-auto focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2","aria-label":i("ui.agentMessages.banner.read"),"data-agent-messages-banner-consent":"",children:e?t.jsx("p",{className:"max-w-prose whitespace-pre-wrap text-body-sm text-ink-muted",children:e}):t.jsx("p",{className:"text-body-sm text-ink-muted",children:i("ui.agentMessages.banner.consent_unavailable")})}),s&&t.jsx("p",{role:"alert",className:"text-body-sm text-ink",children:s==="turn_off"?i("ui.agentMessages.banner.turn_off_failed"):i("ui.agentMessages.banner.dismiss_failed")})]})})})};function q(e,n,s){const a=e?.tenant_id??null;return!N(d=>s&&a?d.defaultOnDismissed[w(s,a)]===!0:!1)&&B(e,n)}function V(e){const{api:n,accountId:s,tenantId:a,markerTenantId:r,onSettings:d,onChanged:c}=e,[b,u]=o.useState(null),[g,f]=o.useState(null),l=o.useRef(!1);async function x(p,O){if(!(l.current||!s)){l.current=!0,u(p),f(null);try{await O()}catch{f(p);return}finally{l.current=!1,u(null)}try{await c?.()}catch{}}}return{pending:b,failure:g,turnOff:()=>x("turn_off",async()=>{const p=await n.updateSettings({expected_account_id:s,...a?{tenant_id:a}:{},state:"disabled"});d?.(p)}),dismiss:()=>x("dismiss",async()=>{await n.dismissOnboarding(),s&&r&&N.getState().markDefaultOnDismissed(s,r)})}}const v="lo.teamBridge.scope.v1",P=128;function C(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function M(e){try{const n=JSON.parse(e.getItem(v)??"{}");return C(n)?n:{}}catch{return{}}}function Y(e,n){const s=M(e)[n];if(typeof s!="string")return;if(s===m)return m;const a=s.trim();if(!(!a||a.length>P))return j(a)}function Q(e,n,s){try{const a=M(e);e.setItem(v,JSON.stringify({...a,[n]:s}))}catch{}}function U(e,n){return n===m?[...e]:e.filter(s=>s.tenant_id===n)}function W({organizations:e,stored:n,requestedTenant:s,chosen:a,current:r,snapshotRows:d}){return s?j(s):a?r:e.length===1?e[0].tenantId:n!==void 0&&(n===m||e.some(c=>c.tenantId===n))?n:e.length>1?m:D(e,r,a,d)}export{X as D,v as S,V as a,Y as b,W as c,K as d,J as r,U as s,q as u,Q as w};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as s,c as xt,l as E,d as j,V as kt,W as vt,X as _t,Y as bt,D as wt,$ as St,z as Et}from"./mermaid.core-
|
|
1
|
+
import{_ as s,c as xt,l as E,d as j,V as kt,W as vt,X as _t,Y as bt,D as wt,$ as St,z as Et}from"./mermaid.core-C74Lu-Og.js";import{d as nt}from"./arc-fEAyQagZ.js";import"./conversation-input-sync-59C2VH9z.js";import"./index-IJLdoh2_.js";import"./messages-CqvhgjgC.js";import"./appearance-DZQCtGzt.js";import"./roles-D1pcbxAx.js";import"./error-boundary--DgTWGAQ.js";var Q=function(){var n=s(function(x,i,a,c){for(a=a||{},c=x.length;c--;a[x[c]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],d=[1,12],h=[1,13],f=[1,16],m=[1,17],u={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,c,p,y,o,w){var v=o.length-1;switch(y){case 1:return o[v-1];case 2:this.$=[];break;case 3:o[v-1].push(o[v]),this.$=o[v-1];break;case 4:case 5:this.$=o[v];break;case 6:case 7:this.$=[];break;case 8:p.getCommonDb().setDiagramTitle(o[v].substr(6)),this.$=o[v].substr(6);break;case 9:this.$=o[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 12:p.addSection(o[v].substr(8)),this.$=o[v].substr(8);break;case 15:p.addTask(o[v],0,""),this.$=o[v];break;case 16:p.addEvent(o[v].substr(2)),this.$=o[v];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:s(function(i){var a=this,c=[0],p=[],y=[null],o=[],w=this.table,v="",N=0,A=0,V=2,U=1,M=o.slice.call(arguments,1),g=Object.create(this.lexer),b={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(b.yy[L]=this.yy[L]);g.setInput(i,b.yy),b.yy.lexer=g,b.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var P=g.yylloc;o.push(P);var W=g.options&&g.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(T){c.length=c.length-2*T,y.length=y.length-T,o.length=o.length-T}s(Z,"popStack");function tt(){var T;return T=p.pop()||g.lex()||U,typeof T!="number"&&(T instanceof Array&&(p=T,T=p.pop()),T=a.symbols_[T]||T),T}s(tt,"lex");for(var S,C,I,J,R={},B,$,et,O;;){if(C=c[c.length-1],this.defaultActions[C]?I=this.defaultActions[C]:((S===null||typeof S>"u")&&(S=tt()),I=w[C]&&w[C][S]),typeof I>"u"||!I.length||!I[0]){var K="";O=[];for(B in w[C])this.terminals_[B]&&B>V&&O.push("'"+this.terminals_[B]+"'");g.showPosition?K="Parse error on line "+(N+1)+`:
|
|
2
2
|
`+g.showPosition()+`
|
|
3
3
|
Expecting `+O.join(", ")+", got '"+(this.terminals_[S]||S)+"'":K="Parse error on line "+(N+1)+": Unexpected "+(S==U?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(K,{text:g.match,token:this.terminals_[S]||S,line:g.yylineno,loc:P,expected:O})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+S);switch(I[0]){case 1:c.push(S),y.push(g.yytext),o.push(g.yylloc),c.push(I[1]),S=null,A=g.yyleng,v=g.yytext,N=g.yylineno,P=g.yylloc;break;case 2:if($=this.productions_[I[1]][1],R.$=y[y.length-$],R._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},W&&(R._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),J=this.performAction.apply(R,[v,A,N,b.yy,I[1],y,o].concat(M)),typeof J<"u")return J;$&&(c=c.slice(0,-1*$*2),y=y.slice(0,-1*$),o=o.slice(0,-1*$)),c.push(this.productions_[I[1]][0]),y.push(R.$),o.push(R._$),et=w[c[c.length-2]][c[c.length-1]],c.push(et);break;case 3:return!0}}return!0},"parse")},k=function(){var x={EOF:1,parseError:s(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as c,c as p,r as $}from"./index-
|
|
1
|
+
import{j as c,c as p,r as $}from"./index-IJLdoh2_.js";import{c as d,u as T,i as Q}from"./error-boundary--DgTWGAQ.js";import{t as i}from"./messages-CqvhgjgC.js";import{cy as E,cv as H,cz as V,bu as M,bv as A,ay as S,c6 as B,b5 as N,c7 as P}from"./conversation-input-sync-59C2VH9z.js";import{bk as Y,bl as Z,bm as G,bn as W,bo as X,bp as J,bq as ee,br as K}from"./index-CCtgdHHn.js";import{B as te}from"./book-open-Cc4Qb21L.js";import{t as C,n as ae,a as v,g as ne,e as w,h as D,i as q,j as I,f as L}from"./en-US-CW_dDnkH.js";import{h as se,u as _,s as oe,y as ie}from"./appearance-DZQCtGzt.js";import{b as re,l as ce}from"./publication-validation-BsdGPymf.js";/**
|
|
2
2
|
* @license lucide-react v0.507.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/out/renderer/assets/{use-session-snapshot-DO0nbiYH.js → use-session-snapshot-BGgV5JES.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as c}from"./appearance-
|
|
1
|
+
import{d as c}from"./appearance-DZQCtGzt.js";import{r as n}from"./index-IJLdoh2_.js";function s(){const[f,a]=n.useState(null),[l,o]=n.useState(null),r=n.useRef(null),u=n.useCallback(async e=>{r.current=e,a(t=>t&&t.id!==e?null:t),o(t=>t&&t.id!==e?null:t);try{const t=await c({op:"sessions.get",sessionId:e});if(r.current!==e)return;a({id:e,frontend:t.payload.frontend.snapshot})}catch{}try{const t=await c({op:"commands.entities",sessionId:e,command:"effort"});if(r.current!==e)return;o({id:e,entities:t.entities})}catch{}},[]);return{frontend:f?.frontend??null,effortEntities:l?.entities,refresh:u}}export{s as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as ri,z as hi,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-
|
|
1
|
+
import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as ri,z as hi,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-C74Lu-Og.js";import{o as kt,n as Tt,q as Rt}from"./conversation-input-sync-59C2VH9z.js";import"./index-IJLdoh2_.js";import"./messages-CqvhgjgC.js";import"./appearance-DZQCtGzt.js";import"./roles-D1pcbxAx.js";import"./error-boundary--DgTWGAQ.js";var at=function(){var t=n(function(B,r,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=r);return l},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],o=[1,5],p=[1,6],g=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],T=[1,25],E=[1,26],S=[1,28],R=[1,29],I=[1,30],V=[1,31],_=[1,32],L=[1,33],f=[1,34],C=[1,35],h=[1,36],D=[1,37],N=[1,43],yt=[1,42],bt=[1,47],$=[1,50],b=[1,10,12,14,16,18,19,21,23,34,35,36],J=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],At=[1,64],tt={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(r,l,c,u,y,a,X){var x=a.length-1;switch(y){case 5:u.setOrientation(a[x]);break;case 9:u.setDiagramTitle(a[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},a[x]);break;case 13:u.setLineData(a[x-1],a[x]);break;case 14:u.setBarData({text:"",type:"text"},a[x]);break;case 15:u.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:u.setXAxisTitle(a[x]);break;case 23:u.setXAxisTitle(a[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(a[x]);break;case 26:u.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:u.setYAxisTitle(a[x]);break;case 31:u.setYAxisTitle(a[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:o,35:p,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:o,35:p,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:o,35:p,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(m,[2,34]),t(m,[2,35]),t(m,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:o,35:p,36:g}),{1:[2,3]},t(m,[2,5]),t(i,[2,7],{4:22,34:o,35:p,36:g}),{11:23,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D},{11:39,13:38,24:N,27:yt,29:40,30:41,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D},{11:45,15:44,27:bt,33:46,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D},{11:49,17:48,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D},{11:52,17:51,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D},{20:[1,53]},{22:[1,54]},t(b,[2,18]),{1:[2,2]},t(b,[2,8]),t(b,[2,9]),t(J,[2,37],{40:55,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D}),t(J,[2,38]),t(J,[2,39]),t(P,[2,40]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(b,[2,10]),t(b,[2,22],{30:41,29:56,24:N,27:yt}),t(b,[2,24]),t(b,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D},t(b,[2,11]),t(b,[2,30],{33:60,27:bt}),t(b,[2,32]),{31:[1,61]},t(b,[2,12]),{17:62,24:$},{25:63,27:At},t(b,[2,14]),{17:65,24:$},t(b,[2,16]),t(b,[2,17]),t(P,[2,41]),t(b,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(b,[2,31]),{27:[1,69]},t(b,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(b,[2,15]),t(b,[2,26]),t(b,[2,27]),{11:59,32:72,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D},t(b,[2,33]),t(b,[2,19]),{25:73,27:At},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(r,l){if(l.recoverable)this.trace(r);else{var c=new Error(r);throw c.hash=l,c}},"parseError"),parse:n(function(r){var l=this,c=[0],u=[],y=[null],a=[],X=this.table,x="",G=0,Ct=0,Kt=2,wt=1,Zt=a.slice.call(arguments,1),A=Object.create(this.lexer),W={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(W.yy[it]=this.yy[it]);A.setInput(r,W.yy),W.yy.lexer=A,W.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var et=A.yylloc;a.push(et);var Jt=A.options&&A.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ti(k){c.length=c.length-2*k,y.length=y.length-k,a.length=a.length-k}n(ti,"popStack");function St(){var k;return k=u.pop()||A.lex()||wt,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=l.symbols_[k]||k),k}n(St,"lex");for(var w,O,v,st,z={},j,M,_t,Q;;){if(O=c[c.length-1],this.defaultActions[O]?v=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=St()),v=X[O]&&X[O][w]),typeof v>"u"||!v.length||!v[0]){var nt="";Q=[];for(j in X[O])this.terminals_[j]&&j>Kt&&Q.push("'"+this.terminals_[j]+"'");A.showPosition?nt="Parse error on line "+(G+1)+`:
|
|
2
2
|
`+A.showPosition()+`
|
|
3
3
|
Expecting `+Q.join(", ")+", got '"+(this.terminals_[w]||w)+"'":nt="Parse error on line "+(G+1)+": Unexpected "+(w==wt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(nt,{text:A.match,token:this.terminals_[w]||w,line:A.yylineno,loc:et,expected:Q})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+w);switch(v[0]){case 1:c.push(w),y.push(A.yytext),a.push(A.yylloc),c.push(v[1]),w=null,Ct=A.yyleng,x=A.yytext,G=A.yylineno,et=A.yylloc;break;case 2:if(M=this.productions_[v[1]][1],z.$=y[y.length-M],z._$={first_line:a[a.length-(M||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(M||1)].first_column,last_column:a[a.length-1].last_column},Jt&&(z._$.range=[a[a.length-(M||1)].range[0],a[a.length-1].range[1]]),st=this.performAction.apply(z,[x,Ct,G,W.yy,v[1],y,a].concat(Zt)),typeof st<"u")return st;M&&(c=c.slice(0,-1*M*2),y=y.slice(0,-1*M),a=a.slice(0,-1*M)),c.push(this.productions_[v[1]][0]),y.push(z.$),a.push(z._$),_t=X[c[c.length-2]][c[c.length-1]],c.push(_t);break;case 3:return!0}}return!0},"parse")},Qt=function(){var B={EOF:1,parseError:n(function(l,c){if(this.yy.parser)this.yy.parser.parseError(l,c);else throw new Error(l)},"parseError"),setInput:n(function(r,l){return this.yy=l||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var l=r.length,c=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
http-equiv="Content-Security-Policy"
|
|
22
22
|
content="default-src 'none'; script-src 'self'; style-src 'self'; img-src 'none'; font-src 'none'; connect-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'"
|
|
23
23
|
/>
|
|
24
|
-
<script type="module" crossorigin src="./assets/approvalsOverlay-
|
|
25
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
24
|
+
<script type="module" crossorigin src="./assets/approvalsOverlay-ArPhFGMQ.js"></script>
|
|
25
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-CqvhgjgC.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="./assets/roles-D1pcbxAx.js">
|
|
27
27
|
<link rel="stylesheet" crossorigin href="./assets/approvalsOverlay-CAjdhWyk.css">
|
|
28
28
|
</head>
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
<title>Local Operator Console Capture</title>
|
|
7
7
|
<meta http-equiv="Content-Security-Policy"
|
|
8
8
|
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
|
|
9
|
-
<script type="module" crossorigin src="./assets/consoleCapture-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
11
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
9
|
+
<script type="module" crossorigin src="./assets/consoleCapture-owojwcFe.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-CqvhgjgC.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="./assets/index-IJLdoh2_.js">
|
|
12
12
|
<link rel="modulepreload" crossorigin href="./assets/roles-D1pcbxAx.js">
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/appearance-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="./assets/console-mirror-
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/appearance-DZQCtGzt.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="./assets/console-mirror-Be1UXdZX.js">
|
|
15
15
|
<link rel="stylesheet" crossorigin href="./assets/index-xOFm2yrV.css">
|
|
16
16
|
<link rel="stylesheet" crossorigin href="./assets/console-mirror-C58ni4_c.css">
|
|
17
17
|
</head>
|
package/out/renderer/index.html
CHANGED
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
<meta http-equiv="Content-Security-Policy"
|
|
42
42
|
content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111 http://localhost:8080 http://127.0.0.1:8080 https://api.radienthq.com https://us.i.posthog.com https://login.microsoftonline.com https://accounts.google.com; script-src 'self' https://us-assets.i.posthog.com https://accounts.google.com https://login.microsoftonline.com; style-src 'self' 'unsafe-inline' data:; img-src 'self' data: blob: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' blob: http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:; frame-src 'self' data: blob: lo-supplement: http://localhost:1111 http://127.0.0.1:1111 https://accounts.google.com https://login.microsoftonline.com" />
|
|
43
43
|
<meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin-allow-popups" />
|
|
44
|
-
<script type="module" crossorigin src="./assets/index-
|
|
45
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
46
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
44
|
+
<script type="module" crossorigin src="./assets/index-CCtgdHHn.js"></script>
|
|
45
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-CqvhgjgC.js">
|
|
46
|
+
<link rel="modulepreload" crossorigin href="./assets/index-IJLdoh2_.js">
|
|
47
47
|
<link rel="modulepreload" crossorigin href="./assets/roles-D1pcbxAx.js">
|
|
48
|
-
<link rel="modulepreload" crossorigin href="./assets/appearance-
|
|
49
|
-
<link rel="modulepreload" crossorigin href="./assets/error-boundary
|
|
50
|
-
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-
|
|
51
|
-
<link rel="modulepreload" crossorigin href="./assets/console-mirror-
|
|
48
|
+
<link rel="modulepreload" crossorigin href="./assets/appearance-DZQCtGzt.js">
|
|
49
|
+
<link rel="modulepreload" crossorigin href="./assets/error-boundary--DgTWGAQ.js">
|
|
50
|
+
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-59C2VH9z.js">
|
|
51
|
+
<link rel="modulepreload" crossorigin href="./assets/console-mirror-Be1UXdZX.js">
|
|
52
52
|
<link rel="stylesheet" crossorigin href="./assets/index-xOFm2yrV.css">
|
|
53
53
|
<link rel="stylesheet" crossorigin href="./assets/conversation-input-sync-BmGWvjex.css">
|
|
54
54
|
<link rel="stylesheet" crossorigin href="./assets/console-mirror-C58ni4_c.css">
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
|
|
9
9
|
<meta http-equiv="Content-Security-Policy"
|
|
10
10
|
content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:" />
|
|
11
|
-
<script type="module" crossorigin src="./assets/installer-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="./assets/error-boundary
|
|
11
|
+
<script type="module" crossorigin src="./assets/installer-BqIFRN1B.js"></script>
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-CqvhgjgC.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/index-IJLdoh2_.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="./assets/error-boundary--DgTWGAQ.js">
|
|
15
15
|
<link rel="stylesheet" crossorigin href="./assets/index-xOFm2yrV.css">
|
|
16
16
|
</head>
|
|
17
17
|
|
package/out/renderer/mini.html
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
<title>Local Operator Quick Send</title>
|
|
7
7
|
<meta http-equiv="Content-Security-Policy"
|
|
8
8
|
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
|
|
9
|
-
<script type="module" crossorigin src="./assets/mini-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
11
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
9
|
+
<script type="module" crossorigin src="./assets/mini-CnOyRuzB.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-CqvhgjgC.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="./assets/index-IJLdoh2_.js">
|
|
12
12
|
<link rel="modulepreload" crossorigin href="./assets/roles-D1pcbxAx.js">
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/appearance-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="./assets/error-boundary
|
|
15
|
-
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-
|
|
16
|
-
<link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/appearance-DZQCtGzt.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="./assets/error-boundary--DgTWGAQ.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-59C2VH9z.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-BGgV5JES.js">
|
|
17
17
|
<link rel="stylesheet" crossorigin href="./assets/index-xOFm2yrV.css">
|
|
18
18
|
<link rel="stylesheet" crossorigin href="./assets/conversation-input-sync-BmGWvjex.css">
|
|
19
19
|
</head>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-operator-ui",
|
|
3
|
-
"version": "0.52.
|
|
3
|
+
"version": "0.52.10",
|
|
4
4
|
"productName": "Local Operator",
|
|
5
5
|
"description": "User interface for AI agent assistants that run Python code safely on your device through an intuitive chat interface. Supports local and cloud LLM models with built-in security features.",
|
|
6
6
|
"main": "./out/main/index.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-C5MuLj2j.js";import{B as o}from"./index-zeRfNJaS.js";import"./messages-BdH-KMeX.js";import"./appearance-B-Sdp9IA.js";import"./roles-D1pcbxAx.js";import"./error-boundary-DfFcgZm0.js";import"./conversation-input-sync-D9Xccwx1.js";import"./console-mirror-Icddfzc5.js";const c=()=>r.jsx(o,{tabScope:"all",requestScope:"all",hostSessionId:null,isRoutePage:!0,surfaceTag:"browser-route",dockSurfaceTag:"browser-approvals-dock"});export{c as BrowserPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as a,C as n}from"./mermaid.core-ZnA0Lmkj.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-A2AXSNBT-DYX_2Wnw.js";import{_ as i}from"./mermaid.core-ZnA0Lmkj.js";import"./chunk-RZ5BOZE2-BjDeLAwH.js";import"./conversation-input-sync-D9Xccwx1.js";import"./index-C5MuLj2j.js";import"./messages-BdH-KMeX.js";import"./appearance-B-Sdp9IA.js";import"./roles-D1pcbxAx.js";import"./error-boundary-DfFcgZm0.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-A2AXSNBT-DYX_2Wnw.js";import{_ as i}from"./mermaid.core-ZnA0Lmkj.js";import"./chunk-RZ5BOZE2-BjDeLAwH.js";import"./conversation-input-sync-D9Xccwx1.js";import"./index-C5MuLj2j.js";import"./messages-BdH-KMeX.js";import"./appearance-B-Sdp9IA.js";import"./roles-D1pcbxAx.js";import"./error-boundary-DfFcgZm0.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./_baseUniq-G4ujmd2X.js";var e=4;function a(o){return r(o,e)}export{a as c};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,l as o,K as s,e as p,L as n}from"./mermaid.core-ZnA0Lmkj.js";import{p as m}from"./radar-MK3ICKWK-Dl4nMpzG.js";import"./conversation-input-sync-D9Xccwx1.js";import"./index-C5MuLj2j.js";import"./messages-BdH-KMeX.js";import"./appearance-B-Sdp9IA.js";import"./roles-D1pcbxAx.js";import"./error-boundary-DfFcgZm0.js";import"./_baseUniq-G4ujmd2X.js";import"./_basePickBy-BG2VhiIr.js";import"./clone-BgtnSptX.js";var g={parse:e(async r=>{const a=await m("info",r);o.debug(a)},"parse")},v={version:n.version},d=e(()=>v.version,"getVersion"),c={getVersion:d},l=e((r,a,i)=>{o.debug(`rendering info diagram
|
|
2
|
-
`+r);const t=s(a);p(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${i}`)},"draw"),f={draw:l},V={parser:g,db:c,renderer:f};export{V as diagram};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import{r as l,j as e,c as $}from"./index-C5MuLj2j.js";import{P as Nt}from"./page-header-Bz2lz4LI.js";import{c as ie,u as P,D as Xe,b as et,B as E,d as tt,e as F,J as at,S as st,w as W,K as nt,k as Ct,a6 as je,L as le,i as it,X as ot,a7 as St,a8 as It,a9 as Dt,A as ye,q as Se,x as re,R as Pt,U as Lt,V as Et,W as Tt,Y as Ie,h as Ot,aa as zt,Z as qt,ab as Ut,v as Rt}from"./error-boundary-DfFcgZm0.js";import{bs as $t,bt as Ee,bu as Te,bv as Mt,bw as Ge,bx as Bt,by as Ht,a as rt,bz as ae,bA as ne,bB as Wt,bC as Vt,bD as Kt,bE as Qt,bF as De,bG as Gt,bl as Ft,bH as Yt,v as ze,bI as lt,Q as At,b1 as Jt,t as Zt,a$ as Xt,b2 as ea,bJ as ct,bK as ta,bL as ut,aZ as aa,bM as sa,bN as Fe}from"./index-zeRfNJaS.js";import{cA as dt,cB as mt,bw as na,c4 as ia,cC as oa,b4 as qe,b5 as J,bv as pt,ay as ra,cD as la,aF as ce,ad as ca,bz as se,bA as _e,aU as gt,c5 as ua,cE as da,by as ma,c7 as Oe,c9 as pa,cr as ga,T as ha,bu as ht,cF as xa,a1 as ba}from"./conversation-input-sync-D9Xccwx1.js";import{h as xt,u as bt,ab as fa,al as ya,ar as _a,as as ja,s as Ue,a as ka,c as va,t as wa,g as Na,G as Ca,y as ft}from"./appearance-B-Sdp9IA.js";import{t as a}from"./messages-BdH-KMeX.js";import{A as Sa}from"./agents-page-BM9GCJql.js";import{N as Ia}from"./notebook-pen-CgBQhdFa.js";import{n as Pe,z as Da,A as Pa,H as La,p as Ea}from"./org-access-D_YDOtGr.js";import{o as Ta,a as Oa}from"./org-surface-gate-BRBzEvbn.js";import{R as Ye}from"./radient-auth-buttons-DKI9Bh07.js";import{c as za,i as qa,d as Ua,e as Ra,t as $a,p as Ae,P as Je}from"./publication-validation-quCeNj-v.js";import"./console-mirror-Icddfzc5.js";import"./roles-D1pcbxAx.js";import"./avatar-cropper-DlNZ1v12.js";import"./log-in-DRqGQiMM.js";import"./project-markdown-DYciqMBs.js";/**
|
|
2
|
-
* @license lucide-react v0.507.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Ma=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],Ba=ie("ellipsis-vertical",Ma);/**
|
|
7
|
-
* @license lucide-react v0.507.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const Ha=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]],Ze=ie("file-input",Ha);/**
|
|
12
|
-
* @license lucide-react v0.507.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Wa=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4 7V4a2 2 0 0 1 2-2 2 2 0 0 0-2 2",key:"1vk7w2"}],["path",{d:"M4.063 20.999a2 2 0 0 0 2 1L18 22a2 2 0 0 0 2-2V7l-5-5H6",key:"1jink5"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]],Va=ie("file-output",Wa);/**
|
|
17
|
-
* @license lucide-react v0.507.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const Ka=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],Qa=ie("git-branch",Ka);/**
|
|
22
|
-
* @license lucide-react v0.507.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const Ga=[["path",{d:"M16 10h2",key:"8sgtl7"}],["path",{d:"M16 14h2",key:"epxaof"}],["path",{d:"M6.17 15a3 3 0 0 1 5.66 0",key:"n6f512"}],["circle",{cx:"9",cy:"11",r:"2",key:"yxgjnd"}],["rect",{x:"2",y:"5",width:"20",height:"14",rx:"2",key:"qneu4z"}]],Fa=ie("id-card",Ga);/**
|
|
27
|
-
* @license lucide-react v0.507.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const Ya=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m8 11 4 4 4-4",key:"1dohi6"}],["path",{d:"M8 5H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-4",key:"1ywtjm"}]],Aa=ie("import",Ya),Ja=({agentId:t,agentName:n,onAgentDeleted:s,buttonSx:o={},isAgentsPage:i=!1,onViewAgentSettings:c,onChatWithAgent:u,onExportAgent:b,onClearConversation:x,onUploadAgentToHub:j})=>{P();const[f,k]=l.useState(!1),[r,d]=l.useState(!1),[m,y]=l.useState(!1),v=l.useRef(!1),S=$t(),{clearAgentFromAllPages:C}=dt(),z=async()=>{try{await S.mutateAsync(t),C(t),s?.(t)}catch(N){console.error("Failed to delete agent:",N)}finally{d(!1)}};return e.jsxs(e.Fragment,{children:[e.jsxs(Xe,{open:f,onOpenChange:k,modal:!1,children:[e.jsx(et,{asChild:!0,children:e.jsx(E,{variant:"ghost",size:"icon-sm","aria-label":a("ui.agents.dialogs.menu.accessible"),"data-tour-tag":"agent-options-button",onClick:N=>{N.stopPropagation(),N.detail===0&&k(T=>!T)},style:o,children:e.jsx(Ba,{"aria-hidden":"true"})})}),e.jsxs(tt,{align:"end",className:"min-w-45",onClick:N=>N.stopPropagation(),onInteractOutside:N=>{const T=N.detail.originalEvent.target;T instanceof Element&&T.closest(".shepherd-element")&&N.preventDefault()},onCloseAutoFocus:N=>{v.current&&(v.current=!1,N.preventDefault())},children:[i&&u&&e.jsxs(F,{onSelect:u,children:[e.jsx(mt,{"aria-hidden":"true"}),e.jsx("span",{children:a("ui.agents.dialogs.menu.chat")})]}),!i&&c&&e.jsxs(F,{"data-tour-tag":"view-agent-settings-menu-item",onSelect:c,children:[e.jsx(Ee,{"aria-hidden":"true"}),e.jsx("span",{children:a("ui.agents.dialogs.menu.settings")})]}),b&&e.jsxs(F,{onSelect:b,children:[e.jsx(Va,{"aria-hidden":"true"}),e.jsx("span",{children:a("ui.agents.dialogs.menu.export")})]}),j&&e.jsxs(F,{"data-tour-tag":"upload-to-hub-menu-item",onSelect:j,children:[e.jsx(Te,{"aria-hidden":"true"}),e.jsx("span",{children:a("ui.agents.dialogs.menu.upload")})]}),x&&e.jsxs(F,{className:"text-warning data-[highlighted]:bg-warning-wash",onSelect:()=>{v.current=!0,y(!0)},children:[e.jsx(Mt,{"aria-hidden":"true"}),e.jsx("span",{children:a("ui.agents.dialogs.menu.clear")})]}),e.jsxs(F,{destructive:!0,onSelect:()=>{v.current=!0,d(!0)},children:[e.jsx(na,{"aria-hidden":"true"}),e.jsx("span",{children:a("ui.agents.dialogs.menu.delete")})]})]})]}),e.jsx(Ge,{open:r,title:a("ui.agents.dialogs.delete.title"),message:e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-body text-ink",children:a("ui.agents.dialogs.delete.question",{name:n})}),e.jsx("p",{className:"mt-2 text-body-sm text-ink-muted",children:a("ui.agents.dialogs.delete.warning")})]}),confirmText:a("ui.agents.dialogs.delete.confirm"),cancelText:a("ui.agents.dialogs.delete.cancel"),isDangerous:!0,onConfirm:z,onCancel:()=>d(!1)}),e.jsx(Ge,{open:m,title:a("ui.agents.dialogs.clear.title"),message:a("ui.agents.dialogs.clear.warning"),confirmText:a("ui.agents.dialogs.clear.confirm"),cancelText:a("ui.agents.dialogs.clear.cancel"),isDangerous:!0,onConfirm:()=>{x?.(),y(!1)},onCancel:()=>y(!1)})]})},Za=({page:t,count:n,onChange:s})=>{P();const o=()=>{t>1&&s(t-1)},i=()=>{t<n&&s(t+1)};return n<=1?null:e.jsxs("div",{className:"sticky bottom-0 left-0 right-0 z-10 flex min-h-13 items-center justify-between border-t border-hairline bg-surface px-4 py-2",children:[e.jsx(E,{variant:"ghost",size:"icon-sm",onClick:o,disabled:t<=1,"aria-label":a("ui.common.forms.compact_pagination.previous_page"),children:e.jsx(ia,{})}),e.jsx("span",{className:"select-none text-meta text-ink-dim",children:a("ui.common.forms.pagination.position",{page:String(t),count:String(n)})}),e.jsx(E,{variant:"ghost",size:"icon-sm",onClick:i,disabled:t>=n,"aria-label":a("ui.common.forms.compact_pagination.next_page"),children:e.jsx(at,{})})]})},yt=t=>["agent-system-prompt",t],_t=t=>{const{shouldEnableQuery:n}=oa();return xt({enabled:n({bypassInternetCheck:!0})&&!!t,queryKey:yt(t),queryFn:async()=>{try{const o=await qe(J.baseUrl).agents.getAgentSystemPrompt(t);if(o.status>=400)throw new Error(o.message||a("ui.common.errors.agent_prompt_fetch"));return o.result?.system_prompt||""}catch(s){const o=s instanceof Error?s.message:a("ui.common.errors.agent_prompt_fetch_unknown");throw ce(o),s}},refetchOnWindowFocus:!1,staleTime:5e3})},Xa=t=>{const n=bt(),s=qe(J.baseUrl);return pt({mutationFn:async o=>{const i=la(o);if(i)throw ce(i),new Error(i);try{const c=await s.agents.updateAgentSystemPrompt(t,o);if(c.status>=400)throw new Error(c.message||a("ui.common.errors.agent_prompt_update_simple"));return c}catch(c){const u=c instanceof Error?c.message:a("ui.common.errors.agent_prompt_update_unknown");throw ce(u),c}},onSuccess:async()=>{await n.invalidateQueries({queryKey:yt(t)}),ra(a("ui.notices.agents.system_prompt_updated"))},onError:o=>{console.error("Error updating agent system prompt:",o)}})},es=()=>{const[t,n]=ca(),s=fa(),o=()=>{const c=t.get("page");return c?Number.parseInt(c,10):1},i=c=>{const u=new URLSearchParams(t);c===1?u.delete("page"):u.set("page",c.toString()),n(u)};return{page:o(),setPage:i,isView:c=>s.pathname.startsWith(`/${c}`)}},ts=({open:t,onClose:n,onAgentImported:s})=>{P();const[o,i]=l.useState(null),[c,u]=l.useState(!1),[b,x]=l.useState(null),j=l.useRef(null),f=Bt(),k=l.useCallback(g=>{g.preventDefault(),g.stopPropagation(),u(!0)},[]),r=l.useCallback(g=>{g.preventDefault(),g.stopPropagation(),u(!1)},[]),d=l.useCallback(g=>{g.preventDefault(),g.stopPropagation()},[]),m=l.useCallback(g=>g.name.toLowerCase().endsWith(".zip")?(x(null),!0):(x("ui.agents.dialogs.import.invalid_zip"),!1),[]),y=l.useCallback(g=>{if(g.preventDefault(),g.stopPropagation(),u(!1),g.dataTransfer.files&&g.dataTransfer.files.length>0){const I=g.dataTransfer.files[0];m(I)&&i(I)}},[m]),v=l.useCallback(g=>{if(g.target.files&&g.target.files.length>0){const I=g.target.files[0];m(I)&&i(I)}},[m]),S=l.useCallback(()=>{j.current?.click()},[]),C=async()=>{if(o)try{const g=await f.mutateAsync(o);i(null),x(null),s&&g&&s(g.id),n()}catch(g){console.error("Failed to import agent:",g)}},z=()=>{i(null),x(null),n()},N=f.isPending,T=N||!o,L=e.jsxs(e.Fragment,{children:[e.jsx(Ze,{size:19,className:"text-accent","aria-hidden":"true"}),a("ui.agents.dialogs.import.title")]}),_=e.jsxs(e.Fragment,{children:[e.jsx(se,{onClick:z,disabled:N,children:a("ui.agents.dialogs.import.cancel")}),e.jsx(_e,{onClick:C,disabled:T,startIcon:N?e.jsx(st,{}):null,children:a("ui.agents.dialogs.import.submit")})]});return e.jsxs(gt,{open:t,onClose:z,title:L,actions:_,maxWidth:"sm",children:[e.jsx("p",{className:"mb-4 text-body-sm text-ink-muted",children:a("ui.agents.dialogs.import.intro")}),e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsx("input",{ref:j,type:"file",accept:".zip",onChange:v,disabled:N,className:"hidden"}),e.jsx("button",{type:"button",onClick:S,onDragEnter:k,onDragLeave:r,onDragOver:d,onDrop:y,disabled:N,className:$("cursor-pointer rounded-lg border-2 border-control border-dashed bg-surface p-4 text-center","transition-colors duration-base ease-out-quart","hover:bg-accent-wash","disabled:border-hairline disabled:bg-sunken disabled:text-ink-disabled",c&&"border-accent bg-accent-wash"),children:o?e.jsxs(e.Fragment,{children:[e.jsx(Ze,{size:32,className:"mx-auto mb-2 text-ink-muted","aria-hidden":"true"}),e.jsx("p",{className:"text-body text-ink",children:o.name}),e.jsx("p",{className:"text-body-sm text-ink-muted",children:a("ui.agents.dialogs.import.replace_file")})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ht,{size:32,className:"mx-auto mb-2 text-ink-muted","aria-hidden":"true"}),e.jsx("p",{className:"text-body text-ink",children:a("ui.agents.dialogs.import.drop_file")}),e.jsx("p",{className:"text-body-sm text-ink-muted",children:a("ui.agents.dialogs.import.choose_file")})]})}),b&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:a(b)})]})]})},as=({title:t,searchQuery:n,onSearchChange:s,onNewAgentClick:o,searchPlaceholder:i=a("ui.common.layout.sidebar_header.search_agents"),newAgentTooltip:c=a("ui.common.layout.sidebar_header.create_a_new_agent"),onImportAgentClick:u,importAgentTooltip:b=a("ui.common.layout.sidebar_header.import_an_agent_from_a_zip_file")})=>(P(),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[e.jsx("h2",{className:"truncate text-heading text-ink",children:t}),e.jsxs("div",{className:"flex shrink-0 gap-1",children:[u&&e.jsx(W,{content:b,children:e.jsx(E,{variant:"ghost",size:"icon",onClick:u,"aria-label":a("ui.common.layout.sidebar_header.import_agent"),children:e.jsx(Aa,{"aria-hidden":"true"})})}),e.jsx(W,{content:c,children:e.jsx(E,{variant:"primary",size:"icon",onClick:o,"aria-label":a("ui.common.layout.sidebar_header.new_agent"),"data-tour-tag":"create-new-agent-button",children:e.jsx(rt,{"aria-hidden":"true"})})})]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(ua,{size:16,"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 start-3 -translate-y-1/2 text-ink-dim"}),e.jsx(nt,{type:"search",inputSize:"lg",placeholder:i,value:n,onChange:x=>s(x.target.value),"aria-label":i,className:"ps-9"})]})]})),w={temperature:.2,top_p:.9,top_k:40,max_tokens:4096,frequency_penalty:0,presence_penalty:0,seed:42},G=({label:t,description:n,defaultLabel:s,onSet:o})=>(P(),e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"text-body-sm text-ink",children:t}),e.jsx("span",{className:"text-meta text-ink-dim",children:a("ui.agents.settings.chat.not_set_yet")})]}),e.jsx("p",{className:"mt-1 text-meta text-ink-dim",children:n})]}),e.jsx(E,{variant:"secondary",size:"sm",className:"shrink-0",onClick:o,children:a("ui.agents.settings.chat.set_to_default",{value:String(s)})})]})),Le=({title:t,children:n})=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("h3",{className:"text-body-sm font-semibold text-ink-muted",children:t}),n]}),ss=({selectedAgent:t,savingField:n,setSavingField:s,updateAgentMutation:o,refetchAgent:i,initialSelectedAgentId:c})=>{P();const[u,b]=l.useState(t);l.useEffect(()=>{b(t)},[t]);const[x,j]=l.useState(!1),f=l.useId(),k=x?Ct:at;return e.jsxs("div",{children:[e.jsxs("h2",{className:"flex items-center gap-2",children:[e.jsxs("button",{type:"button",onClick:()=>j(!x),"aria-expanded":x,"aria-controls":f,className:"group flex items-center gap-2 py-1 text-start text-heading text-ink",children:[e.jsx(k,{size:14,"aria-hidden":"true",className:"shrink-0 text-ink-dim transition-colors duration-fast ease-out-quart group-hover:text-ink rtl:-scale-x-100"}),a("ui.agents.settings.chat.advanced_chat_settings")]}),e.jsx(W,{content:a("ui.agents.settings.chat.advanced_settings_to_change_how_the_agent"),children:e.jsx(E,{variant:"ghost",size:"icon-sm","aria-label":a("ui.agents.settings.chat.about_advanced_chat_settings"),children:e.jsx(je,{})})})]}),x&&e.jsxs("div",{id:f,className:"mt-3",children:[e.jsx("p",{className:"max-w-2xl text-body-sm text-ink-muted",children:a("ui.agents.settings.chat.set_custom_values_for_any_of_these")}),e.jsxs("div",{className:"mt-6 flex flex-col gap-8",children:[e.jsxs(Le,{title:a("ui.agents.settings.chat.sampling"),children:[u.temperature===null?e.jsx(G,{label:a("ui.agents.settings.chat.temperature"),description:a("ui.agents.settings.chat.controls_randomness_in_responses_0_0_1"),defaultLabel:w.temperature,onSet:async()=>{s("temperature");try{const r={temperature:w.temperature};await o.mutateAsync({agentId:t.id,update:r}),b(d=>({...d,temperature:w.temperature})),t.id===c&&i&&await i()}catch{}finally{s(null)}}}):e.jsx(ae,{value:u.temperature??w.temperature,label:a("ui.agents.settings.chat.temperature"),description:a("ui.agents.settings.chat.controls_randomness_in_responses_0_0_1"),min:0,max:1,step:.01,isSaving:n==="temperature",onChange:async r=>{s("temperature");try{const d={temperature:r};await o.mutateAsync({agentId:t.id,update:d}),t.id===c&&i&&await i()}catch{}finally{s(null)}}}),u.top_p===null?e.jsx(G,{label:a("ui.agents.settings.chat.top_p"),description:a("ui.agents.settings.chat.controls_cumulative_probability_of_tokens_to_sample"),defaultLabel:w.top_p,onSet:async()=>{s("top_p");try{const r={top_p:w.top_p};await o.mutateAsync({agentId:t.id,update:r}),b(d=>({...d,top_p:w.top_p})),t.id===c&&i&&await i()}catch{}finally{s(null)}}}):e.jsx(ae,{value:u.top_p??w.top_p,label:a("ui.agents.settings.chat.top_p"),description:a("ui.agents.settings.chat.controls_cumulative_probability_of_tokens_to_sample"),min:0,max:1,step:.01,isSaving:n==="top_p",onChange:async r=>{s("top_p");try{const d={top_p:r};await o.mutateAsync({agentId:t.id,update:d}),t.id===c&&i&&await i()}catch{}finally{s(null)}}}),u.top_k===null?e.jsx(G,{label:a("ui.agents.settings.chat.top_k"),description:a("ui.agents.settings.chat.limits_tokens_to_sample_from_at_each"),defaultLabel:w.top_k,onSet:async()=>{s("top_k");try{const r={top_k:w.top_k};await o.mutateAsync({agentId:t.id,update:r}),b(d=>({...d,top_k:w.top_k})),t.id===c&&i&&await i()}catch{}finally{s(null)}}}):e.jsx(ae,{value:u.top_k??w.top_k,label:a("ui.agents.settings.chat.top_k"),description:a("ui.agents.settings.chat.limits_tokens_to_sample_from_at_each"),min:1,max:100,step:1,isSaving:n==="top_k",onChange:async r=>{s("top_k");try{const d={top_k:r};await o.mutateAsync({agentId:t.id,update:d}),t.id===c&&i&&await i()}catch{}finally{s(null)}}}),u.seed===null?e.jsx(G,{label:a("ui.agents.settings.chat.seed"),description:a("ui.agents.settings.chat.random_number_seed_for_deterministic_generation"),defaultLabel:w.seed,onSet:async()=>{s("seed");try{const r={seed:w.seed};await o.mutateAsync({agentId:t.id,update:r}),b(d=>({...d,seed:w.seed})),t.id===c&&i&&await i()}catch{}finally{s(null)}}}):e.jsx(ne,{value:u.seed?.toString()||"",label:a("ui.agents.settings.chat.seed"),placeholder:a("ui.agents.settings.chat.random_number_seed_for_deterministic_generation_detail"),icon:e.jsx(Ee,{size:16}),isSaving:n==="seed",onSave:async r=>{s("seed");try{const d=r.trim()?Number.parseInt(r,10):void 0;if(r.trim()&&Number.isNaN(d)){ce(a("ui.agents.settings.chat.error.invalid_seed"));return}const m={seed:d};await o.mutateAsync({agentId:t.id,update:m}),t.id===c&&i&&await i()}catch{}finally{s(null)}}})]}),e.jsxs(Le,{title:a("ui.agents.settings.chat.repetition"),children:[u.frequency_penalty===null?e.jsx(G,{label:a("ui.agents.settings.chat.frequency_penalty"),description:a("ui.agents.settings.chat.reduces_repetition_by_lowering_likelihood_of_repeated"),defaultLabel:w.frequency_penalty,onSet:async()=>{s("frequency_penalty");try{const r={frequency_penalty:w.frequency_penalty};await o.mutateAsync({agentId:t.id,update:r}),b(d=>({...d,frequency_penalty:w.frequency_penalty})),t.id===c&&i&&await i()}catch{}finally{s(null)}}}):e.jsx(ae,{value:u.frequency_penalty??w.frequency_penalty,label:a("ui.agents.settings.chat.frequency_penalty"),description:a("ui.agents.settings.chat.reduces_repetition_by_lowering_likelihood_of_repeated"),min:-2,max:2,step:.01,isSaving:n==="frequency_penalty",onChange:async r=>{s("frequency_penalty");try{const d={frequency_penalty:r};await o.mutateAsync({agentId:t.id,update:d}),t.id===c&&i&&await i()}catch{}finally{s(null)}}}),u.presence_penalty===null?e.jsx(G,{label:a("ui.agents.settings.chat.presence_penalty"),description:a("ui.agents.settings.chat.increases_diversity_by_lowering_likelihood_of_prompt"),defaultLabel:w.presence_penalty,onSet:async()=>{s("presence_penalty");try{const r={presence_penalty:w.presence_penalty};await o.mutateAsync({agentId:t.id,update:r}),b(d=>({...d,presence_penalty:w.presence_penalty})),t.id===c&&i&&await i()}catch{}finally{s(null)}}}):e.jsx(ae,{value:u.presence_penalty??w.presence_penalty,label:a("ui.agents.settings.chat.presence_penalty"),description:a("ui.agents.settings.chat.increases_diversity_by_lowering_likelihood_of_prompt"),min:-2,max:2,step:.01,isSaving:n==="presence_penalty",onChange:async r=>{s("presence_penalty");try{const d={presence_penalty:r};await o.mutateAsync({agentId:t.id,update:d}),t.id===c&&i&&await i()}catch{}finally{s(null)}}})]}),e.jsxs(Le,{title:a("ui.agents.settings.chat.length_and_stopping"),children:[u.max_tokens===null?e.jsx(G,{label:a("ui.agents.settings.chat.max_tokens"),description:a("ui.agents.settings.chat.maximum_tokens_to_generate_in_response"),defaultLabel:w.max_tokens,onSet:async()=>{s("max_tokens");try{const r={max_tokens:w.max_tokens};await o.mutateAsync({agentId:t.id,update:r}),b(d=>({...d,max_tokens:w.max_tokens})),t.id===c&&i&&await i()}catch{}finally{s(null)}}}):e.jsx(ae,{value:u.max_tokens??w.max_tokens,label:a("ui.agents.settings.chat.max_tokens"),description:a("ui.agents.settings.chat.maximum_tokens_to_generate_in_response"),min:1,max:8192,step:1,isSaving:n==="max_tokens",onChange:async r=>{s("max_tokens");try{const d={max_tokens:r};await o.mutateAsync({agentId:t.id,update:d}),t.id===c&&i&&await i()}catch{}finally{s(null)}}}),u.stop===null?e.jsx(G,{label:a("ui.agents.settings.chat.stop_sequences"),description:a("ui.agents.settings.chat.sequences_that_will_cause_the_model_to"),defaultLabel:a("ui.agents.settings.chat.empty"),onSet:async()=>{s("stop");try{const r={stop:[]};await o.mutateAsync({agentId:t.id,update:r}),b(d=>({...d,stop:[]})),t.id===c&&i&&await i()}catch{}finally{s(null)}}}):e.jsx(ne,{value:u.stop?.join(`
|
|
32
|
-
`)||"",label:a("ui.agents.settings.chat.stop_sequences"),placeholder:a("ui.agents.settings.chat.enter_stop_sequences_one_per_line"),icon:e.jsx(Ee,{size:16}),multiline:!0,rows:3,isSaving:n==="stop",onSave:async r=>{s("stop");try{const d=r.split(`
|
|
33
|
-
`).map(y=>y.trim()).filter(y=>y.length>0),m={stop:d.length>0?d:void 0};await o.mutateAsync({agentId:t.id,update:m}),t.id===c&&i&&await i()}catch{}finally{s(null)}}})]})]})]})]})},ns=["investment","accounting","healthcare","legal","software","security","role_play","personal_assistance","education","marketing","sales","research","analysis","management","social_media","other"],be=t=>a("ui.common.forms.categories_input_chips.category",{category:t==="other"?"other_category":t}),is=({value:t,label:n,onChange:s,placeholder:o=a("ui.common.forms.categories_input_chips.add_category"),disabled:i=!1,icon:c})=>{const u=P(),[b,x]=l.useState(""),[j,f]=l.useState(!1),[k,r]=l.useState(0),d=l.useRef(null),m=l.useRef([]),y=l.useId(),v=l.useId(),S=l.useMemo(()=>{const _=b.trim().toLowerCase();return ns.filter(g=>!t.includes(g)&&(!_||be(g).toLowerCase().includes(_)))},[t,b,u]);l.useEffect(()=>{j&&m.current[k]?.scrollIntoView({block:"nearest"})},[k,j]);const C=_=>{t.includes(_)||s([...t,_]),x(""),f(!1),r(0),d.current?.focus()},z=_=>{x(_.target.value),r(0),f(!0)},N=_=>{const g=S.length;switch(_.key){case"ArrowDown":if(_.preventDefault(),g===0)break;j?r((k+1)%g):(r(0),f(!0));break;case"ArrowUp":if(_.preventDefault(),g===0)break;j?r((k-1+g)%g):(r(g-1),f(!0));break;case"Enter":j&&S[k]&&(_.preventDefault(),C(S[k]));break;case"Escape":j&&(_.preventDefault(),f(!1));break;case"Home":j&&(_.preventDefault(),r(0));break;case"End":j&&(_.preventDefault(),r(S.length-1));break}},T=_=>{s(t.filter(g=>g!==_)),r(0)},L=j&&S[k]?`${v}-option-${k}`:void 0;return e.jsxs("div",{children:[e.jsxs(le,{htmlFor:y,className:"mb-1.5 flex items-center gap-2 text-ink-muted",children:[c,n]}),e.jsxs("div",{className:$("flex min-h-11 flex-wrap items-center gap-2 rounded-sm border border-control bg-surface p-2","has-[input:focus-visible]:outline-solid has-[input:focus-visible]:outline-2","has-[input:focus-visible]:outline-accent has-[input:focus-visible]:outline-offset-2",i&&"border-hairline bg-sunken"),children:[t.map(_=>e.jsxs(it,{className:"gap-1 pe-1 text-ink",children:[be(_),e.jsx("button",{type:"button","aria-label":a("ui.common.forms.categories_input_chips.remove_category",{value:be(_)}),disabled:i,onClick:()=>T(_),className:$("rounded-xs text-ink-dim","transition-colors duration-fast ease-out-quart","hover:text-danger disabled:text-ink-disabled"),children:e.jsx(ot,{})})]},_)),e.jsxs(St,{open:j,onOpenChange:f,children:[e.jsx(It,{asChild:!0,children:e.jsx("input",{id:y,ref:d,type:"text",role:"combobox","aria-expanded":j,"aria-controls":v,"aria-autocomplete":"list","aria-activedescendant":L,autoComplete:"off",value:b,placeholder:o,disabled:i,"aria-label":n,onChange:z,onKeyDown:N,onClick:()=>{S.length>0&&f(!0)},className:$("min-w-20 flex-1 bg-transparent px-1 py-0.5 outline-none","text-body-sm text-ink placeholder:text-ink-dim","disabled:text-ink-disabled disabled:placeholder:text-ink-disabled")})}),e.jsx(Dt,{align:"start",sideOffset:4,onOpenAutoFocus:_=>_.preventDefault(),className:"max-h-60 w-(--radix-popover-trigger-width) overflow-y-auto p-1",children:e.jsx("div",{id:v,role:"listbox","aria-label":n,children:S.map((_,g)=>e.jsx("div",{id:`${v}-option-${g}`,ref:I=>{m.current[g]=I},role:"option","aria-selected":g===k,onMouseDown:I=>{I.preventDefault()},onMouseEnter:()=>r(g),onClick:()=>C(_),className:$("cursor-pointer rounded-sm px-3 py-1.5 font-medium text-body-sm",g===k?"bg-accent-wash":void 0,"text-ink"),children:be(_)},_))})})]})]}),t.length===0&&e.jsx("span",{className:"mt-1 ms-1 block text-ink-dim text-meta",children:a("ui.common.forms.categories_input_chips.no_categories_selected")})]})},os=({value:t,label:n,onChange:s,placeholder:o=a("ui.common.forms.tags_input_chips.add_tag"),disabled:i=!1,icon:c})=>{P();const[u,b]=l.useState(""),x=l.useRef(null),j=l.useId(),f=m=>{b(m.target.value)},k=()=>{const m=u.trim().toLowerCase();m&&!t.includes(m)&&s([...t,m]),b("")},r=m=>{m.key==="Enter"&&u.trim()?(m.preventDefault(),k()):m.key==="Backspace"&&!u&&t.length>0&&s(t.slice(0,-1))},d=m=>{s(t.filter(y=>y!==m))};return e.jsxs("div",{children:[e.jsxs(le,{htmlFor:j,className:"mb-1.5 flex items-center gap-2 text-ink-muted",children:[c,n]}),e.jsxs("div",{className:$("flex min-h-11 flex-wrap items-center gap-2 rounded-sm border border-control bg-surface p-2","has-[input:focus-visible]:outline-solid has-[input:focus-visible]:outline-2","has-[input:focus-visible]:outline-accent has-[input:focus-visible]:outline-offset-2",i&&"border-hairline bg-sunken"),children:[t.map(m=>e.jsxs(it,{className:"gap-1 pe-1 text-ink",children:[m,e.jsx("button",{type:"button","aria-label":a("ui.common.forms.tags_input_chips.remove_tag",{tag:m}),disabled:i,onClick:()=>d(m),className:$("rounded-xs text-ink-dim","transition-colors duration-fast ease-out-quart","hover:text-danger disabled:text-ink-disabled"),children:e.jsx(ot,{})})]},m)),e.jsx("input",{id:j,ref:x,type:"text",value:u,onChange:f,onKeyDown:r,placeholder:o,disabled:i,"aria-label":n,className:$("min-w-20 flex-1 bg-transparent px-1 py-0.5 outline-none","text-body-sm text-ink placeholder:text-ink-dim","disabled:text-ink-disabled disabled:placeholder:text-ink-disabled")}),u.trim()&&e.jsx(E,{variant:"ghost",size:"icon-sm","aria-label":a("ui.common.forms.tags_input_chips.add_tage0db29"),disabled:i,onClick:()=>{k(),x.current?.focus()},className:"text-accent hover:text-accent",children:e.jsx(rt,{})})]}),t.length===0&&!u&&e.jsx("span",{className:"mt-1 ms-1 block text-ink-dim text-meta",children:a("ui.common.forms.tags_input_chips.no_tags_added")})]})},rs=({selectedAgent:t,savingField:n,setSavingField:s,updateAgentMutation:o,refetchAgent:i,initialSelectedAgentId:c})=>{P();const{data:u,isLoading:b}=da(),[x,j]=l.useState("");l.useEffect(()=>{!b&&u?.values?j(t.hosting||u.values.hosting||""):b||j(t.hosting||"")},[t,u,b]);const[f,k]=l.useState(!1),[r,d]=l.useState(!1);return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Sa,{agentId:t.id},t.id),e.jsx(ne,{value:t.name,label:a("ui.agents.settings.general.agent_name"),placeholder:a("ui.agents.settings.general.enter_agent_name"),isSaving:n==="name",onSave:async m=>{if(!m.trim()){ce(a("ui.agents.settings.general.error.empty_name"));return}s("name");try{const y={name:m};await o.mutateAsync({agentId:t.id,update:y}),t.id===c&&i&&await i()}catch{}finally{s(null)}}}),e.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[e.jsx("div",{"data-tour-tag":"agent-settings-hosting-select",children:e.jsx(Wt,{value:t.hosting||(u?.values.hosting??""),isSaving:n==="hosting",onSave:async m=>{s("hosting"),j(m);try{const y={hosting:m,model:""};await o.mutateAsync({agentId:t.id,update:y}),t.id===c&&i&&await i()}catch{j(t.hosting||"")}finally{s(null)}},filterByCredentials:!0,allowDefault:!0},`hosting-select-${t.id}-${t.hosting||(u?.values.hosting??"default")}`)}),e.jsx("div",{"data-tour-tag":"agent-settings-model-select",children:x?e.jsx(Vt,{value:t.hosting?t.model||"":t.model||(u?.values.model_name??""),hostingId:x,isSaving:n==="model",allowDefault:!0,onSave:async m=>{s("model");try{const y={model:m};await o.mutateAsync({agentId:t.id,update:y}),t.id===c&&i&&await i()}catch{}finally{s(null)}}},`model-select-${t.id}-${x}-${t.model||(!t.hosting&&u?.values.model_name?u.values.model_name:"default")}`):e.jsxs("div",{className:"relative",children:[e.jsx(W,{content:a("ui.agents.settings.general.select_a_hosting_provider_first_and_then"),children:e.jsxs("div",{className:"mb-1.5 flex w-fit items-center gap-2 text-body-sm text-ink-muted",children:[e.jsx(Kt,{size:16,"aria-hidden":"true"}),a("ui.agents.settings.general.model")]})}),e.jsx("div",{className:"flex h-8 w-full items-center rounded-sm border border-control bg-surface px-3",children:e.jsx("span",{className:"truncate text-body-sm text-ink-disabled",children:a("ui.agents.settings.general.select_a_hosting_provider_first")})})]})})]}),e.jsxs("h2",{className:"mt-4 flex items-center gap-2 text-heading text-ink",children:[e.jsx(je,{size:16,className:"shrink-0 text-ink-dim"}),a("ui.agents.settings.general.agent_information")]}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ne,{value:t.description||"",label:a("ui.agents.settings.general.description"),placeholder:a("ui.agents.settings.general.enter_agent_description"),multiline:!0,rows:3,isSaving:n==="description",onSave:async m=>{s("description");try{const y={description:m};await o.mutateAsync({agentId:t.id,update:y}),t.id===c&&i&&await i()}catch{}finally{s(null)}}}),e.jsx(os,{value:t.tags||[],label:a("ui.agents.settings.general.tags"),placeholder:a("ui.agents.settings.general.add_tag"),disabled:f,onChange:async m=>{if(!(Array.isArray(t.tags)&&m.length===t.tags.length&&m.every((y,v)=>y===t.tags?.[v]))){k(!0);try{const y={tags:m};await o.mutateAsync({agentId:t.id,update:y}),t.id===c&&i&&await i()}catch{}finally{k(!1)}}}}),e.jsx(is,{value:t.categories||[],label:a("ui.agents.settings.general.categories"),placeholder:a("ui.agents.settings.general.add_category"),disabled:r,onChange:async m=>{if(!(Array.isArray(t.categories)&&m.length===t.categories.length&&m.every((y,v)=>y===t.categories?.[v]))){d(!0);try{const y={categories:m};await o.mutateAsync({agentId:t.id,update:y}),t.id===c&&i&&await i()}catch{}finally{d(!1)}}}}),e.jsxs(Qt,{children:[e.jsx(De,{label:e.jsxs(e.Fragment,{children:[e.jsx(Fa,{size:12,"aria-hidden":"true"}),a("ui.agents.settings.general.id")]}),value:e.jsx("span",{className:"font-mono text-mono-sm",children:t.id})}),e.jsx(De,{label:e.jsxs(e.Fragment,{children:[e.jsx(Gt,{size:12,"aria-hidden":"true"}),a("ui.agents.settings.general.created")]}),value:ma(t.created_date)}),e.jsx(De,{label:e.jsxs(e.Fragment,{children:[e.jsx(Qa,{size:12,"aria-hidden":"true"}),a("ui.agents.settings.general.version")]}),value:t.version})]})]})]})},ls=({selectedAgent:t,savingField:n,setSavingField:s,updateAgentMutation:o,refetchAgent:i,initialSelectedAgentId:c})=>(P(),e.jsxs("div",{"data-tour-tag":"agent-settings-security",children:[e.jsxs("h2",{className:"flex items-center gap-2 text-heading text-ink",children:[e.jsx(Ft,{size:16,className:"shrink-0 text-ink-dim"}),a("ui.agents.settings.security.security_instructions"),e.jsx(W,{content:a("ui.agents.settings.security.security_instructions_that_guide_the_agent_s"),children:e.jsx(E,{variant:"ghost",size:"icon-sm","aria-label":a("ui.agents.settings.security.about_security_instructions"),children:e.jsx(je,{})})})]}),e.jsx("p",{className:"mt-1 max-w-2xl text-body-sm text-ink-muted",children:a("ui.agents.settings.security.this_prompt_is_directed_to_the_ai")}),e.jsx("div",{className:"mt-4",children:e.jsx(ne,{value:t.security_prompt||"",label:"",placeholder:a("ui.agents.settings.security.enter_instructions_for_the_security_agent"),multiline:!0,rows:6,isSaving:n==="security_prompt",onSave:async u=>{s("security_prompt");try{const b={security_prompt:u};await o.mutateAsync({agentId:t.id,update:b}),t.id===c&&i&&await i()}catch{}finally{s(null)}}})})]})),cs=({selectedAgent:t,savingField:n,setSavingField:s,refetchAgent:o,initialSelectedAgentId:i})=>{P();const{data:c,isLoading:u}=_t(t.id),b=Xa(t.id),[x,j]=l.useState("");return l.useEffect(()=>{c!==void 0&&j(c)},[c]),e.jsxs("div",{"data-tour-tag":"agent-settings-system-prompt",children:[e.jsxs("h2",{className:"flex items-center gap-2 text-heading text-ink",children:[e.jsx(Ia,{size:16,className:"shrink-0 text-ink-dim"}),a("ui.agents.settings.system_prompt.agent_instructions"),e.jsx(W,{content:a("ui.agents.settings.system_prompt.system_instructions_that_define_the_agent_s"),children:e.jsx(E,{variant:"ghost",size:"icon-sm","aria-label":a("ui.agents.settings.system_prompt.about_agent_instructions"),children:e.jsx(je,{})})})]}),e.jsx("p",{className:"mt-1 max-w-2xl text-body-sm text-ink-muted",children:a("ui.agents.settings.system_prompt.define_the_agent_s_role_personality_or")}),e.jsx("div",{className:"mt-4",children:e.jsx(ne,{value:x,label:"",placeholder:u?a("ui.agents.settings.system_prompt.loading_system_prompt"):a("ui.agents.settings.system_prompt.enter_instructions_for_the_agent"),multiline:!0,rows:6,isSaving:n==="system_prompt",onSave:async f=>{s("system_prompt");try{await b.mutateAsync(f),t.id===i&&o&&await o()}finally{s(null)}}})})]})},us=({selectedAgent:t,refetchAgent:n,initialSelectedAgentId:s})=>{P();const[o,i]=l.useState(null),c=Yt();return e.jsx("div",{"data-tour-tag":"agent-settings-details-paper",className:"h-full overflow-hidden",children:t?e.jsx("div",{className:"h-full overflow-y-auto",children:e.jsxs("div",{className:"mx-auto flex w-full max-w-4xl flex-col gap-8 pb-8",children:[e.jsx(rs,{selectedAgent:t,savingField:o,setSavingField:i,updateAgentMutation:c,refetchAgent:n,initialSelectedAgentId:s}),e.jsx(cs,{selectedAgent:t,savingField:o,setSavingField:i,refetchAgent:n,initialSelectedAgentId:s}),e.jsx(ls,{selectedAgent:t,savingField:o,setSavingField:i,updateAgentMutation:c,refetchAgent:n,initialSelectedAgentId:s}),e.jsx(ss,{selectedAgent:t,savingField:o,setSavingField:i,updateAgentMutation:c,refetchAgent:n,initialSelectedAgentId:s})]})}):e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-8 text-center",children:[e.jsx(ze,{size:48,className:"text-ink-dim","aria-hidden":"true"}),e.jsx("h2",{className:"text-heading text-ink",children:a("ui.agents.settings.agent.no_agent_selected")}),e.jsx("p",{className:"max-w-md text-body-sm text-ink-muted",children:a("ui.agents.settings.agent.select_an_agent_from_the_list_on")})]})})},Re=ya()(_a(t=>({listings:{},remember:(n,s)=>{t(o=>({listings:{...o.listings,[n]:s}}))},forget:n=>{t(s=>{if(!(n in s.listings))return s;const o={...s.listings};return delete o[n],{listings:o}})}}),{name:"published-listings-storage"})),ds=t=>Re(n=>t?n.listings[t]??null:null),ms=400,ps=2,gs=t=>[...t].length>=ps;function hs(t){if(!t)return{state:"unknown",builtinName:null};if(t.available)return{state:"available",builtinName:null};const n=t.details?.builtin_name??null;return t.code==="name_taken"?{state:"taken",builtinName:null}:t.code==="name_reserved_builtin"?{state:"reserved",builtinName:n}:{state:"unknown",builtinName:null}}const xs=(t,n)=>{const s=t.trim(),o=lt(s,ms),i=n&&o===s&&gs(o)&&ja(o),c=xt({queryKey:["agent-name-availability",o],enabled:i,queryFn:async()=>(await Oe.getAgentNameAvailability(J.baseUrl,o)).result,retry:!1,staleTime:15e3,refetchOnWindowFocus:!1});return!i||c.isPending?{state:i?"checking":"idle",builtinName:null}:c.isError?{state:"unknown",builtinName:null}:hs(c.data)},bs=()=>{const t=bt();return pt({mutationFn:async({agentId:n,document:s,hubAgentId:o,target:i,policy:c})=>{if(!J.baseUrl)throw new Error("Local Operator API URL is not configured.");return o?Oe.republishAgentInstructionSet(J.baseUrl,n,o,s,i,c):Oe.publishAgentInstructionSet(J.baseUrl,n,s,i,c)},onSuccess:(n,s)=>{const o=n.result;o?.agent_id&&!s.target&&Re.getState().remember(s.agentId,{hubAgentId:o.agent_id,name:o.name,publishedAt:new Date().toISOString()}),o?.local_link_receipt&&t.invalidateQueries({queryKey:At}),s.target?za(t,s.target.tenantId):qa(t)},onError:n=>{console.error("Publishing an agent to the hub failed:",n)}})};function fs({agentName:t,published:n,targetIsOrg:s,targetDisplayName:o,hasListing:i}){return n?n.orgName?a("ui.agents.upload.title.published_org",{name:t,destination:n.orgName}):n.republished?a("ui.agents.upload.title.republished",{name:t}):a("ui.agents.upload.title.published_public",{name:t}):s?a("ui.agents.upload.title.publish_org",{name:t,destination:o}):i?a("ui.agents.upload.title.update_listing",{name:t}):a("ui.agents.upload.title.publish_public",{name:t})}const fe="public",jt=({open:t,onClose:n,agent:s,isAuthenticated:o,onSignInSuccess:i,onPublished:c})=>{const[u,b]=l.useState(!1),[x,j]=l.useState(""),[f,k]=l.useState(null),[r,d]=l.useState(null),[m,y]=l.useState(!1),v=l.useRef(null),S=l.useRef(null),C=Ue(),z=bs();P();const[N,T]=l.useState(Pe),L=l.useRef(null),_=l.useRef({open:!1,id:null}),g=ds(s?.id??null),I=ka(),q=va(I.data,"hub_links"),V=Jt(t&&q),ke=pa(),ue=wa(I.data,"radient_org"),ve=Oa(ue),de=o?Ta(ue,ke??null):null,{memberships:Y,isError:we}=Zt({enabled:t&&o&&ve}),Z=l.useMemo(()=>Da(Y),[Y]),A=l.useMemo(()=>Pa(Y),[Y]),[M,me]=l.useState(fe),h=M!==fe,O=(V.data?.links??[]).filter(p=>p.kind==="agent"&&p.local_id===s?.id),D=O.find(p=>p.visibility===(h?"org":"public")&&p.tenant_id===(h?M:null)),B=O.find(p=>p.link_id!==D?.link_id),K=V.data?.unresolved.some(p=>p.kind==="agent"&&p.local_id===s?.id),H=Z.find(p=>p.tenant_id===M),pe=h?H?.tenant_name?a("ui.hub.links.source_private",{organization:H.tenant_name}):a("ui.hub.links.source_unavailable"):a("ui.hub.links.source_public"),oe=Z.find(p=>p.tenant_id===M)?.tenant_name||"this organization",ge=l.useId(),he=l.useId(),{data:$e}=_t(t&&s?s.id:""),{data:Me}=ga(t);l.useEffect(()=>{t&&(!_.current.open||_.current.id!==(s?.id??null))&&j(s?.name??""),_.current={open:t,id:s?.id??null}},[t,s?.id,s?.name]),l.useEffect(()=>{t||(b(!1),k(null),d(null),y(!1),me(fe),T(Pe()),L.current=null)},[t]);const kt=l.useMemo(()=>(Me??[]).filter(p=>p.source==="builtin").map(p=>p.name),[Me]),Be=Ua(x,kt),He=xs(x,t&&o),X=l.useMemo(()=>{const p=Ra({name:x,description:s?.description??"",instructions:$e??null,tools:$a(s?.tags)});return Be&&p.unshift({field:"name",message:Ae({code:"name_reserved_builtin",message:""},{name:x,hubAgentId:null}).body}),p},[x,s?.description,s?.tags,$e,Be]),U=f?Ae(f,{name:x,hubAgentId:g?.hubAgentId??null}):null,ee=z.isPending,Ne=async p=>{if(!s||ee||X.length>0||h&&!H)return;k(null);const R=p?.asNewListing?null:D?.hub_id??(h?null:g?.hubAgentId??null),Ve=!!R;if(!(q&&(!V.isSuccess||B||K)))try{const Q={name:x.trim()},Ke=JSON.stringify({agent:s.id,document:Q,hubAgentId:R,target:M,policy:D?null:N}),Ce=L.current?.tuple===Ke?L.current:{tuple:Ke,id:crypto.randomUUID()};L.current=Ce;const te=(await z.mutateAsync({agentId:s.id,document:Q,hubAgentId:R,...q?{policy:D?{requestId:Ce.id,...D.remote_revision&&Ve?{expectedRemoteRevision:D.remote_revision}:{}}:{requestId:Ce.id,...N}}:{},target:h?{visibility:"org",tenantId:M}:void 0})).result,Qe={name:te?.name??x.trim(),hubAgentId:te?.agent_id??null,republished:Ve,orgName:h?oe:null,localPolicies:te?.local_link_receipt?Ea(te)?"complete":"pending":q?"pending":null};d(Qe),te&&c?.(te,Qe.republished)}catch(Q){k(ha(Q)?{code:Q.code,message:Q.message,details:Q.details}:{message:Na(Q,"The agent could not be published. Try again.")})}},We=p=>{switch(p){case"focus-name":k(null),requestAnimationFrame(()=>{v.current?.focus(),v.current?.select()});break;case"update-listing":{const R=f?.details?.existing_agent_id??g?.hubAgentId;R&&(n(),C(`/agent-hub/${R}`));break}case"install-builtin":{const R=f?.details?.builtin_name??He.builtinName;R&&(n(),C(`/agents?kind=agent&name=${encodeURIComponent(R)}`));break}case"edit-instructions":case"edit-agent":s&&(n(),C(`/agents/${s.id}`));break;case"publish-as-new":s&&Re.getState().forget(s.id),Ne({asNewListing:!0});break;case"sign-in":y(!0);break;case"refresh-hub":n(),C("/agent-hub");break;case"retry":Ne();break}},xe=s?.name??"",vt=fs({agentName:xe,published:r,targetIsOrg:h,targetDisplayName:oe,hasListing:!!g});l.useLayoutEffect(()=>{!f&&!r||S.current?.focus()},[f,r]);const wt=r?e.jsxs(e.Fragment,{children:[e.jsx(se,{onClick:n,"data-tour-tag":"upload-agent-dialog-cancel-button",children:a("ui.common.actions.close")}),r.hubAgentId&&e.jsx(_e,{onClick:()=>{n(),C(`/agent-hub/${r.hubAgentId}`)},children:a("ui.agents.upload.action.open_listing")})]}):U?e.jsxs(e.Fragment,{children:[e.jsx(se,{onClick:n,"data-tour-tag":"upload-agent-dialog-cancel-button",children:a("ui.common.actions.close")}),U.actions.map((p,R)=>R===0?e.jsx(_e,{onClick:()=>We(p),disabled:ee,children:Je[p]},p):e.jsx(se,{onClick:()=>We(p),disabled:ee,children:Je[p]},p))]}):e.jsxs(e.Fragment,{children:[e.jsx(se,{onClick:n,"data-tour-tag":"upload-agent-dialog-cancel-button",children:a("ui.common.actions.cancel")}),X.some(p=>p.field!=="name")&&e.jsx(se,{onClick:()=>{s&&(n(),C(`/agents/${s.id}`))},children:a("ui.agents.upload.action.edit_agent")}),o&&e.jsx(_e,{"data-testid":"publish-submit",onClick:()=>void Ne(),disabled:h&&!H||!u||X.length>0||!x.trim()||ee||q&&(!V.isSuccess||!!B||!!K),children:ee?"Publishing…":g&&!h?"Update listing":"Publish"})]});return e.jsx(gt,{open:t,onClose:n,title:vt,maxWidth:"sm",fullWidth:!0,actions:wt,dataTourTag:"upload-agent-dialog",dialogProps:{className:"outline-none"},children:e.jsxs("div",{ref:S,tabIndex:f||r?-1:void 0,className:$("flex flex-col gap-4",(f||r)&&"outline-none"),children:[o?r?e.jsxs(ye,{variant:"success","aria-live":"polite",children:[e.jsx(Se,{children:r.orgName?`Published to ${r.orgName}`:r.republished?"Listing updated":"Published to the hub"}),e.jsx(re,{children:r.orgName?`"${r.name}" is in ${r.orgName}'s shared agents as an instruction set. Its members can read and install it; nobody outside the organization can.`:r.republished?a("ui.agents.upload.published.republished",{name:r.name}):a("ui.agents.upload.published.listed",{name:r.name})}),e.jsx(re,{className:"text-ink-muted",children:a("ui.agents.upload.sign_in.nothing_left")})]}):U&&f?e.jsxs(ye,{variant:U.variant,role:"alert",children:[e.jsx(Se,{children:U.headline}),e.jsx(re,{children:U.body}),U.note&&e.jsx(re,{className:"text-ink-muted",children:U.note})]}):null:e.jsxs("div",{className:"flex flex-col items-center gap-6 text-center",children:[e.jsx("p",{className:"text-body text-ink",children:a("ui.agents.upload.sign_in.needed")}),e.jsx(Ye,{titleText:a("ui.agents.upload.sign_in.title_continue"),descriptionText:"",onSignInSuccess:i})]}),U&&m&&e.jsxs("div",{className:"flex flex-col items-center gap-6 text-center",children:[e.jsx("p",{className:"text-body text-ink",children:a("ui.agents.upload.sign_in.reauthenticate")}),e.jsx(Ye,{titleText:a("ui.agents.upload.sign_in.title_again"),descriptionText:"",onSignInSuccess:()=>{y(!1),k(null),i?.()}})]}),r?.localPolicies==="pending"&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:a("ui.hub.skills.policy_pending")}),!r&&q&&e.jsx("div",{className:"flex flex-col gap-3",children:V.isLoading?e.jsx("p",{className:"text-meta text-ink-muted",children:a("ui.hub.links.loading")}):V.error?e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:a("ui.hub.links.load_failed")}):B?e.jsx("p",{className:"text-body-sm text-warning",children:a("ui.hub.subscriptions.source_separation",{currentSource:Xt(B),newSource:pe})}):K?e.jsx("p",{className:"text-body-sm text-warning",children:a("ui.hub.links.source_unavailable")}):D?e.jsx(ea,{link:D}):e.jsx(La,{value:N,onChange:T,source:pe,item:x||xe,visibility:h?"org":"public",organization:h?oe:null,destinationKey:`${M}:${s?.id??""}`,canEnableAutoPush:!1,disabled:ee||!V.isSuccess})}),!r&&!U&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-body text-ink",children:h?`You are about to publish this agent's instruction set into ${oe}, where only its members can read and install it. What is published is what describes the agent:`:"You are about to publish this agent's instruction set to the public Agent Hub. What is published is what describes the agent:"}),e.jsxs("ul",{className:"list-disc space-y-1 ps-5 text-body text-ink-muted",children:[e.jsx("li",{children:a("ui.agents.upload.list.name")}),e.jsx("li",{children:a("ui.agents.upload.list.instructions")}),e.jsx("li",{children:a("ui.agents.upload.list.surface")})]}),e.jsx("p",{className:"text-body text-ink",children:h?`Nothing else leaves this machine: no conversation, no execution history, no memory or learnings, no plan, and no machine-specific configuration. ${oe}'s members can read and install what you publish; nobody outside it can.`:"Nothing else leaves this machine: no conversation, no execution history, no memory or learnings, no plan, and no machine-specific configuration. Anyone can read and install what you publish."}),Z.length>0||A.length>0?e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(le,{htmlFor:`${ge}-target`,children:a("ui.agents.upload.target.label")}),e.jsxs(Pt,{value:M,onValueChange:p=>{me(p),T(Pe()),L.current=null},children:[e.jsx(Lt,{id:`${ge}-target`,className:"w-full","data-testid":"publish-target",children:e.jsx(Et,{})}),e.jsxs(Tt,{children:[e.jsx(Ie,{value:fe,children:a("ui.hub.pages.scope.public")}),Z.map(p=>e.jsx(Ie,{value:p.tenant_id,children:p.tenant_name||"Organization"},p.tenant_id)),A.map(p=>e.jsxs(Ie,{value:p.tenant_id,disabled:!0,children:[p.tenant_name||a("ui.hub.pages.scope.org_label")," ",a("ui.agents.upload.target.upgrade")]},p.tenant_id))]})]}),e.jsx("p",{className:"text-meta text-ink-muted","data-testid":"publish-target-hint",children:A.length>0?`Sharing agents inside an organization is part of the Team plan. An owner of ${A.length===1?A[0].tenant_name||"this organization":"any of the organizations marked above"} can activate it in the Radient console.`:"Public hub publications are readable by anyone. An organization's agents are readable by its members only."})]}):de?e.jsx("p",{className:"text-meta text-ink-muted","data-testid":"publish-target-unavailable",children:de}):we?e.jsx("p",{className:"text-meta text-ink-muted","data-testid":"publish-target-failed",children:a("ui.agents.upload.target.orgs_unread")}):null,X.length>0&&e.jsxs(ye,{variant:"danger",children:[e.jsx(Se,{children:a("ui.agents.upload.error.cannot_publish")}),e.jsx("ul",{className:"list-disc space-y-1 ps-5",children:X.map(p=>e.jsx("li",{children:p.message},`${p.field}:${p.message}`))})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(le,{htmlFor:he,children:a("ui.agents.upload.field.name_label")}),e.jsx(nt,{id:he,ref:v,value:x,onChange:p=>j(p.target.value),autoComplete:"off",spellCheck:!1,"aria-invalid":X.some(p=>p.field==="name"),"aria-describedby":`${he}-hint`}),e.jsx("p",{id:`${he}-hint`,className:"text-meta text-ink-muted",children:a("ui.agents.upload.field.name_hint")}),!h&&ys(He)]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("span",{className:"flex h-5 shrink-0 items-center",children:e.jsx(Ot,{id:ge,name:"termsAgreement","data-testid":"publish-consent",checked:u,onCheckedChange:p=>b(p===!0)})}),e.jsxs(le,{htmlFor:ge,className:"block font-normal text-body text-ink",children:[a("ui.agents.upload.terms.lead")," ",e.jsx("a",{href:"https://radienthq.com/terms",target:"_blank",rel:"noopener noreferrer",className:"text-accent underline-offset-4 hover:text-accent-hover hover:underline",children:a("ui.agents.upload.terms.link")})," ",a("ui.agents.upload.terms.tail")]})]})]}),(r||U)&&xe&&e.jsxs("p",{className:"text-meta text-ink-muted",children:[a("ui.agents.upload.availability.agent_label")," ",xe]})]})})},ys=t=>{switch(t.state){case"checking":return e.jsx("p",{className:"text-meta text-ink-muted",children:a("ui.agents.upload.availability.checking")});case"available":return e.jsx("p",{className:"text-meta text-ink-muted",children:a("ui.agents.upload.availability.free")});case"taken":return e.jsx("p",{className:"text-meta text-ink",children:a("ui.agents.upload.availability.taken")});case"reserved":return e.jsx("p",{className:"text-meta text-ink-muted",children:t.builtinName?`The hub reserves "${t.builtinName}" for one of its built-in agents.`:"The hub reserves this name for one of its built-in agents."});default:return null}},_s=1200,js=({agent:t,isSelected:n,onSelectAgent:s,onChatWithAgent:o,onExportAgent:i,onAgentDeleted:c,onUploadAgentToHub:u})=>{P();const b=xa(t.id,void 0,32),x=t.description||a("ui.agents.navigation.sidebar.no_description");return e.jsxs("li",{className:"group relative",children:[e.jsxs("button",{type:"button",onClick:()=>s(t),"aria-current":n?"true":void 0,"data-tour-tag":"agent-list-item-button",className:$("flex w-full items-center gap-2 rounded-sm py-1.5 pe-9 ps-2 text-start","transition-colors duration-fast ease-out-quart",n?aa:"hover:bg-row-hover"),children:[e.jsxs(qt,{className:"size-8 shrink-0",children:[b?e.jsx(Ut,{src:b,alt:"",className:"lo-avatar-arrival"}):null,e.jsx(Rt,{children:e.jsx(ze,{size:16,"aria-hidden":!0})})]}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx(W,{content:t.name,side:"top",align:"start",children:e.jsx("span",{className:"block truncate font-medium text-body-sm text-ink",children:t.name})}),e.jsx(W,{content:x,side:"bottom",align:"start",children:e.jsx("span",{className:"block truncate text-meta text-ink-dim",children:x})})]})]}),e.jsx("div",{className:$("pointer-events-none absolute top-0 end-1 flex h-full items-center","opacity-0 transition-opacity duration-fast ease-out-quart","group-hover:pointer-events-auto group-hover:opacity-100","group-focus-within:pointer-events-auto group-focus-within:opacity-100"),children:e.jsx(W,{content:a("ui.agents.navigation.sidebar.options"),children:e.jsx("span",{children:e.jsx(Ja,{agentId:t.id,agentName:t.name,isAgentsPage:!0,onAgentDeleted:()=>c(t.id),onChatWithAgent:()=>o(t),onExportAgent:()=>i(t.id),onUploadAgentToHub:()=>u(t),buttonSx:{width:24,height:24,borderRadius:"6px",display:"flex",justifyContent:"center",alignItems:"center"}})})})})]})},ks=(t,n)=>t.isSelected===n.isSelected&&t.agent.id===n.agent.id&&t.agent.name===n.agent.name&&t.agent.description===n.agent.description&&t.onSelectAgent===n.onSelectAgent&&t.onChatWithAgent===n.onChatWithAgent&&t.onExportAgent===n.onExportAgent&&t.onAgentDeleted===n.onAgentDeleted&&t.onUploadAgentToHub===n.onUploadAgentToHub,vs=l.memo(js,ks),ws=({selectedAgentId:t,onSelectAgent:n})=>{const s=Ue();P();const[o,i]=l.useState(""),c=Ca(h=>h.openCreateAgentDialog),u=lt(o.trim(),250),[b,x]=l.useState(!1),j=50,[f,k]=l.useState(!1),[r,d]=l.useState(null),{isAuthenticated:m}=ht(),y=l.useMemo(()=>qe(J.baseUrl),[]),v=ct(),{page:S,setPage:C}=es(),{data:z,isLoading:N,isError:T,refetch:L}=ta(S,j,0,u||void 0,"created_date","desc"),_=z?.agents||[],g=z?.total||0,{data:I}=ut(t&&!_.find(h=>h.id===t)?t:void 0),q=l.useMemo(()=>{const h=[..._];return I&&!h.find(O=>O.id===I.id)&&h.push(I),h.sort((O,D)=>new Date(D.created_date).getTime()-new Date(O.created_date).getTime()),h},[_,I]),V=l.useCallback(h=>{C(h)},[C]),ke=l.useCallback(h=>{n(h)},[n]),ue=l.useCallback(()=>{x(!0)},[]),ve=l.useCallback(()=>{x(!1)},[]),de=l.useCallback(async h=>{try{const O=await v.mutateAsync(h),D=q.find(pe=>pe.id===h),B=D?D.name.replace(/\s+/g,"-").toLowerCase():h,K=URL.createObjectURL(O),H=document.createElement("a");H.href=K,H.download=`${B}-export.zip`,document.body.appendChild(H),H.click(),URL.revokeObjectURL(K),document.body.removeChild(H)}catch(O){console.error("Failed to export agent:",O)}},[q,v]),Y=l.useCallback(h=>{d(h),k(!0)},[]),we=l.useCallback(()=>{k(!1),d(null)},[]),Z=l.useCallback(async h=>{try{const D=((await L()).data?.agents||[]).find(K=>K.id===h);if(D){n(D);return}const B=await y.agents.getAgent(h);B.status<400&&B.result&&n(B.result)}catch(O){console.error("Error selecting newly created agent:",O)}},[n,L,y]),A=l.useCallback(h=>{ft.getState().stageDraft({kind:"agent",name:h.name}),s("/chat")},[s]),M=l.useCallback(h=>{L(),s("/agents")},[t,L,s]),me=l.useCallback(h=>{Y(h)},[Y]);return e.jsxs("div",{"data-glass-region":"page-sidebar",className:"panel-top-pad flex h-full w-full flex-col overflow-hidden bg-surface",children:[e.jsx(as,{title:a("ui.agents.navigation.sidebar.title"),searchQuery:o,onSearchChange:h=>i(h),onNewAgentClick:c,onImportAgentClick:ue,importAgentTooltip:a("ui.agents.navigation.sidebar.import_hint")}),N?e.jsx("div",{className:"flex flex-1 items-center justify-center",children:e.jsx(st,{size:"lg",label:a("ui.agents.navigation.sidebar.loading")})}):T?e.jsxs(ye,{variant:"danger",role:"alert",className:"m-4 w-auto",children:[e.jsx(re,{children:a("ui.agents.navigation.sidebar.error")}),e.jsx(E,{variant:"ghost",size:"sm",className:"self-start",onClick:()=>L(),children:a("ui.agents.navigation.sidebar.retry")})]}):q.length===0&&!N?e.jsx("p",{className:"p-6 text-center text-body-sm text-ink-muted",children:o?a("ui.agents.navigation.sidebar.search_empty"):a("ui.agents.navigation.sidebar.empty")}):e.jsx(zt,{delayDuration:_s,skipDelayDuration:0,children:e.jsx("ul",{className:"flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto p-2",children:q.map(h=>e.jsx(vs,{agent:h,isSelected:t===h.id||I?.id===h.id,onSelectAgent:ke,onChatWithAgent:A,onExportAgent:de,onAgentDeleted:M,onUploadAgentToHub:me},h.id))})}),e.jsx(ts,{open:b,onClose:ve,onAgentImported:Z}),g>0&&e.jsx(Za,{page:S,count:Math.max(1,Math.ceil(g/j)),onChange:V}),e.jsx(jt,{open:f,onClose:we,agent:r,isAuthenticated:m})]})},Ns=l.memo(ws),Ks=()=>{P();const{agentId:t,navigateToAgent:n}=sa(),s=Ue(),{isAuthenticated:o}=ht(),[i,c]=l.useState(!1),u=ct(),{setLastAgentsPageAgentId:b,getLastAgentId:x}=dt(),j=t||x("agents"),{data:f,refetch:k}=ut(j||void 0);l.useEffect(()=>{t&&b(t)},[t,b]);const r=async()=>{if(f)try{const v=await u.mutateAsync(f.id),S=URL.createObjectURL(v),C=document.createElement("a");C.href=S,C.download=`${f.name.replace(/\s+/g,"-").toLowerCase()}-lo-agent.zip`,document.body.appendChild(C),C.click(),URL.revokeObjectURL(S),document.body.removeChild(C)}catch(v){console.error("Failed to export agent:",v)}},d=()=>{c(!0)},m=()=>{c(!1)},y=v=>{b(v.id),n(v.id,"agents")};return e.jsxs("div",{"data-glass-split":"",className:"panel-flush flex min-h-0 flex-1 overflow-hidden",children:[e.jsx("div",{className:"h-full w-70 shrink-0",children:e.jsx(Ns,{selectedAgentId:f?.id,onSelectAgent:y})}),e.jsx("div",{"data-glass-region":"canvas-content",className:"panel-top-pad h-full grow overflow-hidden",children:e.jsxs("div",{className:"flex h-full flex-col gap-8 p-4 sm:p-6 lg:p-8",children:[e.jsx("div",{className:"mx-auto w-full max-w-4xl",children:e.jsx(Nt,{title:a("ui.agents.navigation.legacy.title"),icon:ze,subtitle:a("ui.agents.navigation.legacy.subtitle"),children:f&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(Xe,{children:[e.jsx(et,{asChild:!0,children:e.jsx(E,{"data-tour-tag":"upload-to-hub-header-button",variant:"secondary",size:"icon","aria-label":a("ui.agents.navigation.legacy.more_actions"),className:"@min-[400px]:hidden",children:e.jsx(ba,{"aria-hidden":"true"})})}),e.jsxs(tt,{align:"end",className:"min-w-45",children:[e.jsxs(F,{disabled:u.isPending,onSelect:r,children:[e.jsx(Fe,{"aria-hidden":"true"}),e.jsx("span",{children:a("ui.agents.navigation.legacy.export")})]}),e.jsxs(F,{onSelect:d,children:[e.jsx(Te,{"aria-hidden":"true"}),e.jsx("span",{children:a("ui.agents.navigation.legacy.upload")})]})]})]}),e.jsxs(E,{variant:"secondary",onClick:r,disabled:u.isPending,className:"hidden @min-[400px]:inline-flex",children:[e.jsx(Fe,{"aria-hidden":"true"}),a("ui.agents.navigation.legacy.export")]}),e.jsxs(E,{"data-tour-tag":"upload-to-hub-header-button","data-tour-action":"open-upload-dialog",variant:"secondary",onClick:d,className:"hidden @min-[400px]:inline-flex",children:[e.jsx(Te,{"aria-hidden":"true"}),a("ui.agents.navigation.legacy.upload")]}),e.jsx(W,{content:a("ui.agents.navigation.legacy.chat_named",{name:f.name||a("ui.agents.navigation.legacy.unnamed_agent")}),children:e.jsxs(E,{variant:"primary",onClick:()=>{ft.getState().stageDraft({kind:"agent",name:f.name}),s("/chat")},children:[e.jsx(mt,{"aria-hidden":"true"}),a("ui.agents.navigation.legacy.chat")]})})]})})}),e.jsx("div",{className:"min-h-0 grow overflow-hidden",children:e.jsx(us,{selectedAgent:f??null,refetchAgent:k,initialSelectedAgentId:t})})]})}),f&&e.jsx(jt,{open:i,onClose:m,agent:f,isAuthenticated:o})]})};export{Ks as LegacyAgentsPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,b as e,a,S as i}from"./chunk-AEK57VVT-Bt8NwGtc.js";import{_ as s}from"./mermaid.core-ZnA0Lmkj.js";import"./chunk-RZ5BOZE2-BjDeLAwH.js";import"./conversation-input-sync-D9Xccwx1.js";import"./index-C5MuLj2j.js";import"./messages-BdH-KMeX.js";import"./appearance-B-Sdp9IA.js";import"./roles-D1pcbxAx.js";import"./error-boundary-DfFcgZm0.js";var f={parser:a,get db(){return new i(2)},renderer:e,styles:r,init:s(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{f as diagram};
|