local-operator-ui 0.31.5 → 0.31.7
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 +151 -9
- package/out/renderer/assets/{_basePickBy-BFnTyl9Q.js → _basePickBy-CM6CmIFp.js} +1 -1
- package/out/renderer/assets/{_baseUniq-DD9jcRtU.js → _baseUniq-C_PbHIMV.js} +1 -1
- package/out/renderer/assets/agent-details-page-DC0sQky0.js +6 -0
- package/out/renderer/assets/agent-hub-page-CBrJcFHF.js +6 -0
- package/out/renderer/assets/agents-page-CTw-MYYr.js +2 -0
- package/out/renderer/assets/arc-DrUEk02e.js +1 -0
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-7e2mo6tq.js → architectureDiagram-IEHRJDOE-CW6LvKX9.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-BVljD84R.js → blockDiagram-JOT3LUYC-4ogTNs12.js} +1 -1
- package/out/renderer/assets/{book-open-B8nHgs3o.js → book-open-CNgko0U5.js} +1 -1
- package/out/renderer/assets/browser-page-iMdnjKCm.js +1 -0
- package/out/renderer/assets/{browser-webauthn-prompt-BiNyKO73.js → browser-webauthn-prompt-C5PLWNNM.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-JwdJCFiM.js → c4Diagram-VJAJSXHY-C9J6_WCU.js} +1 -1
- package/out/renderer/assets/channel-C3fiRwpT.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-ysuKUzF3.js → chunk-4BMEZGHF-S_BSO-Hr.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-DsztjjTP.js → chunk-A2AXSNBT-CVy8PtwG.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-pv5-Z61i.js → chunk-AEK57VVT-B38TMTuJ.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-B0HKfeJ8.js → chunk-D6G4REZN-8nX93svh.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-DNjaGyn6.js → chunk-RZ5BOZE2-BgbNMOZE.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-CB3yOZ7o.js → chunk-XZIHB7SX-BNpmrMrQ.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-C4j3K9wg.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-C4j3K9wg.js +1 -0
- package/out/renderer/assets/clone-D0rpLafB.js +1 -0
- package/out/renderer/assets/{console-mirror-BoykuSNB.js → console-mirror-DjoNpI7u.js} +1 -1
- package/out/renderer/assets/{consoleCapture-Cujhy7_W.js → consoleCapture-BTYJP9Fs.js} +1 -1
- package/out/renderer/assets/{dagre-OKDRZEBW-DscYjoQb.js → dagre-OKDRZEBW-BCX_miAW.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-MR2_cP2x.js → diagram-SSKATNLV-CAzJv9lq.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-BmkFh4Vx.js → diagram-VNBRO52H-DBFKrI1R.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-D07ZEVLp.js → erDiagram-Q7BY3M3F-BMv_jdkl.js} +1 -1
- package/out/renderer/assets/error-boundary-Be38BRVp.js +126 -0
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-DvEjarQP.js → flowDiagram-4HSFHLVR-CVkQHh1o.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-D5UFT4S7.js → ganttDiagram-APWFNJXF-Ct36PMFY.js} +3 -3
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-DH2UEbHf.js → gitGraphDiagram-7IBYFJ6S-CFytZqHN.js} +1 -1
- package/out/renderer/assets/{graph-BKMaU8e_.js → graph-CTLrBVeK.js} +1 -1
- package/out/renderer/assets/index-BjeBA__i.css +1 -0
- package/out/renderer/assets/{index-DyfVjYXR.js → index-C7KtPkib.js} +393 -388
- package/out/renderer/assets/{index-D4l3Ha6i.js → index-DWyjbOQ1.js} +1 -1
- package/out/renderer/assets/{index-BZWSvhnc.js → index-DuQnzBvj.js} +1 -1
- package/out/renderer/assets/{infoDiagram-PH2N3AL5-BB9p2nRT.js → infoDiagram-PH2N3AL5-B2VN0HcS.js} +1 -1
- package/out/renderer/assets/{installer-1ycbb4_E.js → installer-DOOu7eM6.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-Dt2T-pPF.js → journeyDiagram-U35MCT3I-EeQ9FZU_.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-BxdASKeG.js → kanban-definition-NDS4AKOZ-CWx17q1q.js} +1 -1
- package/out/renderer/assets/{layout-BOJV8F98.js → layout-DxijCKSW.js} +1 -1
- package/out/renderer/assets/legacy-agents-page-DKwZ9IUL.js +38 -0
- package/out/renderer/assets/{mermaid.core-Dm5FgUKb.js → mermaid.core-BROGXuWS.js} +5 -5
- package/out/renderer/assets/mesh-page-ljmpYH3c.js +1 -0
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-C54cCZAD.js → mindmap-definition-ALO5MXBD-MJVwWrDq.js} +1 -1
- package/out/renderer/assets/org-surface-gate-BeVNIdZG.js +1 -0
- package/out/renderer/assets/{page-header-DtDPxJCD.js → page-header-BXIWLsA1.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-CrhdJ9uV.js → pieDiagram-IB7DONF6-Bdk5nKMy.js} +2 -2
- package/out/renderer/assets/projects-page-qaSb7T1c.js +11 -0
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-BWSQJ0gX.js → quadrantDiagram-7GDLP6J5-CuC3CzS2.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-CJpp5uw3.js → radar-MK3ICKWK-D5QncMMi.js} +1 -1
- package/out/renderer/assets/radient-auth-buttons-CD8VvexI.js +1 -0
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-B7hVsPNs.js → requirementDiagram-KVF5MWMF-CIBLY5OK.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-BJT1eAxQ.js → sankeyDiagram-QLVOVGJD-CfkXerpy.js} +1 -1
- package/out/renderer/assets/{schedules-page-Br3MWcWr.js → schedules-page-DHSDg1Cx.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-DxQHWkSx.js → sequenceDiagram-X6HHIX6F-C7qAHp50.js} +1 -1
- package/out/renderer/assets/settings-page-B0Q3AzNJ.js +307 -0
- package/out/renderer/assets/settings-section-BeU3N8-t.js +6 -0
- package/out/renderer/assets/{stateDiagram-DGXRK772-7zKxJIA5.js → stateDiagram-DGXRK772-DGrpcP97.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-BtHrKykB.js +1 -0
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-CKvl8Sf0.js → timeline-definition-BDJGKUSR-DAxKBrN7.js} +1 -1
- package/out/renderer/assets/use-download-agent-mutation-BWvEVFd-.js +61 -0
- package/out/renderer/assets/use-memberships-query-D1ABZPRc.js +1 -0
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-B2w5N_2D.js → xychartDiagram-VJFVF3MP-c8KzKHoZ.js} +1 -1
- package/out/renderer/console-capture.html +4 -4
- package/out/renderer/index.html +5 -5
- package/out/renderer/installer.html +4 -4
- package/package.json +2 -2
- package/out/renderer/assets/agent-details-page-G90FKyVP.js +0 -6
- package/out/renderer/assets/agent-hub-page-BaU9D2Uf.js +0 -6
- package/out/renderer/assets/agents-page-BWmJb3M1.js +0 -2
- package/out/renderer/assets/arc-D4G69weg.js +0 -1
- package/out/renderer/assets/browser-page-Dc7F-WKs.js +0 -1
- package/out/renderer/assets/channel-DY5WkW10.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-mWo2wa6Q.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-mWo2wa6Q.js +0 -1
- package/out/renderer/assets/clone-Cbm34QyD.js +0 -1
- package/out/renderer/assets/compact-pagination-CEfQ3P1V.js +0 -1
- package/out/renderer/assets/error-boundary-BX3Jjofp.js +0 -126
- package/out/renderer/assets/index-YlW7OZrX.css +0 -1
- package/out/renderer/assets/legacy-agents-page-DlUvUwjx.js +0 -38
- package/out/renderer/assets/projects-page-DRQqnIMU.js +0 -11
- package/out/renderer/assets/publication-validation-Cke6xOnn.js +0 -1
- package/out/renderer/assets/radient-auth-buttons-DPiKAtaZ.js +0 -6
- package/out/renderer/assets/settings-page-Cz2ODzjH.js +0 -307
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-3TyB4Xbk.js +0 -1
- package/out/renderer/assets/use-download-agent-mutation-yItIUILb.js +0 -61
- /package/out/renderer/assets/{index-hIJSZMtz.js → index-C-P4UaBn.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,b as e,a,S as s}from"./chunk-AEK57VVT-pv5-Z61i.js";import{_ as i}from"./mermaid.core-Dm5FgUKb.js";import"./chunk-RZ5BOZE2-DNjaGyn6.js";import"./index-DyfVjYXR.js";import"./index-hIJSZMtz.js";import"./error-boundary-BX3Jjofp.js";import"./console-mirror-BoykuSNB.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import{c as d}from"./error-boundary-BX3Jjofp.js";import{t as q,c as H,n as K,a as z,g as Q,e as V,h as D,i as N,j as C,f as S}from"./en-US-BkS8Ixxl.js";import{j as i,c as b,r as Y}from"./index-hIJSZMtz.js";import{b5 as $,b6 as B,U as Z,b7 as G,b8 as W,b9 as h,am as A,g as E,ba as X,aA as J,f as _,ar as M,h as ee,as as I,bb as te,bc as F,bd as L,be as ne}from"./index-DyfVjYXR.js";import{B as ae}from"./book-open-B8nHgs3o.js";import{l as se}from"./publication-validation-Cke6xOnn.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 oe=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],re=d("briefcase",oe);/**
|
|
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 ie=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],ce=d("chart-no-axes-column",ie);/**
|
|
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 ue=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],le=d("clipboard-list",ue);/**
|
|
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 de=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],he=d("earth",de);/**
|
|
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 me=[["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]],fe=d("file-question",me);/**
|
|
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 ye=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],ge=d("flask-conical",ye);/**
|
|
32
|
-
* @license lucide-react v0.507.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const pe=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],ke=d("graduation-cap",pe);/**
|
|
37
|
-
* @license lucide-react v0.507.0 - ISC
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the ISC license.
|
|
40
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const xe=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]],we=d("heart-pulse",xe);/**
|
|
42
|
-
* @license lucide-react v0.507.0 - ISC
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the ISC license.
|
|
45
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const be=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],Be=d("heart",be);/**
|
|
47
|
-
* @license lucide-react v0.507.0 - ISC
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the ISC license.
|
|
50
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const Ae=[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]],_e=d("megaphone",Ae);/**
|
|
52
|
-
* @license lucide-react v0.507.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const Me=[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]],je=d("scale",Me);/**
|
|
57
|
-
* @license lucide-react v0.507.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const ve=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],qe=d("shopping-cart",ve);function ze(e,t){const o=+q(e)-+q(t);return o<0?-1:o>0?1:o}function De(e){return H(e,Date.now())}function Ne(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function Ce(e,t,o){const n=Q(),a=o?.locale??n.locale??V,s=ze(e,t);if(isNaN(s))throw new RangeError("Invalid time value");const r=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:s}),[f,g]=K(o?.in,...s>0?[t,e]:[e,t]),c=Ne("round"),u=g.getTime()-f.getTime(),p=u/S,P=z(g)-z(f),k=(u-P)/S,U=o?.unit;let m;if(p<1?m="second":p<60?m="minute":p<D?m="hour":k<N?m="day":k<C?m="month":m="year",m==="second"){const l=c(u/1e3);return a.formatDistance("xSeconds",l,r)}else if(m==="minute"){const l=c(p);return a.formatDistance("xMinutes",l,r)}else if(m==="hour"){const l=c(p/60);return a.formatDistance("xHours",l,r)}else if(m==="day"){const l=c(k/D);return a.formatDistance("xDays",l,r)}else if(m==="month"){const l=c(k/N);return l===12&&U!=="month"?a.formatDistance("xYears",1,r):a.formatDistance("xMonths",l,r)}else{const l=c(k/C);return a.formatDistance("xYears",l,r)}}function Ze(e,t){return Ce(e,De(e),t)}const O={investment:{icon:i.jsx(re,{size:14,"aria-hidden":"true"}),label:"Investment"},accounting:{icon:i.jsx(ae,{size:14,"aria-hidden":"true"}),label:"Accounting"},healthcare:{icon:i.jsx(we,{size:14,"aria-hidden":"true"}),label:"Healthcare"},legal:{icon:i.jsx(je,{size:14,"aria-hidden":"true"}),label:"Legal"},software:{icon:i.jsx(W,{size:14,"aria-hidden":"true"}),label:"Software"},security:{icon:i.jsx(G,{size:14,"aria-hidden":"true"}),label:"Security"},role_play:{icon:i.jsx(Z,{size:14,"aria-hidden":"true"}),label:"Role play"},personal_assistance:{icon:i.jsx(B,{size:14,"aria-hidden":"true"}),label:"Personal assistance"},education:{icon:i.jsx(ke,{size:14,"aria-hidden":"true"}),label:"Education"},marketing:{icon:i.jsx(_e,{size:14,"aria-hidden":"true"}),label:"Marketing"},sales:{icon:i.jsx(qe,{size:14,"aria-hidden":"true"}),label:"Sales"},research:{icon:i.jsx(ge,{size:14,"aria-hidden":"true"}),label:"Research"},analysis:{icon:i.jsx(ce,{size:14,"aria-hidden":"true"}),label:"Analysis"},management:{icon:i.jsx(le,{size:14,"aria-hidden":"true"}),label:"Management"},social_media:{icon:i.jsx(he,{size:14,"aria-hidden":"true"}),label:"Social media"},other:{icon:i.jsx(fe,{size:14,"aria-hidden":"true"}),label:"Other"}};function x(e){const t=e.split("_").join(" ");return t.charAt(0).toUpperCase()+t.slice(1)}const Se=e=>O[e]??{icon:i.jsx($,{size:14,"aria-hidden":"true"}),label:x(e)},T="inline-flex min-h-5.5 items-center rounded-full border border-hairline bg-sunken px-2 text-meta leading-none",Ge=({tags:e,categories:t,className:o})=>{if((!e||e.length===0)&&(!t||t.length===0))return null;const n=new Set((t??[]).map(s=>(O[s]?.label??x(s)).toLowerCase())),a=(e??[]).filter(s=>!n.has(x(s).toLowerCase()));return i.jsxs("div",{className:b("relative flex flex-wrap items-center gap-1.5 overflow-hidden",o),"data-testid":"agent-tags-and-categories",children:[t?.map(s=>{const r=Se(s);return i.jsxs("span",{className:b(T,"gap-1 font-medium text-ink-muted"),children:[r.icon,r.label]},s)}),a.map(s=>i.jsxs("span",{className:b(T,"gap-1 font-normal text-ink-dim"),children:[i.jsx($,{size:12,"aria-hidden":"true"}),x(s)]},s))]})};function y(){return crypto.randomUUID()}async function Ie(e=1,t=20,o){const n={page:e,per_page:t};if(o)for(const[a,s]of Object.entries(o))s&&(n[a]=s);return h({operation:"agents.list",query:n})}async function We(e){return h({operation:"agents.get",agentId:e})}async function Xe(e){return h({operation:"agents.delete",agentId:e,requestId:y(),confirmed:!0})}async function Le(e){return h({operation:"agents.like",agentId:e,requestId:y()})}async function Te(e){return h({operation:"agents.unlike",agentId:e,requestId:y(),confirmed:!0})}async function $e(e){return h({operation:"agents.favourite",agentId:e,requestId:y()})}async function Ee(e){return h({operation:"agents.unfavourite",agentId:e,requestId:y(),confirmed:!0})}async function Je(e,t){return h({operation:"comments.create",agentId:e,payload:t,requestId:y()})}async function et(e,t=1,o=20){return h({operation:"comments.list",agentId:e,query:{page:t,per_page:o}})}async function tt(e,t,o){return h({operation:"comments.update",agentId:e,commentId:t,payload:o,requestId:y()})}async function nt(e,t){return h({operation:"comments.delete",agentId:e,commentId:t,requestId:y(),confirmed:!0})}async function Fe(e){return h({operation:"agents.statuses",query:{agent_ids:e.join(",")}})}const j={all:["agent-statuses"],page:e=>[...j.all,"page",[...e]]},Oe=e=>[...new Set(e)].sort(),at=({agentIds:e,enabled:t=!0})=>{const{isAuthenticated:o}=A(),n=e.join(","),a=Y.useMemo(()=>Oe(e),[n]),s=E({queryKey:j.page(a),queryFn:async()=>(await Fe(a)).result?.statuses??{},enabled:t&&o&&a.length>0,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:!1});return{...s,statuses:s.data??{},isKnown:s.isSuccess}},st=(e,t,o)=>o?e&&t[o]!==void 0:!1,R=(e,t,o)=>{e.setQueriesData({queryKey:j.all},n=>{if(!n)return n;const a=n[t]??{liked:!1,favourited:!1};return{...n,[t]:{...a,...o}}})},Re="download_count",w={all:["public-agents"],list:e=>[...w.all,"list",{page:e.page,perPage:e.perPage,categories:e.categories?.join(",")??void 0,name:e.name??void 0,description:e.description??void 0,sort:e.sort,order:e.order}]},ot=e=>e.invalidateQueries({queryKey:w.all}),rt=({page:e=1,perPage:t=20,enabled:o=!0,categories:n,name:a,description:s,sort:r=Re,order:f="desc"}={})=>{const g={page:e,perPage:t,categories:n,name:a,description:s,sort:r,order:f},c=E({queryKey:w.list(g),queryFn:async()=>{const u={};return n&&n.length>0&&(u.categories=n.join(",")),a&&(u.name=a),s&&(u.description=s),u.sort=r,u.order=f,await Ie(e,t,u)},select:u=>u.result,enabled:o,retry:J,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,placeholderData:X});return{...c,agents:c.data?.records,isRefreshing:c.isFetching&&c.data!==void 0,pagination:c.data?{page:c.data.page,perPage:c.data.per_page,totalPages:c.data.total_pages,totalRecords:c.data.total_records}:void 0}},v=(e,{agentId:t,field:o,delta:n})=>{e.setQueriesData({queryKey:w.all},a=>{if(!a)return a;const s=a.result?.records??[];return s.some(r=>r.id===t)?{...a,result:{...a.result,records:s.map(r=>r.id===t?{...r,[o]:Math.max(0,(r[o]??0)+n)}:r)}}:a})},it=()=>{const e=_(),{isAuthenticated:t}=A();return M({mutationFn:async({agentId:n,isCurrentlyFavourited:a})=>{if(!t)throw new Error("Authentication required to favourite/unfavourite an agent.");if(!n)throw new Error("Agent ID is required.");return a?(await Ee(n),{favourited:!1,changed:!0}):{favourited:!0,changed:(await $e(n)).result?.already_favourited!==!0}},onSuccess:({favourited:n,changed:a},s)=>{R(e,s.agentId,{favourited:n}),a&&v(e,{agentId:s.agentId,field:"favourite_count",delta:n?1:-1})}})},ct=()=>{const e=_(),{isAuthenticated:t}=A();return M({mutationFn:async({agentId:n,isCurrentlyLiked:a})=>{if(!t)throw new Error("Authentication required to like/unlike an agent.");if(!n)throw new Error("Agent ID is required.");return a?(await Te(n),{liked:!1,changed:!0}):{liked:!0,changed:(await Le(n)).result?.already_liked!==!0}},onSuccess:({liked:n,changed:a},s)=>{R(e,s.agentId,{liked:n}),a&&v(e,{agentId:s.agentId,field:"like_count",delta:n?1:-1})}})},Pe=(e,t)=>{const o=[];for(const[,n]of e.getQueriesData({queryKey:F}))for(const a of n?.agents??[])a.id!==t&&o.push(a.name);return o},ut=()=>{const e=_(),t=ee();return M({mutationFn:async({agentId:n})=>{if(!L.baseUrl)throw new Error("Local Operator API URL is not configured.");return ne.downloadAgentFromRadient(L.baseUrl,n)},onSuccess:(n,a)=>{const s=n.result,r=s?.name?.trim()||a.agentName?.trim()||"Agent",f=s?.renamed_from?.trim()||null,g=s?.id?se(r,Pe(e,s.id)):null;f?I(`Downloaded "${r}" — you already have an agent called "${f}".`):g?te(`Downloaded "${r}". You already have an agent called "${g}", so two agents now answer to that name and either may be picked. Rename one of them.`):I(`Downloaded "${r}" from the hub.`),e.invalidateQueries({queryKey:F}),v(e,{agentId:a.agentId,field:"download_count",delta:1});const c=n.result;c?.id?t(`/chat/${c.id}`):console.warn("Downloaded agent ID not found in response, cannot navigate to chat.")}})};export{Ge as A,O as C,Be as H,it as a,ut as b,Se as c,rt as d,at as e,Ze as f,Je as g,tt as h,st as i,nt as j,We as k,et as l,ot as m,Xe as n,ct as u};
|
|
File without changes
|