local-operator-ui 0.25.14 → 0.25.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/renderer/assets/{_basePickBy-B2ftfnSj.js → _basePickBy-DBhtDEGA.js} +1 -1
- package/out/renderer/assets/{_baseUniq-xS2rgm41.js → _baseUniq-B5WxfAdh.js} +1 -1
- package/out/renderer/assets/{agent-details-page-xBkbahHO.js → agent-details-page-CseZi6cR.js} +1 -1
- package/out/renderer/assets/{agent-hub-page-CCG9nQu7.js → agent-hub-page-_t-x78D_.js} +1 -1
- package/out/renderer/assets/{agents-page-DmfbFFae.js → agents-page-B6vQMI_R.js} +2 -2
- package/out/renderer/assets/{arc-B0SKZgCa.js → arc-Dcd3HzRZ.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-B5v7pxwK.js → architectureDiagram-IEHRJDOE-CXwTTKVn.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-DQ345Zh9.js → blockDiagram-JOT3LUYC-dW5gyGl7.js} +1 -1
- package/out/renderer/assets/browser-page-CbsSO9cU.js +1 -0
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-Ctwu_7Bv.js → c4Diagram-VJAJSXHY-B1fPOy-n.js} +1 -1
- package/out/renderer/assets/channel-CNQYu0Z5.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-D87ZP7mi.js → chunk-4BMEZGHF-BjkEbeJq.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-C6hISC8L.js → chunk-A2AXSNBT-CNdgDk-3.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-BLSI3HXI.js → chunk-AEK57VVT-DlvJjW1D.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-JUpAyVdl.js → chunk-D6G4REZN-DUrFmr72.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-DHF6boxY.js → chunk-RZ5BOZE2-DVV9SVAw.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-BJ0D-GHV.js → chunk-XZIHB7SX-D5KVgy3I.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-i38CMqFy.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-i38CMqFy.js +1 -0
- package/out/renderer/assets/clone-DyOOGQU7.js +1 -0
- package/out/renderer/assets/{compact-pagination-uUyvzq0v.js → compact-pagination-FBuuRrOa.js} +1 -1
- package/out/renderer/assets/{dagre-OKDRZEBW-CBiD10z9.js → dagre-OKDRZEBW-U2nObwi2.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-nFAiuXvE.js → diagram-SSKATNLV-qATRbhkK.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-DIFjDS0R.js → diagram-VNBRO52H-BPEwatJH.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-DwUxmWRb.js → erDiagram-Q7BY3M3F-Bx5nxisD.js} +1 -1
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-BeTYdadT.js → flowDiagram-4HSFHLVR-Do8frrTh.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-CSe95xaL.js → ganttDiagram-APWFNJXF-C_-yHBuP.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-BBZ9xyNo.js → gitGraphDiagram-7IBYFJ6S-DXTe6Uqo.js} +1 -1
- package/out/renderer/assets/{graph-BJLMjElP.js → graph-BPMdi6cQ.js} +1 -1
- package/out/renderer/assets/icon-C3z02Ja7.css +1 -0
- package/out/renderer/assets/{index-COT32Ss8.js → index-CV6OexwP.js} +376 -376
- package/out/renderer/assets/{index-BmoxBHyf.js → index-DlEE2Mhu.js} +1 -1
- package/out/renderer/assets/{index-heO5jqEI.js → index-fXOo37XI.js} +1 -1
- package/out/renderer/assets/{infoDiagram-PH2N3AL5-DHrYU5gG.js → infoDiagram-PH2N3AL5-7Bdo1-DK.js} +1 -1
- package/out/renderer/assets/{installer-DOrhhrT_.js → installer-Db9wXNQc.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-BKZ8Rg7S.js → journeyDiagram-U35MCT3I-C_YNwAiC.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-CwBCC07W.js → kanban-definition-NDS4AKOZ-DwyjTS65.js} +1 -1
- package/out/renderer/assets/{layout-WV6NJdBh.js → layout-Dt9rFxLo.js} +1 -1
- package/out/renderer/assets/{legacy-agents-page-Bj-zKQuH.js → legacy-agents-page-Ck7g4g5h.js} +1 -1
- package/out/renderer/assets/{mermaid.core-CSbV60u2.js → mermaid.core-CTF22veB.js} +5 -5
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-C44nxPya.js → mindmap-definition-ALO5MXBD-hIcrIbqg.js} +1 -1
- package/out/renderer/assets/{page-header-DiUvJO7X.js → page-header-CNu3r7Wl.js} +1 -1
- package/out/renderer/assets/{parseISO-BMtGzL58.js → parseISO-D7fb4zbb.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-qHzjNxNa.js → pieDiagram-IB7DONF6-CgQ8RSTq.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-Bc5D-sg6.js → quadrantDiagram-7GDLP6J5-D0u3ugSa.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-DA_8uWW2.js → radar-MK3ICKWK-D4NPS1yb.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-BV6F3zUf.js → radient-auth-buttons-6mbpShIM.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-BCgaR5SB.js → requirementDiagram-KVF5MWMF-CzyA0VGV.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-3gG87BFP.js → sankeyDiagram-QLVOVGJD-Bu3OPb5q.js} +1 -1
- package/out/renderer/assets/{schedules-page-CAw0-NMt.js → schedules-page-Z26BnqzA.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-CKkN6I9o.js → sequenceDiagram-X6HHIX6F-C1Wt7DUe.js} +1 -1
- package/out/renderer/assets/settings-page-Ds1_qi2y.js +92 -0
- package/out/renderer/assets/{stateDiagram-DGXRK772-BU61mCRl.js → stateDiagram-DGXRK772-D_Odl8sh.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-nORq9nsg.js +1 -0
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-BRUeJjy-.js → timeline-definition-BDJGKUSR-BlShpjPx.js} +1 -1
- package/out/renderer/assets/{use-agent-like-mutation-D8iQ4AeJ.js → use-agent-like-mutation-DwD0kyhJ.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-BQL9pZXN.js → xychartDiagram-VJFVF3MP-CGVDywr7.js} +1 -1
- package/out/renderer/index.html +3 -3
- package/out/renderer/installer.html +3 -3
- package/package.json +3 -3
- package/out/renderer/assets/browser-page-DA1omIfj.js +0 -1
- package/out/renderer/assets/channel-C6wEcxCn.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-BFIEa1tR.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-BFIEa1tR.js +0 -1
- package/out/renderer/assets/clone-BKQt2B62.js +0 -1
- package/out/renderer/assets/icon-BsOdqeWB.css +0 -1
- package/out/renderer/assets/settings-page-dLKL9LIo.js +0 -92
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-Ry71nqy_.js +0 -1
- /package/out/renderer/assets/{icon-CsHr0elv.js → icon-KrVT-csH.js} +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import{a as H,r as i,j as e,B as C,S as X,J as st,g as Re,u as Me,I as ne,T as Ie,K as at,M as nt,N as rt,O as it,Q as Le,c as J,A as K,X as Tt,v as Ne,L as de,U as Rt,V as ot,y as Mt,F as It,Y as Lt,Z as Ft,i as Pt,f as lt}from"./icon-KrVT-csH.js";import{bH as zt,bI as Ue,bJ as $e,bj as Ot,g as ye,bk as ct,bl as Pe,ar as dt,f as ut,ac as Dt,as as Ut,bK as $t,bL as qt,bM as Bt,bN as Ht,bO as mt,a3 as Vt,bP as Kt,bQ as me,bR as ze,bS as ht,aK as Yt,bT as qe,bU as pt,bV as Gt,bp as xt,b as ft,d as gt,j as ge,bW as vt,bX as Qt,bY as Ce,ay as Wt,az as yt,bZ as jt,b_ as ve,aN as Zt,b$ as bt,c0 as Jt,P as Xt,i as be,c1 as es,c2 as ts,c3 as _e,c4 as kt,c5 as ss,c6 as as,c7 as wt,c8 as ns,c9 as rs,ca as is,cb as os,aa as ls,cc as Nt,aM as Ct,cd as cs,ce as ds,cf as us,aw as ms,cg as St,by as Fe,bs as hs,ch as ps,ci as xs,bn as fs,cj as gs,ck as vs,cl as ys,bf as Be,cm as js,br as He,cn as bs,co as ks,bt as ws,bu as Ns,bq as Ae,cp as Cs,cq as Ss,cr as _s,cs as As,ct as Es,cu as Ts,cv as Rs}from"./index-CV6OexwP.js";import{P as Ms}from"./page-header-CNu3r7Wl.js";import{S as V,I as Oe,a as Q,R as Is,N as Ls}from"./radient-auth-buttons-6mbpShIM.js";import{a as Fs,H as Ps,p as Ee}from"./parseISO-D7fb4zbb.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 zs=[["path",{d:"M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2",key:"57tc96"}]],Os=H("audio-waveform",zs);/**
|
|
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 Ds=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],Us=H("chart-line",Ds);/**
|
|
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 $s=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],qs=H("circle-plus",$s);/**
|
|
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 Bs=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 18a6 6 0 0 0 0-12v12z",key:"j4l70d"}]],_t=H("contrast",Bs);/**
|
|
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 Hs=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Vs=H("credit-card",Hs);/**
|
|
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 Ks=[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]],Ys=H("flame",Ks);/**
|
|
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 Gs=[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}]],Qs=H("hexagon",Gs);/**
|
|
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 Ws=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],Zs=H("leaf",Ws);/**
|
|
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 Js=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Xs=H("lock",Js);/**
|
|
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 ea=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],ta=H("moon",ea);/**
|
|
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 sa=[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]],aa=H("mountain",sa);/**
|
|
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 na=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],ra=H("plug-zap",na);/**
|
|
62
|
+
* @license lucide-react v0.507.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const ia=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],oa=H("skull",ia);/**
|
|
67
|
+
* @license lucide-react v0.507.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const la=[["path",{d:"m10 20-1.25-2.5L6 18",key:"18frcb"}],["path",{d:"M10 4 8.75 6.5 6 6",key:"7mghy3"}],["path",{d:"m14 20 1.25-2.5L18 18",key:"1chtki"}],["path",{d:"m14 4 1.25 2.5L18 6",key:"1b4wsy"}],["path",{d:"m17 21-3-6h-4",key:"15hhxa"}],["path",{d:"m17 3-3 6 1.5 3",key:"11697g"}],["path",{d:"M2 12h6.5L10 9",key:"kv9z4n"}],["path",{d:"m20 10-1.5 2 1.5 2",key:"1swlpi"}],["path",{d:"M22 12h-6.5L14 15",key:"1mxi28"}],["path",{d:"m4 10 1.5 2L4 14",key:"k9enpj"}],["path",{d:"m7 21 3-6-1.5-3",key:"j8hb9u"}],["path",{d:"m7 3 3 6h4",key:"1otusx"}]],ca=H("snowflake",la);/**
|
|
72
|
+
* @license lucide-react v0.507.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const da=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],ua=H("sun",da);/**
|
|
77
|
+
* @license lucide-react v0.507.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const ma=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],ha=H("undo-2",ma);/**
|
|
82
|
+
* @license lucide-react v0.507.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const pa=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],xa=H("zap",pa),fa=()=>{const t="https://local-operator.com/download",[a,s]=i.useState(!1),[r,n]=i.useState(!1),[d,l]=i.useState(null),[u,m]=i.useState("info"),[p,c]=i.useState(null),[y,S]=i.useState(null),h=i.useRef(!1),j=i.useRef(!1),_=i.useRef(0),E=i.useRef(!1),R=i.useCallback((T,A)=>{j.current=!1,l(T),m(A),n(!0)},[]),q=i.useCallback(T=>{j.current=!0,l(T),m("success"),n(!0)},[]),g=i.useCallback(()=>{j.current&&(j.current=!1,n(!1),l(null))},[]),{clearDeferredUpdate:O}=zt();i.useEffect(()=>{const T=window.api.updater.onUpdateError($=>{if(!h.current)return;const ee=["ENOENT: no such file or directory, open","Could not get code signature for running application","Cannot find latest.yml"].some(f=>$.includes(f));$.includes("manually")?(c({message:"The server is installed outside the app, so use the tool you installed it with - uv, pipx or pip.",command:""}),j.current=!1,l(null),m("warning"),n(!0)):ee||R($,"danger")}),A=window.api.updater.onBackendUpdateDevMode($=>{h.current&&R($,"info")}),v=()=>{E.current=!0,g()},P=window.api.updater.onUpdateAvailable(v),b=window.api.updater.onUpdateNpxAvailable(v),W=window.api.updater.onBackendUpdateAvailable(v);return()=>{T(),A(),P(),b(),W()}},[g,R]),i.useEffect(()=>{let T=!1;const A=()=>{window.api.updater.getLastInstallAttempt().then(P=>{T||S(P)}).catch(()=>{})};A();const v=window.api.updater.onUpdateInstallFailed(()=>A());return()=>{T=!0,v()}},[]);const M=async()=>{const T=++_.current;g(),E.current=!1;try{s(!0),h.current=!0,O($e.UI),O($e.BACKEND);const A=await window.api.updater.checkForAllUpdates({manual:!0});if(T!==_.current)return;A?.affirmation&&!E.current?q(A.affirmation):g()}catch(A){if(T!==_.current)return;R(`Error checking for updates: ${A instanceof Error?A.message:String(A)}`,"danger")}finally{T===_.current&&s(!1),setTimeout(()=>{h.current=!1},2e3)}},U=()=>{j.current=!1,n(!1),l(null)};return e.jsxs(e.Fragment,{children:[y&&e.jsxs("div",{className:"mb-3 rounded-sm bg-sunken p-3",children:[e.jsxs("p",{className:"text-body-sm text-ink",children:["The last update to version ",y.targetVersion," didn't finish",y.attempts>1?` (${y.attempts} attempts)`:"",". Version ",y.runningVersion," is running."]}),e.jsxs("p",{className:"mt-1 text-meta text-ink-dim",children:["Detected"," ",y.detectedAt?new Date(y.detectedAt).toLocaleString():"at an unknown time",". ",y.detail]}),e.jsx(C,{variant:"outline",size:"sm",className:"mt-2",onClick:()=>void window.api.openExternal(t),children:"Download a fresh copy"})]}),e.jsxs(C,{variant:"outline",onClick:()=>void M(),disabled:a,children:[a?e.jsx(X,{size:"sm"}):null,a?"Checking...":"Check for updates"]}),p&&e.jsxs(Ue,{open:r,autoHideDuration:1e4,onClose:U,variant:"warning",children:[e.jsx("p",{className:"text-body-sm",children:p.message}),p.command&&e.jsx("code",{className:"mt-2 block rounded-sm bg-sunken p-2 text-mono-sm text-ink",children:p.command})]}),d&&e.jsx(Ue,{open:r,autoHideDuration:6e3,onClose:U,variant:u,children:d})]})},ke=["system-prompt"],ga=()=>{const{shouldEnableQuery:t}=Ot();return ye({enabled:t({bypassInternetCheck:!0}),queryKey:ke,queryFn:async()=>{try{const s=await ct(Pe.baseUrl).config.getSystemPrompt();if(s===null)return null;if(s.status>=400)throw new Error(s.message||"Failed to fetch system prompt");return s.result}catch(a){const s=a instanceof Error?a.message:"An unknown error occurred while fetching system prompt";throw dt(s),a}},refetchOnWindowFocus:!1,staleTime:5e3})},va=()=>{const t=ut(),a=ct(Pe.baseUrl);return Dt({mutationFn:async s=>{try{const r=await a.config.updateSystemPrompt(s);if(r.status>=400)throw new Error(r.message||"Failed to update system prompt");return r.result}catch(r){const n=r instanceof Error?r.message:"An unknown error occurred while updating system prompt";throw dt(n),r}},onSuccess:async s=>{await t.invalidateQueries({queryKey:ke,refetchType:"none"}),t.setQueryData(ke,r=>r&&{...r,...s}),await t.refetchQueries({queryKey:ke,type:"all"}),Ut("System prompt updated")},onError:s=>{console.error("Error updating system prompt:",s)}})},ya=({value:t,label:a,description:s,onChange:r,icon:n,isSaving:d=!1})=>{const[l,u]=i.useState(t),m=i.useId(),p=`${m}-label`,c=`${m}-description`,y=async S=>{if(!d){u(S);try{await r(S)}catch(h){u(!S),console.error("Error toggling setting:",h)}}};return e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("span",{id:p,className:"flex min-h-6 items-center gap-2 text-body text-ink",children:[n&&e.jsx(n,{size:14,"aria-hidden":"true",className:"shrink-0 text-ink-dim"}),a]}),s&&e.jsx("p",{id:c,className:"mt-0.5 max-w-2xl text-body-sm text-ink-muted",children:s})]}),e.jsx("div",{className:"flex h-6 shrink-0 items-center",children:d?e.jsx(X,{size:"md",label:`Saving ${a}`}):e.jsx(st,{checked:l,onCheckedChange:y,"aria-labelledby":p,"aria-describedby":s?c:void 0})})]})};var ja=$t({chartName:"LineChart",GraphicalChild:mt,axisComponents:[{axisType:"xAxis",AxisComp:qt},{axisType:"yAxis",AxisComp:Bt}],formatAxisMap:Ht});function Ve(t,a){const s=Vt(t,a?.in);if(!Kt(s))throw new RangeError("Invalid time value");const r=me(s.getDate(),2),n=me(s.getMonth()+1,2),d=s.getFullYear(),l=me(s.getHours(),2),u=me(s.getMinutes(),2),m=me(s.getSeconds(),2);let p="",c="";const y=s.getTimezoneOffset();if(y!==0){const S=Math.abs(y),h=me(Math.trunc(S/60),2),j=me(S%60,2);c=`${y<0?"+":"-"}${h}:${j}`}else c="Z";return`${d}-${n}-${r}T${l}:${u}:${m}${p}${c}`}function ba(t,a,s){return Fs(t,-30,s)}const ka=["radient","creditBalance"],wa=t=>{const{user:a,isAuthenticated:s}=ze(),r=a?.account?.tenant_id,n=s&&!!r&&t?.enabled;return ye({queryKey:[ka,r],queryFn:async()=>{if(!r)throw new Error("Tenant ID not available");const d=await ht({operation:"credits",tenantId:r});if(!d||typeof d.balance!="number")throw new Error("Invalid credit balance response format");return d},enabled:n,staleTime:5*60*1e3,refetchOnWindowFocus:!0})};function Na(t,a){const[s,r]=i.useState(!1);return i.useEffect(()=>{if(!t){r(!1);return}const n=setTimeout(()=>r(!0),a);return()=>clearTimeout(n)},[t,a]),s}const Ca=["radient","usageRollup"],Sa=(t,a)=>{const{user:s,isAuthenticated:r}=ze(),n=s?.account?.tenant_id,d=r&&!!n&&a?.enabled;return ye({queryKey:[...Ca,n,t],queryFn:async()=>{if(!n)throw new Error("Tenant ID not available");const l={};for(const[m,p]of Object.entries(t))p!=null&&(l[m]=String(p));const u=await ht({operation:"usage",tenantId:n,query:l});if(!u)throw new Error("Invalid usage rollup response format");return u},enabled:d,staleTime:5*60*1e3,refetchOnWindowFocus:!0})},_a=()=>e.jsx(fa,{}),Aa=t=>{if(!t)return null;try{return new URL(t).host}catch{return null}},Ea=()=>{const[t,a]=i.useState("Loading..."),[s,r]=i.useState({value:"Loading...",detail:null,degraded:!1}),[n,d]=i.useState({platform:"Loading...",arch:"...",nodeVersion:"Loading...",electronVersion:"Loading...",chromeVersion:"Loading..."});i.useEffect(()=>{let u=!0;const m=h=>{if(!u)return;const j=Aa(h.url);if(h.state==="connecting"){r({value:"Loading...",detail:null,degraded:!1});return}if(h.state==="detached"){r({value:"Not connected",detail:h.detail||null,degraded:!1});return}if(h.state==="wedged"){r({value:"Not attached",detail:h.detail||null,degraded:!1});return}const _=h.version||"Version unknown";r({value:j?`${_} · ${j}`:_,detail:h.detail||null,degraded:h.state==="degraded"})};let p=!1;const c=window.api?.backend?.onStatusChange(h=>{p=!0,m(h)}),y=async()=>{try{const[h,j]=await Promise.all([window.api.systemInfo.getAppVersion(),window.api.systemInfo.getPlatformInfo()]);u&&(a(h),d(j))}catch(h){console.error("Error fetching app information:",h)}},S=async()=>{try{const h=window.api?.backend;if(h){const E=await h.getStatus();p||m(E);return}const j=await qe.healthCheck(Pe.baseUrl),_=qe.getServerVersion(j);u&&r({value:_,detail:null,degraded:!1})}catch(h){console.error("Error fetching server version:",h),u&&r({value:"Unavailable",detail:null,degraded:!1})}};return y(),S(),()=>{u=!1,c?.()}},[]);const l=(u,m,p,c={})=>e.jsx(Q,{label:e.jsx(Re,{content:p,children:e.jsxs("span",{className:"inline-flex cursor-help items-center gap-1.5",children:[e.jsx(Me,{size:12,className:"shrink-0"}),u]})}),valueClassName:c.valueClassName,value:e.jsxs(e.Fragment,{children:[c.valueTooltip?e.jsx(Re,{content:c.valueTooltip,children:e.jsx("span",{"data-backend-version":c.valueHoverTarget?"":void 0,className:"cursor-help",children:m})}):m,c.statusNote?e.jsx("span",{className:"mt-0.5 block text-meta text-ink-dim",children:c.statusNote}):null]})});return e.jsx(V,{title:"Application updates and info",icon:Yt,description:"Check for updates and view information about your Local Operator installation.",dataTourTag:"settings-app-updates-section",children:e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs(Oe,{children:[l("Application version",t,"The version of the Local Operator user interface application."),l("Server version",s.value,"The version of the Local Operator API server backend, and the address of the daemon it was read from.",{valueTooltip:s.detail,valueHoverTarget:!0,statusNote:s.degraded?"Not answering":void 0,valueClassName:s.degraded?"text-ink-muted":void 0}),l("Platform",`${n.platform} (${n.arch})`,"The operating system and architecture your application is running on."),l("Node.js version",n.nodeVersion,"The JavaScript runtime environment version."),l("Electron version",n.electronVersion,"The framework version enabling this desktop application.")]}),e.jsx(_a,{})]})})},Ta={hosting:"core",model_name:"core",model_effort:"core","providers.openai.use_max_context_window":"advanced","providers.openai.api":"advanced","providers.anthropic.cache_ttl_1h_min_context_tokens":"advanced","providers.openrouter.provider_affinity":"advanced","providers.openrouter.sort":"advanced","providers.openrouter.order":"advanced","providers.openrouter.only":"advanced","providers.openrouter.ignore":"advanced","providers.openrouter.allow_fallbacks":"advanced","providers.openrouter.require_parameters":"advanced","providers.openrouter.data_collection":"advanced","providers.openrouter.zdr":"advanced","providers.openrouter.enforce_distillable_text":"advanced","providers.openrouter.quantizations":"advanced","providers.openrouter.max_price":"advanced","providers.openrouter.preferred_min_throughput":"advanced","providers.openrouter.preferred_max_latency":"advanced","retry.enabled":"core","retry.maxRetries":"advanced","retry.baseDelayMs":"advanced","retry.connectivityMaxRetries":"advanced","retry.connectivityBackoffCapMs":"advanced","retry.modelFallback":"advanced","retry.usageAwareFallback":"advanced","retry.usageAwareAccountPick":"advanced","retry.usageReservePercent":"advanced","retry.fallbackChains":"advanced","tui.theme":"advanced","display.shimmer":"advanced","display.comfortable_rows":"advanced","display.nerd_icons":"advanced","display.heading_markers":"advanced","display.terminal_title":"advanced","display.images":"advanced","display.notifications":"core","display.notification_session_name":"advanced","display.time_format":"advanced","display.dock":"advanced","tui.sidebar_visible":"advanced","tui.sidebar_position":"advanced","keymap.new_session":"advanced","keymap.resume":"advanced",tool_approval_mode:"core",auto_save_conversation:"core","session.cleanup.enabled":"core","session.cleanup.max_sessions":"advanced","session.cleanup.max_inactive_days":"advanced","session.cleanup.max_total_bytes":"advanced","session.cleanup.remove_empty":"advanced","runtime.background_on_resume":"advanced","runtime.unattended_gate_timeout":"advanced","subagents.max_running":"advanced","subagents.model_choice":"advanced","subagents.models.lo":"advanced","subagents.models.med":"advanced","subagents.models.hi":"advanced","fork.mode":"core","fork.cmux_placement":"advanced","compaction.enabled":"core","compaction.strategy":"advanced","compaction.threshold_percent":"advanced","compaction.threshold_tokens":"advanced","compaction.keep_recent_tokens":"advanced","compaction.auto_continue":"advanced","compaction.mid_turn_enabled":"advanced","compaction.wire_bytes_budget":"advanced","compaction.wire_bytes_trigger":"advanced","web_search.enabled":"core","web_fetch.enabled":"core","web_search.strategy":"advanced","web_search.providers":"advanced","web_search.timeout_seconds":"advanced","web_search.searxng_endpoint":"advanced","web_search.deepseek_evidence":"advanced","web_search.read_enabled":"advanced","web_fetch.timeout_seconds":"advanced","web_fetch.max_bytes":"advanced","web_fetch.max_redirects":"advanced","web_fetch.cache_ttl_seconds":"advanced","web_fetch.allow_private":"advanced","web_fetch.render_backend":"advanced","web_fetch.enrich":"advanced","web_fetch.max_attempts":"advanced","web_fetch.blocked_retry":"advanced","bash.shell":"advanced","providers.lmstudio.base_url":"advanced","providers.lmstudio.models":"advanced","providers.ollama.base_url":"advanced","providers.ollama.models":"advanced","providers.vllm.base_url":"advanced","providers.vllm.models":"advanced","providers.llamacpp.base_url":"advanced","providers.llamacpp.models":"advanced","providers.openai-compatible.base_url":"advanced","providers.openai-compatible.models":"advanced",conversation_length:"advanced",detail_length:"advanced",max_learnings_history:"advanced","desktop.launch_command":"advanced"},Ra={model:"core",approvals:"core",web_tools:"core",desktop:"advanced"};function he(t){return t.tier==="core"||t.tier==="advanced"?t.tier:Ta[t.key]??Ra[t.section]??"advanced"}function Ma(t){return t.length===0?!1:t.filter(s=>he(s)==="core").length*2>=t.length}function Ia(t,a,s){return a?{layout:null,filter:t?[]:[...s]}:{layout:{opened:t?[...s]:[],closed:t?[]:[...s]},filter:[]}}const At="__cascade__";function xe(t){return t==null?"":typeof t=="object"?JSON.stringify(t):String(t)}function ce(t){return{value:t.kind==="list"?(t.value??[]).join(`
|
|
87
|
+
`):t.kind==="cascade"?At:xe(t.value),cascadeBase:null}}function we(t,a){return a.cascadeBase!==null?!0:t.kind==="cascade"?a.value!==At:t.kind==="list"?a.value!==t.value?.join(`
|
|
88
|
+
`):a.value!==xe(t.value)}function La(t,a){let s=null,r;switch(t.kind){case"bool":s=a.value==="true";break;case"int":{const n=Number.parseInt(a.value,10);if(Number.isNaN(n))return{ok:!1,error:"Enter a whole number."};s=n;break}case"float":{const n=Number.parseFloat(a.value);if(!Number.isFinite(n))return{ok:!1,error:"Enter a finite number."};s=n;break}case"enum":{const n=t.choices.find(d=>xe(d.value)===a.value);s=n?n.value:a.value;break}case"list":s=a.value.split(`
|
|
89
|
+
`).map(n=>n.trim()).filter(Boolean);break;case"cascade":{if(!a.cascadeBase)return{ok:!1,error:"Nothing has been edited yet."};const n={};for(const[d,l]of Object.entries(a.cascadeBase))n[d]=l;s=n,r=t.value??void 0;break}default:t.empty_unsets&&a.value.trim()===""?s=null:s=a.value}return{ok:!0,request:{op:"settings.edit",key:t.key,value:s,...r?{base:r}:{}}}}const Ke={bool:"w-9",int:"w-28",float:"w-28",enum:"w-64",text:"w-96",hotkey:"w-56",list:"w-full min-w-0",cascade:"w-full min-w-0",readonly:"w-40"};function Fa(t){return Ke[t]??Ke.text}const Pa={" ":"space",Spacebar:"space",Escape:"escape",Esc:"escape",Enter:"enter",Tab:"tab",Backspace:"backspace",Delete:"delete",ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown"},za=new Set(["Control","Shift","Alt","Meta","AltGraph"]),Oa=new Set(["Escape","Esc","Enter"]);function Da(t){if(za.has(t.key)||t.nativeEvent.isComposing)return"";const a=[];t.ctrlKey&&a.push("ctrl"),t.altKey&&a.push("alt"),t.shiftKey&&a.push("shift"),t.metaKey&&a.push("meta");const s=Pa[t.key]??t.key.toLowerCase();return s?[...a,s].join("+"):""}const Ua=({value:t,label:a,disabled:s,onChange:r})=>e.jsxs("span",{className:"flex w-full flex-col gap-0.5",children:[e.jsx(ne,{readOnly:!0,value:t,disabled:s,"aria-label":`${a}: press the key you want`,className:"font-mono text-body-sm",onKeyDown:n=>{if(Oa.has(n.key)){n.currentTarget.blur();return}const d=Da(n);d&&(n.preventDefault(),r(d))}}),e.jsx("span",{className:"text-meta text-ink-dim",children:"Press the keys you want; Esc cancels."})]}),$a=({setting:t,value:a,chains:s,disabled:r=!1,onValueChange:n,onChainsChange:d})=>{switch(t.kind){case"bool":return e.jsx(st,{checked:a==="true",disabled:r,onCheckedChange:l=>n(l?"true":"false"),"aria-label":t.label});case"enum":return e.jsxs(at,{value:a,disabled:r,onValueChange:n,children:[e.jsx(nt,{"aria-label":t.label,className:"w-full",children:e.jsx(rt,{})}),e.jsx(it,{children:t.choices.map(l=>e.jsx(Le,{value:xe(l.value),title:l.description||void 0,children:l.label},xe(l.value)))})]});case"int":case"float":return e.jsx(ne,{type:"number",value:a,disabled:r,min:t.minimum??void 0,max:t.maximum??void 0,step:t.kind==="int"?1:"any",onChange:l=>n(l.target.value),"aria-label":t.label});case"hotkey":return e.jsx(Ua,{value:a,label:t.label,disabled:r,onChange:n});case"list":return e.jsx(Ie,{value:a,disabled:r,rows:Math.min(6,t.members.length+2),onChange:l=>n(l.target.value),"aria-label":t.label,placeholder:t.placeholder,className:"font-mono text-body-sm"});case"cascade":{const l=s??t.value??{};return e.jsxs("div",{className:"flex flex-col gap-3",children:[Object.entries(l).map(([u,m])=>e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"font-mono text-meta text-ink-dim",children:u}),e.jsx(Ie,{value:m.join(`
|
|
90
|
+
`),disabled:r,rows:Math.max(2,m.length+1),onChange:p=>d?.({...l,[u]:p.target.value.split(`
|
|
91
|
+
`).map(c=>c.trim()).filter(Boolean)}),"aria-label":`${t.label}: ${u}`,className:"font-mono text-body-sm"})]},u)),e.jsx("p",{className:"text-meta text-ink-dim",children:"One hop per line, as provider/model (effort). An empty chain moves to the next provider."})]})}default:return e.jsx(ne,{value:a,disabled:r,onChange:l=>n(l.target.value),"aria-label":t.label,placeholder:t.placeholder})}},Et=({className:t})=>e.jsx("span",{role:"img","aria-label":"Changed from the default",title:"Changed from the default",className:J("size-1.5 shrink-0 rounded-full bg-accent",t)}),qa=({title:t,rowCount:a,advancedCount:s,scope:r,modified:n,onOpenChange:d,defaultOpen:l=!1})=>e.jsx("div",{"data-section-header":t,className:"flex w-full flex-col",children:e.jsx(pt,{defaultOpen:l,onOpenChange:d,triggerClassName:"text-ink hover:bg-elevated hover:text-ink",chevronClassName:"text-ink-dim",rowClassName:"min-h-10 py-0",className:"w-full",summary:e.jsxs("span",{className:"flex w-full min-w-0 items-center gap-2",children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate text-heading text-ink",children:t}),a>0&&e.jsx("span",{className:"shrink-0 text-meta text-ink-dim",children:a===1?"1 setting":`${a} settings`}),r&&e.jsx("span",{className:"shrink-0 text-meta text-ink-dim",children:r}),s>0&&e.jsxs("span",{className:"shrink-0 text-meta text-ink-dim",children:[s," advanced"]})]}),n&&e.jsx(Et,{className:"ml-auto"})]})})}),Ba="size-3.5 shrink-0",Ha=({setting:t,draft:a,tier:s,gate:r,saving:n,error:d,onDraftChange:l,onSave:u,onReset:m})=>{const p=!!(r&&!r.on),c=we(t,a),y=n||p,S=t.kind==="list"||t.kind==="cascade",h=e.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[e.jsx("span",{className:"truncate text-body-sm text-ink",children:t.label}),t.kind==="readonly"&&e.jsx("span",{className:"text-meta text-ink-dim",children:"Read-only"}),t.warning&&e.jsx("span",{className:"text-meta text-danger",children:t.warning})]}),j=p&&r&&e.jsxs("p",{className:"text-meta text-ink-dim",children:["Needs ",r.label," on. Nothing here is saved while it is off."]});return e.jsx("div",{"data-setting-key":t.key,"data-tier":s,className:"border-b border-hairline",children:e.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-1 px-1 py-2.5",children:[e.jsxs("div",{className:J("flex min-w-44 flex-col gap-0.5",S?"shrink-0 basis-2/5":"flex-1"),children:[s==="advanced"&&t.help?e.jsx(pt,{summary:h,triggerClassName:"min-h-5 py-0 px-0 text-body-sm text-ink hover:text-ink",chevronClassName:"text-ink-dim",summaryAlign:"firstLine",rowClassName:"min-h-5 py-0",className:"w-full",children:e.jsx("span",{className:"text-meta text-ink-dim",children:t.help})}):e.jsxs("span",{className:"flex min-h-5 items-center gap-1.5",children:[e.jsx("span",{"aria-hidden":!0,className:Ba}),h]}),s==="core"&&t.help&&e.jsx("p",{className:"ml-5 text-meta text-ink-dim",children:t.help}),j]}),e.jsxs("div",{className:J("flex shrink-0 items-center gap-2 self-center",S&&"min-w-0 flex-1 items-start"),children:[(!t.is_default||c)&&e.jsx(Et,{}),!t.is_default&&t.kind!=="readonly"&&e.jsxs(C,{variant:"ghost",size:"sm",disabled:y,onClick:m,"aria-label":`Use default for ${t.label}`,children:[e.jsx(ha,{"aria-hidden":"true"}),"Use default"]}),c&&e.jsx(C,{variant:"primary",size:"sm",disabled:y,onClick:u,children:n?"Saving":"Save"}),e.jsx("div",{className:Fa(t.kind),"data-setting-control":"",children:t.redacted?e.jsx("span",{className:"text-meta text-ink-dim",children:"Set in the credential manager: this value carries inline credentials or query parameters."}):t.kind==="readonly"?e.jsx("span",{className:"text-body-sm text-ink-muted",children:xe(t.value)||"Not set"}):e.jsx($a,{setting:t,value:a.value,chains:a.cascadeBase??void 0,disabled:y,onValueChange:_=>l({...a,value:_}),onChainsChange:_=>l({...a,cascadeBase:_})})})]}),d&&e.jsx(K,{variant:"danger",role:"alert",className:"w-full",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{children:d}),e.jsxs(C,{variant:"secondary",size:"sm",disabled:n,onClick:u,children:[e.jsx(Gt,{"aria-hidden":"true"}),"Retry"]})]})})]})})},Va="w-full max-w-[400px]",Ka=({query:t,onQueryChange:a,matchCount:s,matchSections:r,coreCount:n,advancedCount:d,modifiedCount:l,modifiedOnly:u,onModifiedOnlyChange:m,showAdvanced:p,onShowAdvancedChange:c,onExpandAll:y,onCollapseAll:S,unsavedCount:h,savingAll:j,onSaveAll:_,onDiscardAll:E})=>e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("div",{className:J("relative",Va),children:[e.jsx(xt,{size:16,className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-ink-dim","aria-hidden":"true"}),e.jsx(ne,{value:t,onChange:R=>a(R.target.value),onKeyDown:R=>{R.key==="Escape"&&t&&a("")},placeholder:"Search settings by name, description or key","aria-label":"Search settings",className:"pl-9"}),t&&e.jsx(C,{variant:"ghost",size:"icon-sm",className:"absolute top-1/2 right-1 -translate-y-1/2",onClick:()=>a(""),"aria-label":"Clear search",children:e.jsx(Tt,{"aria-hidden":"true"})})]}),e.jsxs("fieldset",{className:"m-0 border-0 p-0",children:[e.jsx("legend",{className:"sr-only",children:"Settings filters"}),e.jsxs("div",{className:"flex gap-0.5 rounded-md bg-sunken p-0.5",children:[e.jsxs(C,{variant:"ghost",size:"sm","aria-pressed":u,onClick:()=>m(!u),className:J(u&&"bg-surface text-ink hover:bg-surface"),children:["Modified",e.jsx(Ne,{variant:"neutral",children:l})]}),e.jsx(C,{variant:"ghost",size:"sm","aria-pressed":p,onClick:()=>c(!p),className:J(p&&"bg-surface text-ink hover:bg-surface"),children:"Show advanced"})]})]}),e.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[h>0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-meta text-ink-dim",children:h===1?"1 unsaved change":`${h} unsaved changes`}),e.jsx(C,{variant:"primary",size:"sm",disabled:j,onClick:_,children:j?"Saving":"Save all"}),e.jsx(C,{variant:"ghost",size:"sm",disabled:j,onClick:E,children:"Discard all"})]}),e.jsx(C,{variant:"ghost",size:"sm",onClick:y,children:"Expand all"}),e.jsx(C,{variant:"ghost",size:"sm",onClick:S,children:"Collapse all"})]})]}),e.jsx("p",{className:"text-meta text-ink-dim","aria-live":"polite",children:s!==null?`${s} ${s===1?"result":"results"} in ${r} ${r===1?"section":"sections"}`:u?`${l} modified ${l===1?"setting":"settings"}`:p?`${d} advanced settings shown — Expand all to see them`:`${n} core settings, ${d} advanced`})]}),Ya={all:["desktop","settings"]},Ga={live:"Takes effect immediately","new launch":"Takes effect the next time the app starts","new sessions":"Takes effect for new conversations"},Qa=40,pe=t=>t.toLowerCase().replace(/[-_.]/g," "),Wa=({focusKey:t,initialFilter:a=""})=>{const s=ft(),r=gt(s.data,"settings"),[n,d]=i.useState(a),[l,u]=i.useState(!1),[m,p]=i.useState(!1),[c,y]=i.useState({}),[S,h]=i.useState({}),[j,_]=i.useState({}),[E,R]=i.useState(!1),[q,g]=i.useState(new Set),[O,M]=i.useState(new Set),[U,T]=i.useState(new Set),A=i.useRef(null),v=i.useRef(null),P=ye({queryKey:Ya.all,queryFn:()=>ge({op:"settings.list"}),enabled:r,staleTime:1e4}),b=P.data;i.useEffect(()=>{b&&y(o=>{let x=!1;const k={...o};for(const N of b.settings){const F=o[N.key];if(!F){k[N.key]=ce(N),x=!0;continue}if(we(N,F))continue;const I=ce(N);(I.value!==F.value||I.cascadeBase!==F.cascadeBase)&&(k[N.key]=I,x=!0)}return x?k:o})},[b]);const W=i.useCallback(o=>!o.is_default||we(o,c[o.key]??ce(o)),[c]),$=i.useMemo(()=>{if(!b)return[];const o=pe(n.trim()),x=o.length>0||m;return b.settings.filter(k=>!x&&he(k)==="advanced"&&!l||m&&!W(k)?!1:o?pe([k.label,k.help,k.key,k.section,k.warning??""].join(" ")).includes(o):!0)},[b,n,l,m,W]),Y=n.trim().length>0||m,ee=i.useMemo(()=>b?.sections??[],[b]),f=i.useCallback(o=>(b?.settings??[]).filter(x=>x.section===o),[b]),G=o=>$.filter(x=>x.section===o),re=o=>q.has(o)?!0:O.has(o)?!1:Ma(f(o)),Z=(o,x)=>{g(k=>{const N=new Set(k);return x?N.add(o):N.delete(o),N}),M(k=>{const N=new Set(k);return x?N.delete(o):N.add(o),N})},w=(o,x)=>{T(k=>{const N=new Set(k);return x?N.delete(o):N.add(o),N})},z=o=>{const x=ee.filter(N=>o||G(N.name).length>0).map(N=>N.name),k=Ia(o,Y,x);k.layout&&(g(new Set(k.layout.opened)),M(new Set(k.layout.closed))),T(new Set(k.filter))};i.useEffect(()=>{n.trim()||T(new Set)},[n]);const L=i.useCallback(o=>{const x=o.gated_by;if(!x||!b)return null;const k=b.settings.find(N=>N.key===x);return{key:x,label:k?.label??x,on:k?.value===!0||k?.value==="true"}},[b]),B=i.useCallback((o,x)=>h(k=>({...k,[o]:x})),[]),D=i.useCallback((o,x)=>_(k=>({...k,[o]:x})),[]),te=i.useCallback(async o=>{const x=c[o.key];if(!x)return!1;const k=La(o,x);if(!k.ok)return D(o.key,k.error),!1;B(o.key,!0),D(o.key,null);try{await ge(k.request),B(o.key,!1);const F=(await P.refetch()).data?.settings.find(I=>I.key===o.key);return F&&y(I=>{const fe=I[o.key];return fe&&fe.value===x.value&&fe.cascadeBase===x.cascadeBase?{...I,[o.key]:ce(F)}:I}),!0}catch(N){return B(o.key,!1),D(o.key,N instanceof Error?N.message:"The setting could not be saved."),!1}},[c,P,B,D]),se=i.useCallback(async o=>{B(o.key,!0),D(o.key,null);try{await ge({op:"settings.reset",key:o.key}),y(x=>({...x,[o.key]:ce({...o,value:o.default,is_default:!0})})),B(o.key,!1),await P.refetch()}catch(x){B(o.key,!1),D(o.key,x instanceof Error?x.message:"The setting could not be reset.")}},[P,B,D]),ue=i.useMemo(()=>(b?.settings??[]).filter(o=>we(o,c[o.key]??ce(o))),[b,c]),ie=async()=>{R(!0);for(const o of ue)await te(o);R(!1)},ae=()=>{b&&(y(o=>{const x={...o};for(const k of b.settings)x[k.key]=ce(k);return x}),_({}))};i.useEffect(()=>{if(!t||!b||A.current===t)return;const o=b.settings.find(N=>N.key===t);if(!o)return;A.current=t,he(o)==="advanced"&&u(!0);const x=pe(n.trim());!x||pe([o.label,o.help,o.key,o.section].join(" ")).includes(x)||d(""),p(!1),g(N=>new Set(N).add(o.section)),M(N=>{const F=new Set(N);return F.delete(o.section),F})},[t,b,n]);const le=i.useMemo(()=>{if(!t||!b)return!1;const o=b.settings.find(k=>k.key===t);if(!o||he(o)==="advanced"&&!l)return!1;const x=pe(n.trim());return x?pe([o.label,o.help,o.key,o.section].join(" ")).includes(x):!0},[t,b,n,l]);if(i.useEffect(()=>{if(!le||!t||v.current===t)return;let o=0,x=0;const k=()=>{const N=document.querySelector(`[data-setting-key="${CSS.escape(t)}"]`),F=N?.querySelector('[data-setting-control] :is(input, textarea, select, button[role="switch"], button)')??N;if(F){F===N&&(F.tabIndex=-1),F.focus(),F.scrollIntoView({block:"center"}),v.current=t;return}x+=1,x<Qa&&(o=requestAnimationFrame(k))};return o=requestAnimationFrame(k),()=>cancelAnimationFrame(o)},[le,t]),s.data&&!r)return e.jsx(K,{variant:"warning",children:"Searchable settings need a newer Local Operator server. Update the server and restart the app to manage these settings here."});if(P.isLoading||s.isLoading)return e.jsx("div",{className:"flex h-40 items-center justify-center",children:e.jsx(X,{size:"lg",label:"Loading settings"})});const oe=(s.data?null:s.error)??P.error;if(oe||!b){const o=s.isFetching||P.isFetching;return e.jsx(K,{variant:"warning",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{children:vt("Your settings could not be loaded.",oe)}),e.jsx(C,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>{s.isError?s.refetch():P.refetch()},disabled:o,children:o?"Retrying":"Retry"})]})})}const je=b.settings.reduce((o,x)=>(o[he(x)]+=1,o),{core:0,advanced:0}),Se=new Set($.map(o=>o.section)).size;return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Ka,{query:n,onQueryChange:d,matchCount:n.trim()?$.length:null,matchSections:Se,coreCount:je.core,advancedCount:je.advanced,modifiedCount:b.settings.filter(W).length,modifiedOnly:m,onModifiedOnlyChange:p,showAdvanced:l,onShowAdvancedChange:u,onExpandAll:()=>z(!0),onCollapseAll:()=>z(!1),unsavedCount:ue.length,savingAll:E,onSaveAll:()=>void ie(),onDiscardAll:ae}),Y&&$.length===0&&e.jsx("div",{className:"flex flex-col items-center py-6 text-center",children:e.jsx("p",{className:"text-body-sm text-ink-muted",children:"No settings match this search. Clear the search field to see every setting again."})}),e.jsx("div",{className:"flex flex-col gap-1",children:ee.map(o=>{const x=G(o.name),k=f(o.name),N=Y?0:k.filter(I=>he(I)==="advanced").length;if(Y&&x.length===0)return null;const F=Y?x.length>0&&!U.has(o.name):re(o.name);return e.jsxs("section",{"data-settings-section":o.name,"data-open":F,className:"flex flex-col",children:[e.jsx(qa,{title:o.title,rowCount:x.length,advancedCount:N,scope:Ga[o.scope],modified:k.some(W),defaultOpen:F,onOpenChange:I=>Y?w(o.name,I):Z(o.name,I)},`${o.name}:${F?"open":"closed"}`),e.jsxs("div",{hidden:!F,className:"flex flex-col pb-3",children:[o.description&&e.jsx("p",{className:"px-1 pb-1 text-meta text-ink-dim",children:o.description}),x.length===0?e.jsxs("div",{className:"flex items-center gap-2 px-1 py-2",children:[e.jsx("p",{className:"text-body-sm text-ink-muted",children:N>0?"Advanced settings are hidden here.":"Nothing in this section matches."}),N>0&&e.jsxs(C,{variant:"secondary",size:"sm",onClick:()=>u(!0),children:["Show ",N," advanced"]})]}):x.map(I=>e.jsx(Ha,{setting:I,draft:c[I.key]??ce(I),tier:he(I),gate:L(I),saving:!!S[I.key],error:j[I.key]??null,onDraftChange:fe=>y(De=>({...De,[I.key]:fe})),onSave:()=>void te(I),onReset:()=>void se(I)},I.key))]})]},o.name)})})]})},Ye=({credentialKey:t,isConfigured:a=!1,onEdit:s,onClear:r,onAdd:n})=>{const d=Qt(t),l=a?Xs:Ce;return e.jsxs("div",{className:"flex flex-col rounded-md p-3 transition-colors duration-fast ease-out-quart hover:bg-elevated",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h3",{className:"flex items-center gap-2 text-body font-medium text-ink",children:[e.jsx(l,{className:"size-3.5 shrink-0 text-ink-dim"}),d.name]}),e.jsx("p",{className:"mt-1 break-all text-mono-sm text-ink-dim",children:t}),e.jsx("p",{className:"mt-2 text-body-sm text-ink-muted",children:d.description})]}),e.jsx("div",{className:"mt-auto flex flex-wrap items-center justify-end gap-2 pt-4",children:a?e.jsxs(e.Fragment,{children:[e.jsxs(C,{variant:"ghost",size:"sm",onClick:()=>s?.(t),children:[e.jsx(Wt,{}),"Update"]}),e.jsxs(C,{variant:"ghost",size:"sm",className:"text-danger hover:bg-danger-wash hover:text-danger",onClick:()=>r?.(t),children:[e.jsx(yt,{}),"Clear"]})]}):e.jsxs(e.Fragment,{children:[e.jsxs(C,{variant:"outline",size:"sm",onClick:()=>n?.(t),children:[e.jsx(Ce,{}),"Configure"]}),d.url&&e.jsx(Re,{content:`Get your ${d.name} key`,children:e.jsx(C,{variant:"ghost",size:"icon-sm",asChild:!0,children:e.jsx("a",{href:d.url,target:"_blank",rel:"noopener noreferrer","aria-label":`Get your ${d.name} key`,children:e.jsx(jt,{})})})})]})})]})},Te="_custom_",Ge="credential-custom-key",Qe="credential-custom-key-error",We="credential-type",Ze="credential-type-help",Je="credential-value",Xe="credential-value-help",et=({open:t,onClose:a,onSave:s,initialKey:r="",existingKeys:n,isSaving:d,isEditMode:l})=>{const[u,m]=i.useState(r),[p,c]=i.useState(""),[y,S]=i.useState(""),[h,j]=i.useState(!1);i.useEffect(()=>{if(t){const v=ve.some(b=>b.key===r),P=!l&&r&&!v;m(v?r:""),c(""),S(P?r:""),j(P||l&&!v)}},[t,r,l]);const _=()=>{let v="";if(l?v=r:v=h?y.trim():u,!v){console.error("No key provided for credential");return}if(!p.trim()){console.error("No value provided for credential");return}s({key:v,value:p})},E=v=>n.includes(v)&&v!==r,R=E(y),q=l?!0:h?y.trim()!==""&&!R:u!==""&&!E(u),g=p.trim()!=="",O=q&&g&&!d,M=ve.find(v=>v.key===u),U=!!M&&!h,T=l?"Update credential":"Add new credential",A=e.jsxs(e.Fragment,{children:[e.jsx(C,{variant:"secondary",onClick:a,children:"Cancel"}),e.jsxs(C,{variant:"primary",onClick:_,disabled:!O,children:[d&&e.jsx(X,{size:"sm",className:"border-t-on-accent"}),d?"Saving...":"Save"]})]});return e.jsx(Zt,{open:t,onClose:a,title:T,actions:A,maxWidth:"sm",fullWidth:!0,children:e.jsxs("div",{className:"flex flex-col gap-4",children:[l?e.jsx(Q,{label:"Credential key",value:e.jsx("span",{className:"text-mono-sm",children:r})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(de,{htmlFor:We,children:"Credential type"}),e.jsxs(at,{value:h?Te:u,onValueChange:v=>{v===Te?(j(!0),m("")):(j(!1),m(v),S(""))},children:[e.jsx(nt,{id:We,"aria-describedby":U?Ze:void 0,children:e.jsx(rt,{placeholder:"Select a credential type"})}),e.jsxs(it,{children:[ve.filter(v=>!v.internal).map(v=>e.jsxs(Le,{value:v.key,disabled:E(v.key),children:[v.name,E(v.key)&&" (configured)"]},v.key)),e.jsx(Le,{value:Te,children:"Custom credential"})]})]}),U&&M&&e.jsxs("div",{id:Ze,className:"flex flex-col items-start gap-1",children:[e.jsx("p",{className:"text-meta text-ink-dim",children:M.description}),M.url&&e.jsxs("a",{href:M.url,target:"_blank",rel:"noopener noreferrer",className:"text-accent text-meta underline-offset-4 hover:text-accent-hover hover:underline",children:["Get your ",M.name," key"]})]})]}),h&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(de,{htmlFor:Ge,children:"Custom credential key"}),e.jsx(ne,{id:Ge,value:y,onChange:v=>S(v.target.value),"aria-invalid":R||void 0,"aria-describedby":R?Qe:void 0,required:!0,autoFocus:!0}),R&&e.jsx("p",{id:Qe,className:"text-danger text-meta",children:"This credential already exists"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(de,{htmlFor:Je,children:"Credential value"}),e.jsx(ne,{id:Je,type:"password",value:p,onChange:v=>c(v.target.value),onKeyDown:v=>{v.key==="Enter"&&O&&_()},"aria-describedby":l?Xe:void 0,required:!0,autoFocus:l,placeholder:"Enter the credential value or API key"}),l&&e.jsxs("p",{id:Xe,className:"text-ink-dim text-meta",children:["Enter the new value for ",r]})]})]})})},tt=({title:t,description:a,children:s,isEmpty:r=!1,emptyStateType:n="noCredentials"})=>e.jsxs("section",{children:[e.jsx("h3",{className:"text-body font-medium text-ink",children:t}),e.jsx("p",{className:"mt-1 max-w-2xl text-body-sm text-ink-muted",children:a}),e.jsx(Rt,{variant:"surface",padding:"sm",className:"mt-3",children:r?e.jsx(Za,{type:n}):e.jsx("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(260px,1fr))] gap-2",children:s})})]}),Za=({type:t,className:a})=>{const s=t==="noCredentials",r=s?Ce:ot;return e.jsxs("div",{className:J("flex flex-col items-center px-4 py-8 text-center",a),children:[e.jsx(r,{size:20,className:"text-ink-dim","aria-hidden":!0}),e.jsx("p",{className:"mt-3 text-body font-medium text-ink",children:s?"No credentials configured":"All available credentials configured"}),e.jsx("p",{className:"mt-1 max-w-sm text-body-sm text-ink-muted",children:s?"You haven't set up any API credentials yet. Add credentials from the available options or add a custom one.":"You've configured all the common API credentials. You can still add custom credentials if needed."})]})},Ja=()=>{const{data:t,isLoading:a,error:s,refetch:r}=bt(),n=Jt(),[d,l]=i.useState(!1),[u,m]=i.useState(!1),[p,c]=i.useState(null),y=g=>{c(g),l(!0)},S=(g=null)=>{c(g),m(!0)},h=()=>{l(!1),m(!1),c(null)},j=async g=>{try{await n.mutateAsync(g),h(),await r()}catch(O){console.error("Error saving credential:",O)}},_=async g=>{try{await n.mutateAsync({key:g,value:""}),await r()}catch(O){console.error("Error clearing credential:",O)}},E=i.useMemo(()=>t?.keys?.filter(g=>!ve.find(O=>O.key===g)?.internal)??[],[t]),R=i.useMemo(()=>ve.filter(g=>!E.includes(g.key)&&!g.internal),[E]),q=()=>a?e.jsx("div",{className:"flex min-h-40 items-center justify-center",children:e.jsx(X,{size:"lg",label:"Loading credentials"})}):s||!t?e.jsxs(K,{variant:"danger",role:"alert",children:[e.jsx(Mt,{children:"Could not load credentials"}),e.jsx(It,{children:s instanceof Error?s.message:"The server did not say why. Check that Local Operator is running, then reopen this page."})]}):e.jsxs(e.Fragment,{children:[e.jsx(tt,{title:"Configured credentials",description:"These API credentials are currently configured and available for use.",isEmpty:E.length===0,emptyStateType:"noCredentials",children:E.map(g=>e.jsx(Ye,{credentialKey:g,isConfigured:!0,onEdit:y,onClear:_},g))}),e.jsx(tt,{title:"Available credentials",description:"These are common API credentials you can configure to enhance functionality.",isEmpty:R.length===0,emptyStateType:"allConfigured",children:R.map(g=>e.jsx(Ye,{credentialKey:g.key,isConfigured:!1,onAdd:()=>S(g.key)},g.key))}),e.jsx("div",{className:"flex justify-center",children:e.jsxs(C,{variant:"secondary",size:"sm",onClick:()=>S(null),children:[e.jsx(Xt,{}),"Add custom credential"]})}),d&&e.jsx(et,{open:d,onClose:h,onSave:j,initialKey:p||"",existingKeys:E,isSaving:n.isPending,isEditMode:!0}),u&&e.jsx(et,{open:u,onClose:h,onSave:j,initialKey:p||"",existingKeys:E,isSaving:n.isPending,isEditMode:!1})]});return e.jsx("div",{className:"flex flex-col gap-6",children:q()})},Xa=[[[".claude.json"],"Claude Code"],[[".claude",".mcp.json"],"Claude Code"],[[".cursor","mcp.json"],"Cursor"],[[".vscode","mcp.json"],"VS Code"],[[".codex","config.toml"],"Codex CLI"]];function en(t){if(!t)return null;const a=t.split("\\").join("/").split("/").filter(Boolean);for(const[s,r]of Xa)if(!(a.length<s.length)&&a.slice(-s.length).join("/")===s.join("/"))return r;return null}const tn={list:"status",add:"add",remove:"remove",reload:"reload",connect:"reconnect",probe:"probe",disconnect:"disconnect",login:"grant",logout:"disconnect",reauth:"grant",status:"status",cancel:"cancel"},sn=(t,a)=>{const s=t?.trim();if(!s)return null;const r=is(s,a);return r.kind==="auth"?{kind:"matched",name:r.name,unresolved:null}:{kind:"miss",asked:s}},an=t=>t.reduce((a,s)=>a?(s.updated_at??0)>(a.updated_at??0)?s:a:s,null),nn=({sessionId:t,onAdded:a})=>{const[s,r]=i.useState(""),[n,d]=i.useState("command"),[l,u]=i.useState(""),[m,p]=i.useState(""),[c,y]=i.useState(""),[S,h]=i.useState("global"),[j,_]=i.useState(null),[E,R]=i.useState(!1),q=async()=>{R(!0),_(null);try{await ge({op:"mcp.control",sessionId:t,control:{action:"add",name:s,scope:S,...n==="command"?{command:l,args:m.split(`
|
|
92
|
+
`).map(g=>g.trim()).filter(Boolean)}:{url:c}}}),r(""),u(""),p(""),y(""),a()}catch(g){_(kt("add",g,!1))}finally{R(!1)}};return e.jsxs("form",{className:"flex flex-col gap-3 rounded-md border border-control bg-surface p-4",onSubmit:g=>{g.preventDefault(),q()},children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(de,{htmlFor:"mcp-add-name",children:"Name"}),e.jsx(ne,{id:"mcp-add-name",value:s,onChange:g=>r(g.target.value),required:!0})]}),e.jsxs("fieldset",{className:"flex gap-2",children:[e.jsx("legend",{className:"sr-only",children:"Server transport"}),e.jsx(C,{type:"button",variant:n==="command"?"secondary":"ghost",size:"sm",onClick:()=>d("command"),children:"Local command"}),e.jsx(C,{type:"button",variant:n==="url"?"secondary":"ghost",size:"sm",onClick:()=>d("url"),children:"Remote URL"})]}),n==="command"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(de,{htmlFor:"mcp-add-command",children:"Command"}),e.jsx(ne,{id:"mcp-add-command",value:l,onChange:g=>u(g.target.value),className:"font-mono",required:!0})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(de,{htmlFor:"mcp-add-args",children:"Arguments, one per line"}),e.jsx("textarea",{id:"mcp-add-args",value:m,onChange:g=>p(g.target.value),rows:2,className:"rounded-sm border border-control bg-surface p-2 font-mono text-body-sm text-ink"})]})]}):e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(de,{htmlFor:"mcp-add-url",children:"URL"}),e.jsx(ne,{id:"mcp-add-url",type:"url",value:c,onChange:g=>y(g.target.value),className:"font-mono",required:!0}),e.jsx("p",{className:"text-meta text-ink-dim",children:"No inline credentials or query parameters; secrets are referenced from the credential manager."})]}),e.jsxs("fieldset",{className:"flex gap-2",children:[e.jsx("legend",{className:"sr-only",children:"Configuration scope"}),e.jsx(C,{type:"button",variant:S==="global"?"secondary":"ghost",size:"sm",onClick:()=>h("global"),children:"Global"}),e.jsx(C,{type:"button",variant:S==="project"?"secondary":"ghost",size:"sm",onClick:()=>h("project"),children:"This project"})]}),j&&e.jsxs(K,{variant:"danger",children:[e.jsx("p",{children:j.message}),j.detail?e.jsx("p",{className:"font-mono text-ink-dim text-mono-sm",title:j.detail,children:j.detail}):null]}),e.jsx("div",{children:e.jsxs(C,{type:"submit",variant:"primary",size:"sm",disabled:E||!s||!(n==="command"?l:c),children:[E?e.jsx(X,{size:"sm"}):null,"Add server"]})})]})},rn=({sessionId:t,sectionRef:a,highlightServer:s})=>{const r=ft(),n=gt(r.data,"mcp"),d=ut(),l=be(f=>f.sessions),u=be(f=>f.fetchSessions),m=be(f=>f.loading),p=i.useMemo(()=>t?null:an(l),[t,l]),c=t??p?.session_id,[y,S]=i.useState(null),[h,j]=i.useState(null),[_,E]=i.useState(!1),[R,q]=i.useState(null),g=es({sessionId:c}),[O,M]=i.useState("");i.useEffect(()=>{t||!n||l.length>0||u()},[t,n,l.length,u]);const U=ye({queryKey:_e.list(c??""),queryFn:()=>{if(!c)throw new Error("No conversation selected.");return os(c)},enabled:n&&!!c,staleTime:1e4}),T=ts(U.data),A=i.useMemo(()=>sn(s,T.map(f=>f.name)),[s,T]),v=A?.kind==="matched"?A.name:null,P=i.useRef(null),b=i.useRef(null),W=O.trim().toLowerCase(),$=i.useMemo(()=>W?T.filter(f=>f.name.toLowerCase().includes(W)):T,[T,W]);i.useEffect(()=>{!v||b.current===v||!O||M("")},[v,O]),i.useEffect(()=>{v&&b.current!==v&&$.some(f=>f.name===v)&&(b.current=v,P.current?.scrollIntoView({block:"center",behavior:"smooth"}))},[v,$]);const Y=i.useCallback(()=>{c&&d.invalidateQueries({queryKey:_e.list(c)})},[d,c]),ee=i.useCallback(async(f,G,re={})=>{if(c){j(null);try{await ge({op:"mcp.control",sessionId:c,control:{action:f,name:G,...re}}),Y()}catch(Z){const w=d.getQueryData(_e.list(c));j(kt(tn[f],Z,ss(w?.operations)))}}},[d,c,Y]);return n?c?e.jsx(V,{title:"Integrations",description:"MCP servers connect agents to your tools and accounts. A connected server is a working transport; the account behind it may still need its own sign-in.",sectionRef:a,children:e.jsxs("div",{className:"flex flex-col gap-4",children:[h&&e.jsxs(K,{variant:"danger",children:[e.jsx("p",{children:h.message}),h.detail?e.jsx("p",{className:"font-mono text-ink-dim text-mono-sm",title:h.detail,children:h.detail}):null]}),p&&e.jsxs("p",{className:"text-body-sm text-ink-muted",children:["Showing MCP servers for"," ",p.title?.trim()||p.session_id.slice(0,6),", your most recent conversation. Open a conversation to see its own list."]}),U.isLoading&&e.jsx("div",{className:"flex h-24 items-center justify-center",children:e.jsx(X,{size:"lg",label:"Loading MCP servers"})}),U.isError&&e.jsx(K,{variant:"warning",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{children:"MCP servers could not be loaded."}),e.jsx(C,{variant:"secondary",size:"sm",onClick:()=>void U.refetch(),children:"Retry"})]})}),T.length>0&&e.jsxs("div",{className:"relative",children:[e.jsx(xt,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-ink-dim"}),e.jsx(ne,{value:O,onChange:f=>M(f.target.value),placeholder:"Search MCP servers","aria-label":"Search MCP servers",className:"pl-9"})]}),A?.kind==="miss"&&T.length>0&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:`No MCP server matches "${A.asked}".`}),A?.kind==="matched"&&A.unresolved&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:`Showing "${A.name}" — "${A.unresolved}" is not one of your servers.`}),U.isSuccess&&T.length===0&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:"No MCP servers configured yet. Add one below."}),T.length>0&&$.length===0&&e.jsxs("div",{className:"flex flex-col items-start gap-2",children:[e.jsx("p",{className:"text-body-sm text-ink-muted",children:"No MCP servers match this search."}),e.jsx(C,{variant:"secondary",size:"sm",onClick:()=>M(""),children:"Clear search"})]}),$.length>0&&e.jsx("ul",{className:"flex flex-col gap-2",children:$.map(f=>{const G=f.status==="connected",re=f.name===v,Z=f.owned_scope,w=f.transport==="http"&&f.transport_oauth_supported!==!1,z=en(f.source);return e.jsxs("li",{ref:re?P:void 0,className:J("flex flex-col gap-2 rounded-md border border-control bg-surface p-3",re&&"border-accent bg-elevated"),children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-medium text-body text-ink",children:f.name}),Z&&e.jsx(Ne,{variant:"outline",children:Z==="project"?"This project":"Global"}),f.transport&&e.jsx("span",{className:"text-meta text-ink-dim",children:f.transport})]}),e.jsx(Ne,{variant:G?"success":f.status==="connecting"?"info":f.status==="auth-required"?"warning":"neutral",children:f.status??"unknown"})]}),typeof f.tool_count=="number"&&e.jsxs("p",{className:"text-meta text-ink-dim",children:[f.tool_count," tools available"]}),f.status==="auth-required"&&!w&&e.jsx("p",{className:"text-meta text-ink-dim",children:f.setup?.text?"This server needs credentials local-operator cannot collect. Copy the setup prompt to have an agent walk you through it.":"This server needs credentials local-operator cannot collect."}),!Z&&e.jsxs("p",{className:"text-meta text-ink-dim",children:[z?`Imported from ${z}.`:"Imported from a configuration local-operator does not write."," ",f.source?e.jsxs(e.Fragment,{children:["Remove it in"," ",e.jsx("span",{className:"font-mono text-mono-sm text-ink-dim",children:as(f.source)}),"."]}):e.jsx(e.Fragment,{children:"Remove it wherever it is defined."})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[G?e.jsxs(C,{variant:"secondary",size:"sm",onClick:()=>{S(null),ee("disconnect",f.name,{confirmed:!0})},children:[e.jsx(wt,{"aria-hidden":"true"}),"Disconnect"]}):e.jsxs(C,{variant:"secondary",size:"sm",onClick:()=>void ee("connect",f.name),children:[e.jsx(ra,{"aria-hidden":"true"}),"Connect"]}),e.jsxs(C,{variant:"ghost",size:"sm",onClick:()=>void ee("reload",f.name),children:[e.jsx(Lt,{"aria-hidden":"true"}),"Reload"]}),e.jsx(C,{variant:"ghost",size:"sm",onClick:()=>{const L=ns(U.data?.servers??[]).find(B=>B.name===f.name);L&&q({row:L,sessionId:c})},children:"Sign in"}),f.setup?.text?e.jsx(C,{variant:"ghost",size:"sm",onClick:()=>{navigator.clipboard.writeText(f.setup?.text??"").catch(()=>{})},children:"Copy setup prompt"}):null,Z?y===f.name?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"text-body-sm text-ink",children:["Remove ",f.name,"?"]}),e.jsx(C,{variant:"danger",size:"sm",onClick:()=>{S(null),ee("remove",f.name,{confirmed:!0,scope:Z})},children:"Confirm removal"}),e.jsx(C,{variant:"ghost",size:"sm",onClick:()=>S(null),children:"Keep"})]}):e.jsxs(C,{variant:"ghost",size:"sm",className:"text-danger",onClick:()=>S(f.name),children:[e.jsx(yt,{"aria-hidden":"true"}),"Remove"]}):null]})]},f.name)})}),R?.sessionId===c?e.jsx(rs,{row:R.row,remedy:g,onClose:()=>q(null)},c):null,_?e.jsx(nn,{sessionId:c,onAdded:()=>{E(!1),Y()}}):e.jsx("div",{children:e.jsx(C,{variant:"secondary",size:"sm",onClick:()=>E(!0),"data-tour-tag":"mcp-add-server",children:"Add server"})})]})}):e.jsx(V,{title:"Integrations",description:"MCP servers connect agents to your tools and accounts.",sectionRef:a,children:m?e.jsx("div",{className:"flex h-24 items-center justify-center",children:e.jsx(X,{size:"lg",label:"Loading MCP servers"})}):e.jsx("p",{className:"text-body-sm text-ink-muted",children:"Open a conversation to manage its MCP servers."})}):e.jsx(V,{title:"Integrations",description:"MCP servers connect agents to your tools and accounts.",sectionRef:a,children:e.jsx(K,{variant:"warning",children:"Integration management needs a newer Local Operator backend. Update the backend and restart the app to manage MCP servers here."})})},on=({onAfterCredentialUpdate:t})=>{const{isAuthenticated:a,user:s,isLoading:r,error:n,signOut:d}=ls(),l=Nt(c=>c.isSigningOut),u=i.useCallback(async()=>{try{await d()}catch(c){console.error("Error signing out:",c)}},[d]),m=i.useMemo(()=>{if(!a||!s?.radientUser)return null;const{account:c,identity:y}=s.radientUser;return e.jsxs(e.Fragment,{children:[e.jsxs(Oe,{children:[e.jsx(Q,{label:"Status",value:e.jsxs("span",{className:"inline-flex items-center gap-2",children:["Connected",e.jsx(Ne,{variant:"success",className:"capitalize",children:c.status})]})}),e.jsx(Q,{label:"Name",value:c.name||"Not provided"}),e.jsx(Q,{label:"Email",value:c.email}),e.jsx(Q,{label:"Account ID",value:e.jsx("span",{className:"text-mono-sm",children:c.id})}),e.jsx(Q,{label:"Tenant ID",value:e.jsx("span",{className:"text-mono-sm",children:c.tenant_id})}),e.jsx(Q,{label:"Provider",value:e.jsx("span",{className:"capitalize",children:y.provider})}),e.jsx(Q,{label:"Created",value:Ct(c.created_at)})]}),e.jsxs("div",{className:"mt-8",children:[e.jsx("p",{className:"text-body-sm text-ink-muted",children:"Need to sign out or switch accounts?"}),e.jsxs(C,{variant:"danger",className:"mt-3",onClick:u,children:[e.jsx(cs,{}),"Sign out from Radient"]})]})]})},[a,s?.radientUser,u]),p=i.useMemo(()=>a&&s?null:e.jsxs("div",{children:[e.jsx("p",{className:"text-body-sm text-ink-muted",children:"You are not currently signed in to Radient. Sign in to access your account details or sign up to get free credits and unified access to models, tools, and more with Radient Pass. Radient's automatic model router will automatically select the best model for your agents to balance cost and performance. It is often cheaper to use Radient Pass than to use single AI providers due to automatic cost optimization."}),e.jsx("div",{className:"mt-6",children:e.jsx(Is,{titleText:"",onAfterCredentialUpdate:t,descriptionText:"",onSignInSuccess:()=>{}})})]}),[a,s,t]);return r||l?e.jsx("div",{className:"flex min-h-36 items-center justify-center",children:e.jsx(X,{size:"lg",label:"Loading account"})}):a&&s?.radientUser?m:e.jsxs("div",{className:"flex flex-col gap-4",children:[n&&e.jsxs(K,{variant:"danger",children:["Error checking account status:"," ",n instanceof Error?n.message:String(n)]}),p]})};function ln({metric:t,data:a}){return e.jsx(ds,{title:"",heightClassName:"h-62",yAxisWidth:48,unit:t==="credits"?"credits":"tokens",srSummary:`${t==="credits"?"Credits consumed":"Tokens used"} over the last 30 days, plotted per day across ${a.length} days.`,xTickFormatter:s=>s,yTickFormatter:s=>t==="credits"?`$${s.toFixed(2)}`:us(s),children:e.jsx(ja,{data:a,children:e.jsx(mt,{type:"monotone",dataKey:"value",strokeWidth:2,dot:!1,activeDot:{r:4,strokeWidth:0},name:t==="credits"?"Credits consumed":"Tokens used"})})})}const cn=()=>{const{data:t,isLoading:a,error:s,refetch:r}=ga(),n=va(),[d,l]=i.useState(""),[u,m]=i.useState(!1);i.useEffect(()=>{l(t?.content??""),m(!1)},[t]);const p=j=>{const _=j.target.value;l(_),m(_!==(t?.content??""))},c=async()=>{if(!(!u||n.isPending))try{const j={content:d};await n.mutateAsync(j),await r(),m(!1)}catch(j){console.error("Error updating system prompt:",j)}},y=()=>{l(t?.content??""),m(!1)},S=n.isPending,h=()=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(de,{htmlFor:"app-system-prompt",children:"Instructions"}),e.jsx(Ie,{id:"app-system-prompt",name:"systemPrompt",value:d,onChange:p,placeholder:"Enter instructions for how all agents should behave and respond to your requests...",className:"min-h-50"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs(C,{variant:"primary",onClick:c,disabled:!u||S,children:[S?e.jsx(X,{size:"sm"}):e.jsx(ms,{}),S?"Saving...":"Save changes"]}),e.jsx(C,{onClick:y,disabled:!u||S,children:"Cancel"})]}),t?.last_modified&&e.jsxs("p",{className:"text-ink-dim text-meta",children:["Last modified:"," ",e.jsx("span",{className:"font-mono text-mono-sm",children:St(t.last_modified)})]})]});return e.jsx(V,{title:"System prompt",icon:Ls,description:"Every Local Operator agent receives this prompt in addition to its own instructions, so it is the place for baseline expectations and for details you want every agent to know about you, such as your name, location, or preferences. It is sent to your selected hosting provider.",children:a?e.jsx("div",{className:"flex min-h-50 items-center justify-center",children:e.jsx(X,{size:"lg",label:"Loading system prompt"})}):s?e.jsxs(K,{variant:"danger",children:["Failed to load system prompt:"," ",s instanceof Error?s.message:"Unknown error"]}):h()})},dn={localOperatorDark:ta,localOperatorLight:ua,radient:Qs,dracula:oa,dune:Ys,sage:Zs,monokai:Pt,tokyoNight:aa,iceberg:ca,neon:xa,obsidian:_t,synth:Os},un=({id:t})=>e.jsxs("div",{"data-theme":t,"aria-hidden":"true",className:"flex h-full bg-canvas",children:[e.jsxs("div",{className:"flex w-1/4 flex-col gap-1 bg-sunken p-1.5",children:[e.jsx("span",{className:"flex h-2.5 items-center rounded-xs bg-accent-wash px-1",children:e.jsx("span",{className:"h-1 w-full rounded-xs bg-accent"})}),e.jsx("span",{className:"mx-1 h-1 w-2/3 rounded-xs bg-ink-dim"}),e.jsx("span",{className:"mx-1 h-1 w-1/2 rounded-xs bg-ink-dim"})]}),e.jsxs("div",{className:"flex flex-1 flex-col justify-between p-2",children:[e.jsxs("div",{className:"flex flex-col gap-1.5 rounded-sm bg-surface p-2",children:[e.jsx("span",{className:"h-1.5 w-3/5 rounded-xs bg-ink"}),e.jsx("span",{className:"h-1 w-full rounded-xs bg-ink-dim"}),e.jsx("span",{className:"h-1 w-4/5 rounded-xs bg-ink-dim"})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-3 w-9 rounded-xs bg-accent"}),e.jsx("span",{className:"h-3 w-6 rounded-xs border border-control"})]})]})]}),mn=({id:t,name:a,description:s,isSelected:r,onSelect:n})=>{const d=dn[t];return e.jsxs("button",{type:"button","aria-pressed":r,onClick:n,className:J("flex flex-col gap-2 rounded-lg p-2 text-left transition-colors duration-fast ease-out-quart",r?"bg-accent-wash":"hover:bg-surface"),children:[e.jsx("span",{className:J("block aspect-16/10 overflow-hidden rounded-md border transition-colors duration-fast ease-out-quart",r?"border-accent":"border-hairline"),children:e.jsx(un,{id:t})}),e.jsxs("span",{className:"flex items-center gap-2 px-1",children:[e.jsx(d,{size:14,className:"shrink-0 text-ink-dim","aria-hidden":"true"}),e.jsx("span",{className:J("min-w-0 flex-1 truncate text-body-sm text-ink",r&&"font-medium"),children:a}),r&&e.jsx(ot,{size:14,className:"shrink-0 text-accent","aria-hidden":"true"})]}),e.jsx("span",{className:"px-1 pb-1 text-meta text-ink-muted",children:s})]})},hn=()=>{const{themeName:t,setTheme:a}=Fe(),s=i.useMemo(()=>{const r=Object.values(Ft);return[{label:"Dark",items:r.filter(n=>n.theme.palette.mode==="dark")},{label:"Light",items:r.filter(n=>n.theme.palette.mode==="light")}].filter(n=>n.items.length>0)},[]);return e.jsx("div",{className:"flex flex-col gap-6",children:s.map(r=>e.jsxs("div",{children:[e.jsx("h3",{className:"px-1 pb-2 text-meta text-ink-dim",children:r.label}),e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-2",children:r.items.map(({id:n,name:d,description:l})=>e.jsx(mn,{id:n,name:d,description:l,isSelected:n===t,onSelect:()=>a(n)},n))})]},r.label))})},pn=()=>{const{data:t,isLoading:a,error:s}=wa({enabled:!0});return e.jsxs("div",{children:[e.jsxs("h3",{className:"mb-3 flex items-center gap-2 text-heading text-ink",children:[e.jsx(Vs,{size:16,className:"shrink-0 text-ink-dim"}),"Radient Pass"]}),a&&e.jsx(lt,{className:"h-6 w-36"}),s&&e.jsxs(K,{variant:"warning",children:["Could not load your credit balance. ",s.message]}),t&&!a&&!s&&e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsxs("p",{className:"flex-1 text-body-sm text-ink-muted",children:["Available credits"," ",e.jsx("span",{className:"font-medium text-ink",children:t.balance.toFixed(2)})]}),e.jsx(C,{variant:"secondary",size:"sm",asChild:!0,children:e.jsxs("a",{href:"https://console.radienthq.com/dashboard/billing",target:"_blank",rel:"noopener noreferrer",children:[e.jsx(qs,{}),"Add credits"]})})]})]})},xn=[{id:"credits",label:"Credits"},{id:"tokens",label:"Tokens"}],fn=()=>{const[t,a]=i.useState("credits"),s=i.useMemo(()=>{const u=new Date,m=ba(u);return{start_date:Ve(m),end_date:Ve(u),rollup:"daily"}},[]),{data:r,isLoading:n,error:d}=Sa(s,{enabled:!0}),l=i.useMemo(()=>r?.data_points?[...r.data_points].sort((m,p)=>Ee(m.timestamp).getTime()-Ee(p.timestamp).getTime()).map(m=>({bucket:Es(Ts(Ee(m.timestamp),"yyyy-MM-dd")),value:t==="credits"?Number.parseFloat(m.total_cost.toFixed(2)):m.total_tokens})):[],[r,t]);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-5 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("h3",{className:"flex items-center gap-2 text-heading text-ink",children:[e.jsx(Us,{size:16,className:"shrink-0 text-ink-dim"}),"Usage (last 30 days)"]}),e.jsxs("fieldset",{className:"m-0 w-fit border-0 p-0",children:[e.jsx("legend",{className:"sr-only",children:"Usage metric"}),e.jsx("div",{className:"flex gap-0.5 rounded-md bg-sunken p-0.5",children:xn.map(({id:u,label:m})=>e.jsx(C,{variant:"ghost",size:"sm","aria-pressed":t===u,onClick:()=>a(u),className:J(t===u&&"bg-surface text-ink hover:bg-surface"),children:m},u))})]})]}),n&&e.jsx(lt,{className:"h-62 w-full"}),d&&e.jsxs(K,{variant:"warning",children:["Could not load your usage data. ",d.message]}),!n&&!d&&r&&l.length>0&&e.jsx(ln,{metric:t,data:l}),!n&&!d&&(!r||l.length===0)&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:"No usage recorded in the last 30 days."})]})},gn=()=>e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("h2",{className:"flex items-center gap-2 text-heading text-ink",children:[e.jsx(Rs,{size:16,className:"shrink-0 text-ink-dim"}),"Radient account"]}),e.jsx(C,{variant:"secondary",size:"sm",className:"self-start sm:self-center",asChild:!0,children:e.jsxs("a",{href:"https://console.radienthq.com",target:"_blank",rel:"noopener noreferrer",children:["Go to Radient console",e.jsx(jt,{})]})})]}),wn=()=>{const t=Fe(w=>w.showAgentReasoning),a=Fe(w=>w.setShowAgentReasoning),{data:s,isLoading:r,isFetching:n,error:d,refetch:l}=hs(),u=ps(),[m,p]=i.useState(null),c=Nt(),{isAuthenticated:y,isLoading:S}=ze(),h=be(w=>w.activeSessionId),[j,_]=i.useState("general"),[E,R]=i.useState(!1),q=i.useRef(null),g=i.useRef(null),{startTour:O}=xs(),M=fs(),{data:U,refetch:T}=bt(),{refreshModels:A}=gs(),v=i.useMemo(()=>U?.keys?[...U.keys].sort():[],[U?.keys]),P=i.useRef({keys:"",hosting:void 0});i.useEffect(()=>{const w=v.join(","),z=s?.values?.hosting;(P.current.keys!==w||P.current.hosting!==z)&&(P.current={keys:w,hosting:z},A().catch(L=>{console.error("Failed to refresh models after credentials or hosting change:",L)}))},[v,s?.values?.hosting,A]);const b=i.useRef({general:i.useRef(null),radient:i.useRef(null),integrations:i.useRef(null),appearance:i.useRef(null),credentials:i.useRef(null),providers:i.useRef(null),backend:i.useRef(null),updates:i.useRef(null)}).current,W=i.useMemo(()=>new URLSearchParams(M.search).get("setting"),[M.search]),$=i.useMemo(()=>new URLSearchParams(M.search).get("filter")??"",[M.search]),Y=i.useMemo(()=>new URLSearchParams(M.search).get("mcp")??void 0,[M.search]),ee=i.useMemo(()=>new URLSearchParams(M.search).get("provider"),[M.search]),f=i.useCallback(w=>{_(w),R(!0);const z=b[w],L=g.current;if(z?.current&&L){const D=z.current.getBoundingClientRect().top-L.getBoundingClientRect().top;L.scrollHeight>L.clientHeight?L.scrollTo({top:Math.max(0,L.scrollTop+D-80),behavior:"smooth"}):window.scrollTo({top:Math.max(0,z.current.getBoundingClientRect().top+window.scrollY-80),behavior:"smooth"}),clearTimeout(q.current??void 0),q.current=setTimeout(()=>{R(!1),q.current=null},800)}else R(!1)},[b]);i.useEffect(()=>{const w=setTimeout(()=>{const z=g.current;if(!z)return;const L=()=>{if(E)return;const B=z.getBoundingClientRect(),D=B.height;let te="",se=0;for(const[ue,ie]of Object.entries(b))if(ie.current){const ae=ie.current.getBoundingClientRect(),le=B.top,oe=ae.top-le,je=ae.bottom-le,Se=ae.height,o=Math.max(0,oe),x=Math.min(D,je),N=Math.max(0,x-o)/Se,F=N+(oe<D*.3?.1:0);F>se&&N>.1&&(se=F,te=ue)}te&&te!==j&&_(te)};return L(),z.addEventListener("scroll",L,{passive:!0}),()=>{z.removeEventListener("scroll",L),clearTimeout(q.current??void 0)}},100);return()=>clearTimeout(w)},[b,j,E]),i.useEffect(()=>{const w=new URLSearchParams(M.search),z=w.get("section"),L=w.get("setting")?"backend":z,B=L?b[L]:void 0;if(!L||!B)return;let D=!1,te=Number.NaN,se=0;const ue=window.setTimeout(()=>{D||(D=!0,ae.disconnect(),f(L))},2e3),ie=()=>{if(D)return;const le=B.current;if(!le){se=requestAnimationFrame(ie);return}const oe=Math.round(le.getBoundingClientRect().top+window.scrollY);if(oe===te&&oe>0){D=!0,ae.disconnect(),window.clearTimeout(ue),f(L);return}te=oe,se=requestAnimationFrame(ie)},ae=new ResizeObserver(()=>{D||(cancelAnimationFrame(se),se=requestAnimationFrame(ie))});return g.current&&ae.observe(g.current),se=requestAnimationFrame(ie),()=>{D=!0,cancelAnimationFrame(se),ae.disconnect(),window.clearTimeout(ue)}},[M.search,b,f]);const G=async(w,z)=>{p(w);try{await u.mutateAsync({[w]:z}),await l()}catch(L){console.error(`Error updating ${w}:`,L)}finally{p(null)}},re=r||S,Z=Na(re,4e3);return d?e.jsx("div",{className:"flex h-full w-full items-center justify-center bg-canvas p-6",children:e.jsx(K,{variant:"warning",className:"w-full max-w-xl",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{children:vt("Your settings could not be loaded.",d)}),e.jsx(C,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>void l(),disabled:n,children:n?"Retrying":"Retry"})]})})}):re?e.jsxs("div",{role:"status",className:"flex h-full w-full flex-col items-center justify-center gap-3 bg-canvas",children:[e.jsx(X,{size:"lg",label:Z?void 0:"Loading settings"}),Z&&e.jsx("p",{className:"max-w-sm text-center text-body-sm text-ink-muted",children:"The Local Operator server is taking longer than usual to answer. If it does not respond, you will be able to retry from here."})]}):s?e.jsxs("div",{className:"flex h-full w-full overflow-hidden bg-canvas",children:[e.jsx("div",{className:"w-12 shrink-0 overflow-y-auto border-r border-hairline min-[1040px]:w-55",children:e.jsx(vs,{activeSection:j,onSelectSection:f,sections:ys})}),e.jsx("div",{ref:g,"data-settings-content":!0,"data-tour-tag":"settings-general-section",className:"flex-1 overflow-y-auto overflow-x-hidden p-4 sm:p-6 md:p-8",children:e.jsxs("div",{className:"mx-auto flex w-full max-w-4xl flex-col gap-8 pb-8",children:[e.jsx(Ms,{title:"Settings",icon:Be}),e.jsxs("div",{className:"flex flex-col gap-8",children:[e.jsxs("div",{ref:b.general,className:"flex flex-col gap-8",children:[e.jsx(V,{title:"User profile",icon:js,description:`Your user profile information displayed in the application. This information is not provided to the agents. ${y?"These details are provided through your Radient account.":""}`,children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(He,{value:c.profile.name,label:"Display name",placeholder:"Enter your name...",isSaving:m==="user_name",onSave:async w=>{p("user_name");try{c.updateName(w)}finally{p(null)}},readOnly:y}),e.jsx(He,{value:c.profile.email,label:"Email address",placeholder:"Enter your email...",isSaving:m==="user_email",onSave:async w=>{p("user_email");try{c.updateEmail(w)}finally{p(null)}},readOnly:y})]})}),e.jsx(V,{title:"Application tour",description:"Missed the application onboarding tour or want a refresher? Start it again here.",children:e.jsxs(C,{variant:"secondary",onClick:()=>{O({forceModalCompleted:!0})},children:[e.jsx(bs,{}),"Take the tour"]})}),e.jsx(V,{title:"Model settings",icon:ks,description:"Configure the default AI model and hosting providers used for generating responses. This will be used for all agents that don't have a specific model or hosting provider configured. You can override these settings for individual agents in the agent settings.",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ws,{value:s.values.hosting,isSaving:m==="hosting",onSave:w=>G("hosting",w),filterByCredentials:!0,allowCustom:!0,allowDefault:!1,emptyHelperText:"No hosting providers available. Add one in API credentials, in the list on the left."}),e.jsx(Ns,{value:s.values.model_name,hostingId:s.values.hosting,isSaving:m==="model_name",onSave:w=>G("model_name",w),allowCustom:!0,allowDefault:!1}),e.jsx(K,{variant:"neutral",icon:e.jsx(Me,{className:"size-4","aria-hidden":"true"}),children:"You need a Radient account or your own API keys to reach cloud providers. If you don't see more hosting providers and models here, add credentials or sign in to Radient."})]})}),e.jsx(cn,{}),e.jsx(V,{title:"History settings",icon:Ps,description:"Configure how much conversation history is retained and displayed. These are tools to help balance cost and performance by controlling the amount of data used by the agents.",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Ae,{value:s.values.conversation_length,label:"Maximum conversation history",description:"Number of messages to keep in conversation history for context. More messages will make the agents have longer memory but more expensive to run. Recommended: 100",min:10,max:500,step:10,unit:"msgs",icon:Cs,isSaving:m==="conversation_length",onChange:w=>G("conversation_length",w)}),e.jsx(Ae,{value:s.values.detail_length,label:"Detail view length",description:"Maximum number of messages to show in the detailed conversation view. Messages beyond this limit will be summarized. Shortening this will decrease costs but some important details could get lost from earlier messages. Recommended: 15",min:10,max:500,step:5,unit:"msgs",icon:Ss,isSaving:m==="detail_length",onChange:w=>G("detail_length",w)}),e.jsx(Ae,{value:s.values.max_learnings_history,label:"Maximum learnings history",description:"Agents note down specific insights and key learnings in memory which persist beyond the maximum conversation history and summarization. This setting controls the maximum number of learning items to retain. More items will make the agents acquire a longer history of knowledge from your conversations but more expensive to run. Recommended: 50",min:10,max:200,step:10,unit:"notes",icon:_s,isSaving:m==="max_learnings_history",onChange:w=>G("max_learnings_history",w)})]})}),e.jsx(V,{title:"Configuration information",icon:Me,description:"System information about the current configuration.",children:e.jsxs(Oe,{children:[e.jsx(Q,{label:"Version",value:e.jsx("span",{className:"text-mono-sm",children:s.version})}),e.jsx(Q,{label:"Created",value:Ct(s.metadata.created_at)}),e.jsx(Q,{label:"Last modified",value:St(s.metadata.last_modified)}),e.jsx(Q,{label:"Description",value:s.metadata.description||"No description available"})]})})]}),e.jsx(V,{title:"Appearance",icon:_t,description:"Customize the look and feel of Local Operator",sectionRef:b.appearance,dataTourTag:"settings-appearance-section",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(hn,{}),e.jsx(ya,{value:t,label:"Show agent reasoning",description:"Adds the agent's Reasoning and Thinking rows to conversations. They stay closed until you open one.",onChange:async w=>a(w)})]})}),e.jsx(V,{title:"Radient account",titleComponent:e.jsx(gn,{}),description:"Manage your Radient account, Radient Pass details, and credits.",sectionRef:b.radient,dataTourTag:"settings-radient-account-section",children:e.jsxs("div",{className:"flex flex-col gap-8",children:[e.jsx(on,{onAfterCredentialUpdate:()=>{A(),T()}}),y&&e.jsxs(e.Fragment,{children:[e.jsx(pn,{}),e.jsx(fn,{})]})]})}),e.jsx(V,{title:"Providers",icon:wt,description:"Model providers, how you sign in to each, and which are connected.",sectionRef:b.providers,children:e.jsx(As,{initialProviderId:ee})}),e.jsx(V,{title:"Backend settings",icon:Be,description:"Every setting the backend registry owns, searchable, with typed editors and scopes.",sectionRef:b.backend,children:e.jsx(Wa,{focusKey:W,initialFilter:$})}),e.jsx(rn,{sessionId:h??void 0,sectionRef:b.integrations,highlightServer:Y}),e.jsx(V,{title:"API credentials",icon:Ce,description:"Manage your API keys for various services and integrations",sectionRef:b.credentials,dataTourTag:"settings-api-credentials-section",children:e.jsx(Ja,{})}),e.jsx("div",{ref:b.updates,children:e.jsx(Ea,{})})]})]})})]}):e.jsx("div",{className:"flex h-full w-full items-center justify-center bg-canvas p-6",children:e.jsx(K,{variant:"warning",className:"w-full max-w-xl",children:"Your settings could not be loaded."})})};export{wn as SettingsPage};
|
package/out/renderer/assets/{stateDiagram-DGXRK772-BU61mCRl.js → stateDiagram-DGXRK772-D_Odl8sh.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as W,a as P,S as N}from"./chunk-AEK57VVT-BLSI3HXI.js";import{_ as u,c as t,d as H,l as S,e as C,k as z,u as F}from"./mermaid.core-CSbV60u2.js";import{G as U}from"./graph-BJLMjElP.js";import{l as O}from"./layout-WV6NJdBh.js";import{F as J,G as X}from"./index-COT32Ss8.js";import"./chunk-RZ5BOZE2-DHF6boxY.js";import"./icon-CsHr0elv.js";import"./_baseUniq-xS2rgm41.js";import"./_basePickBy-B2ftfnSj.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),A=u(()=>Object.keys(L),"keys"),I=u(()=>A().length,"size"),$={get:Y,set:D,keys:A,size:I},j=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"),q=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"),G=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"&&j(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"&&q(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"),_=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"+_).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}=F.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)}_++},"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 U({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=G(i,f,a);if(f.note){const w={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},v=G(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},yt={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{yt as diagram};
|
|
1
|
+
import{s as W,a as P,S as N}from"./chunk-AEK57VVT-DlvJjW1D.js";import{_ as u,c as t,d as H,l as S,e as C,k as z,u as F}from"./mermaid.core-CTF22veB.js";import{G as U}from"./graph-BPMdi6cQ.js";import{l as O}from"./layout-Dt9rFxLo.js";import{F as J,G as X}from"./index-CV6OexwP.js";import"./chunk-RZ5BOZE2-DVV9SVAw.js";import"./icon-KrVT-csH.js";import"./_baseUniq-B5WxfAdh.js";import"./_basePickBy-DBhtDEGA.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),A=u(()=>Object.keys(L),"keys"),I=u(()=>A().length,"size"),$={get:Y,set:D,keys:A,size:I},j=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"),q=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"),G=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"&&j(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"&&q(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"),_=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"+_).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}=F.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)}_++},"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 U({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=G(i,f,a);if(f.note){const w={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},v=G(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},yt={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{yt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as e,b as r,a,S as s}from"./chunk-AEK57VVT-DlvJjW1D.js";import{_ as i}from"./mermaid.core-CTF22veB.js";import"./chunk-RZ5BOZE2-DVV9SVAw.js";import"./index-CV6OexwP.js";import"./icon-KrVT-csH.js";var p={parser:a,get db(){return new s(2)},renderer:r,styles:e,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{p as diagram};
|
|
@@ -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-CTF22veB.js";import{d as nt}from"./arc-Dcd3HzRZ.js";import"./index-CV6OexwP.js";import"./icon-KrVT-csH.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 +1 @@
|
|
|
1
|
-
import{aa as a,g as s,ab as y,f as c,ac as l,ad as g,ae as f,af as h,ag as A,ah as q,ai as w,aj as v}from"./index-
|
|
1
|
+
import{aa as a,g as s,ab as y,f as c,ac as l,ad as g,ae as f,af as h,ag as A,ah as q,ai as w,aj as v}from"./index-CV6OexwP.js";const u={all:["agent-favourite"],detail:t=>[...u.all,t]},F=({agentId:t,enabled:n=!0})=>{const{isAuthenticated:i}=a(),e=s({queryKey:u.detail(t||"invalid"),queryFn:async()=>{if(!t)throw new Error("Agent ID is required to fetch favourite status.");if(!i)throw new Error("Authentication required to fetch favourite status.");return(await y(t)).result},enabled:!!t&&n&&i,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!0}),r=!!e.data&&Object.keys(e.data).length>0;return{...e,isFavourited:r}},m=()=>{const t=c(),{isAuthenticated:n}=a();return l({mutationFn:async({agentId:e,isCurrentlyFavourited:r})=>{if(!n)throw new Error("Authentication required to favourite/unfavourite an agent.");if(!e)throw new Error("Agent ID is required.");return r?f(e):h(e)},onSuccess:(e,r)=>{t.invalidateQueries({queryKey:u.detail(r.agentId)}),t.invalidateQueries({queryKey:g.count(r.agentId)})},onError:e=>{console.error("Failed to toggle favourite status:",e)}})},o={all:["agent-like"],detail:t=>[...o.all,t]},E=({agentId:t,enabled:n=!0})=>{const{isAuthenticated:i}=a(),e=s({queryKey:o.detail(t||"invalid"),queryFn:async()=>{if(!t)throw new Error("Agent ID is required to fetch like status.");if(!i)throw new Error("Authentication required to fetch like status.");return(await A(t)).result},enabled:!!t&&n&&i,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!0}),r=!!e.data&&Object.keys(e.data).length>0;return{...e,isLiked:r}},K=()=>{const t=c(),{isAuthenticated:n}=a();return l({mutationFn:async({agentId:e,isCurrentlyLiked:r})=>{if(!n)throw new Error("Authentication required to like/unlike an agent.");if(!e)throw new Error("Agent ID is required.");return r?w(e):v(e)},onSuccess:(e,r)=>{t.invalidateQueries({queryKey:o.detail(r.agentId)}),t.invalidateQueries({queryKey:q.count(r.agentId)})},onError:e=>{console.error("Failed to toggle like status:",e)}})};export{F as a,K as b,m as c,E 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 hi,z as ri,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 hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-CTF22veB.js";import{E as kt,D as Tt,F as Rt}from"./index-CV6OexwP.js";import"./icon-KrVT-csH.js";var at=function(){var t=n(function(B,h,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=h);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],y=[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],r=[1,36],D=[1,37],N=[1,43],mt=[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(h,l,c,u,m,a,X){var x=a.length-1;switch(m){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(y,[2,34]),t(y,[2,35]),t(y,[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(y,[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:r,50:D},{11:39,13:38,24:N,27:mt,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:r,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:r,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:r,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:r,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:r,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:mt}),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:r,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:r,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(h,l){if(l.recoverable)this.trace(h);else{var c=new Error(h);throw c.hash=l,c}},"parseError"),parse:n(function(h){var l=this,c=[0],u=[],m=[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(h,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,m.length=m.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),m.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.$=m[m.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],m,a].concat(Zt)),typeof st<"u")return st;M&&(c=c.slice(0,-1*M*2),m=m.slice(0,-1*M),a=a.slice(0,-1*M)),c.push(this.productions_[v[1]][0]),m.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(h,l){return this.yy=l||this.yy||{},this._input=h,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 h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var l=h.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),h},"input"),unput:n(function(h){var l=h.length,c=h.split(/(?:\r\n?|\n)/g);this._input=h+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 m=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=[m[0],m[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(h){this.unput(this.match.slice(h))},"less"),pastInput:n(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var h=this.pastInput(),l=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
package/out/renderer/index.html
CHANGED
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
<meta http-equiv="Content-Security-Policy"
|
|
25
25
|
content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111 ws://localhost:1111 ws://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: http://localhost:1111 http://127.0.0.1:1111 https://accounts.google.com https://login.microsoftonline.com" />
|
|
26
26
|
<meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin-allow-popups" />
|
|
27
|
-
<script type="module" crossorigin src="./assets/index-
|
|
28
|
-
<link rel="modulepreload" crossorigin href="./assets/icon-
|
|
29
|
-
<link rel="stylesheet" crossorigin href="./assets/icon-
|
|
27
|
+
<script type="module" crossorigin src="./assets/index-CV6OexwP.js"></script>
|
|
28
|
+
<link rel="modulepreload" crossorigin href="./assets/icon-KrVT-csH.js">
|
|
29
|
+
<link rel="stylesheet" crossorigin href="./assets/icon-C3z02Ja7.css">
|
|
30
30
|
<link rel="stylesheet" crossorigin href="./assets/index-aW0Bo_1a.css">
|
|
31
31
|
</head>
|
|
32
32
|
|
|
@@ -8,9 +8,9 @@
|
|
|
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/icon-
|
|
13
|
-
<link rel="stylesheet" crossorigin href="./assets/icon-
|
|
11
|
+
<script type="module" crossorigin src="./assets/installer-Db9wXNQc.js"></script>
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/icon-KrVT-csH.js">
|
|
13
|
+
<link rel="stylesheet" crossorigin href="./assets/icon-C3z02Ja7.css">
|
|
14
14
|
</head>
|
|
15
15
|
|
|
16
16
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-operator-ui",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.16",
|
|
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",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"check-types:renderer": "tsc --noEmit -p tsconfig.app.json",
|
|
75
75
|
"check-types": "pnpm run check-types:main && pnpm run check-types:renderer",
|
|
76
76
|
"test:session-cookies": "node scripts/session-cookie-electron.test.mjs",
|
|
77
|
-
"test:desktop": "node scripts/run-desktop-tests.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/capture-evidence.test.mjs scripts/desktop-contract.test.mjs scripts/transcript-reducer.test.mjs scripts/transcript-paging.test.mjs scripts/seed-placement.test.mjs scripts/provider-state.test.mjs scripts/stale-agent.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-proxy.test.mjs scripts/session-stream-token.test.mjs scripts/session-load-recovery.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/settings-time-to-error.test.mjs scripts/backend-error-surfaces.test.mjs scripts/canonical-chat.test.mjs scripts/stale-caption.test.mjs scripts/desktop-watch-lease.test.mjs scripts/session-switch.test.mjs scripts/chat-search.test.mjs scripts/palette-search.test.mjs scripts/palette-shortcut.test.mjs scripts/palette-contract.test.mjs scripts/palette-panel-request.test.mjs scripts/run-detail-model.test.mjs scripts/subagent-pulse.test.mjs scripts/chat-title.test.mjs scripts/clear-search.test.mjs scripts/tool-row.test.mjs scripts/attachment-url.test.mjs scripts/desktop-notifier.test.mjs scripts/launch-session.test.mjs scripts/desktop-feed.test.mjs scripts/session-status-feed.test.mjs scripts/viewer-record.test.mjs scripts/desktop-stream.test.mjs scripts/python-bytecode-cache.test.mjs scripts/preload-updater-surface.test.mjs scripts/update-affirmation.test.mjs scripts/update-robustness.test.mjs scripts/prune-python-resource.test.mjs scripts/managed-python.test.mjs scripts/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/composer-readings.test.mjs scripts/composer-tabs.test.mjs scripts/ask-options.test.mjs scripts/window-mode.test.mjs scripts/evidence-manifest.test.mjs scripts/canonical-notice.test.mjs scripts/evidence-run-guard.test.mjs scripts/desktop-test-concurrency.test.mjs scripts/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.test.mjs scripts/picker-feedback.test.mjs scripts/panel-chart-motion.test.mjs scripts/panel-info-credentials.test.mjs scripts/panel-info-fleet.test.mjs scripts/warm-session.test.mjs scripts/submit-latency.test.mjs scripts/completion-view-ack.test.mjs scripts/echo-delivery.test.mjs scripts/check-runtime-deps.test.mjs scripts/new-chat-row.test.mjs scripts/new-chat-row-evidence.test.mjs scripts/new-chat-shortcut.test.mjs scripts/reconnect-page-gap.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/toast-lifetime.test.mjs scripts/storybook-query-fixture.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-failure-routing.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/session-cookies.test.mjs scripts/move-session.test.mjs scripts/frontend-replace.test.mjs scripts/browser-chrome.test.mjs scripts/browser-queue-expiry.test.mjs scripts/dev-driver-gate.test.mjs scripts/logger-log-dir.test.mjs scripts/draft-splash.test.mjs scripts/suggestion-stack.test.mjs scripts/suggestion-stack-react.test.mjs scripts/notifications-off.test.mjs scripts/notification-launch.test.mjs scripts/notification-spawn-sites.test.mjs scripts/chrome-keychain.test.mjs scripts/interrupt-control.test.mjs scripts/chat-sidebar-selection.test.mjs scripts/message-quote.test.mjs scripts/panel-chart-hover.test.mjs scripts/composer-suggestions.test.mjs scripts/composer-tip-react.test.mjs scripts/sidebar-catalogue-gate.test.mjs scripts/credential-capture.test.mjs scripts/credential-composer.test.mjs scripts/run-panel-navigation.test.mjs",
|
|
77
|
+
"test:desktop": "node scripts/run-desktop-tests.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/capture-evidence.test.mjs scripts/desktop-contract.test.mjs scripts/transcript-reducer.test.mjs scripts/transcript-paging.test.mjs scripts/seed-placement.test.mjs scripts/provider-state.test.mjs scripts/stale-agent.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-proxy.test.mjs scripts/session-stream-token.test.mjs scripts/session-load-recovery.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/settings-time-to-error.test.mjs scripts/backend-error-surfaces.test.mjs scripts/canonical-chat.test.mjs scripts/stale-caption.test.mjs scripts/desktop-watch-lease.test.mjs scripts/session-switch.test.mjs scripts/chat-search.test.mjs scripts/palette-search.test.mjs scripts/palette-shortcut.test.mjs scripts/palette-contract.test.mjs scripts/palette-panel-request.test.mjs scripts/run-detail-model.test.mjs scripts/subagent-pulse.test.mjs scripts/chat-title.test.mjs scripts/clear-search.test.mjs scripts/tool-row.test.mjs scripts/attachment-url.test.mjs scripts/desktop-notifier.test.mjs scripts/launch-session.test.mjs scripts/desktop-feed.test.mjs scripts/session-status-feed.test.mjs scripts/viewer-record.test.mjs scripts/desktop-stream.test.mjs scripts/python-bytecode-cache.test.mjs scripts/preload-updater-surface.test.mjs scripts/update-affirmation.test.mjs scripts/update-robustness.test.mjs scripts/prune-python-resource.test.mjs scripts/managed-python.test.mjs scripts/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/composer-readings.test.mjs scripts/composer-tabs.test.mjs scripts/ask-options.test.mjs scripts/window-mode.test.mjs scripts/evidence-manifest.test.mjs scripts/canonical-notice.test.mjs scripts/evidence-run-guard.test.mjs scripts/desktop-test-concurrency.test.mjs scripts/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.test.mjs scripts/picker-feedback.test.mjs scripts/panel-chart-motion.test.mjs scripts/panel-info-credentials.test.mjs scripts/panel-info-fleet.test.mjs scripts/warm-session.test.mjs scripts/submit-latency.test.mjs scripts/completion-view-ack.test.mjs scripts/echo-delivery.test.mjs scripts/check-runtime-deps.test.mjs scripts/new-chat-row.test.mjs scripts/new-chat-row-evidence.test.mjs scripts/new-chat-shortcut.test.mjs scripts/reconnect-page-gap.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/toast-lifetime.test.mjs scripts/storybook-query-fixture.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-failure-routing.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/session-cookies.test.mjs scripts/move-session.test.mjs scripts/frontend-replace.test.mjs scripts/browser-chrome.test.mjs scripts/browser-queue-expiry.test.mjs scripts/dev-driver-gate.test.mjs scripts/logger-log-dir.test.mjs scripts/draft-splash.test.mjs scripts/suggestion-stack.test.mjs scripts/suggestion-stack-react.test.mjs scripts/notifications-off.test.mjs scripts/notification-launch.test.mjs scripts/notification-spawn-sites.test.mjs scripts/chrome-keychain.test.mjs scripts/interrupt-control.test.mjs scripts/chat-sidebar-selection.test.mjs scripts/message-quote.test.mjs scripts/panel-chart-hover.test.mjs scripts/composer-suggestions.test.mjs scripts/composer-tip-react.test.mjs scripts/sidebar-catalogue-gate.test.mjs scripts/credential-capture.test.mjs scripts/credential-composer.test.mjs scripts/run-panel-navigation.test.mjs scripts/backend-settings-tiers.test.mjs scripts/backend-settings-collapse.test.mjs scripts/check-build-env.test.mjs scripts/test-inventory.test.mjs scripts/conflict-markers.test.mjs scripts/compact-receipt.test.mjs",
|
|
78
78
|
"check-themes": "node scripts/generate-theme-css.mjs --check && node scripts/contrast-contract.mjs",
|
|
79
79
|
"check-vendored": "node scripts/check-vendored.mjs",
|
|
80
80
|
"check-evidence": "node scripts/check-evidence.mjs",
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
"appId": "com.local-operator",
|
|
216
216
|
"electronVersion": "44.3.0",
|
|
217
217
|
"productName": "Local Operator",
|
|
218
|
-
"copyright": "Copyright
|
|
218
|
+
"copyright": "Copyright \u00a9 2025 Radient Inc.",
|
|
219
219
|
"asar": true,
|
|
220
220
|
"files": [
|
|
221
221
|
"out/**/*",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./icon-CsHr0elv.js";import{k as o}from"./index-COT32Ss8.js";const s=()=>r.jsx(o,{tabScope:"all",requestScope:"all",surfaceTag:"browser-route",dockSurfaceTag:"browser-approvals-dock"});export{s as BrowserPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as a,C as n}from"./mermaid.core-CSbV60u2.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-C6hISC8L.js";import{_ as i}from"./mermaid.core-CSbV60u2.js";import"./chunk-RZ5BOZE2-DHF6boxY.js";import"./index-COT32Ss8.js";import"./icon-CsHr0elv.js";var p={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{p as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-A2AXSNBT-C6hISC8L.js";import{_ as i}from"./mermaid.core-CSbV60u2.js";import"./chunk-RZ5BOZE2-DHF6boxY.js";import"./index-COT32Ss8.js";import"./icon-CsHr0elv.js";var p={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{p as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./_baseUniq-xS2rgm41.js";var e=4;function a(o){return r(o,e)}export{a as c};
|