openclaw-cortex 3.2.4 → 3.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{audio-preflight-BT6BcGi_.js → audio-preflight-DgmMV8p-.js} +4 -4
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{chrome-CBhKqm1e.js → chrome-DxhUHYxR.js} +7 -7
- package/dist/control-ui/_app/immutable/chunks/2UnHt_9K.js +1 -0
- package/dist/control-ui/_app/immutable/chunks/B4GbTqhO.js +1 -0
- package/dist/control-ui/_app/immutable/chunks/BFumT5Y0.js +112 -0
- package/dist/control-ui/_app/immutable/chunks/{C7KVOWgV.js → BLM6VoLO.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{C9VLzrYr.js → BQKxqYwa.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{CVAw3cDG.js → BR-s7H7s.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{Bt3hjGaS.js → BhDMmVbO.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{kbQmmJpo.js → BpdIPI45.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{BhXAsS8g.js → BwK9WVrR.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{CLY1rHgs.js → BwY8sfED.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{C_LuOpHS.js → C1Eymii5.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{CseiHJK5.js → CGNab0sK.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{DCXXFcx5.js → CMAgoL0b.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{BsUBloFL.js → CRqxfK8Q.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{C7m1KhrR.js → CTNPOj0C.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{CHTlfT2F.js → CTWxnwAC.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{Bh6lEBNv.js → CToOwI3J.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{BQJCZmRh.js → C_KVsgu8.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{DJjlYUoC.js → CjRaiADz.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{DZsBL6ln.js → CmisPrPB.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{B8DrosHE.js → CtgLaeta.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{BEwWGCvZ.js → D3i-icoF.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{CrremO5S.js → D6TmrqPb.js} +4 -4
- package/dist/control-ui/_app/immutable/chunks/{BSVakDDW.js → DA25TLUp.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{DRZM4rH8.js → DBlwFnJd.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{SHB02qEx.js → DFN8J1NF.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{dQY-7VfC.js → DLqjuVZy.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{TuMlQKbB.js → DM2PI6Ub.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{CiyAy8dp.js → DN-9aXEU.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{-WaG6-Wa.js → DREM5LJO.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{Tfaq1PK1.js → DRMrozhP.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{Ba7JwTQm.js → DVR5y4oH.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{DMY-Nl0I.js → DcdYjMti.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{BLtDog0v.js → DeOOVYCg.js} +2 -2
- package/dist/control-ui/_app/immutable/chunks/{CPgEtRZT.js → Dgn5d0KE.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{Bae3KkPP.js → DkQuM6_3.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{CxBb1Xul.js → Dp0CT_qn.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{5eXlR5OL.js → Dr9WtqlZ.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{Du2cKiDo.js → DvXEWbFO.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{DnRi7lHs.js → FrknC80A.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{DtDnO4qq.js → HSq6Z-Ri.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{BrxfYBSP.js → L9tM3YT2.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{CgWI5Oik.js → Mcnmm_vJ.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{C--qzJ6W.js → X1MNi0qp.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{C-JVM0la.js → XUyUXXap.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{C8PuvvjP.js → XzWkBa-Y.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{BsZ_uYnn.js → YH-SwxLT.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{CVZCvD9s.js → c7C9Q4bC.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{CkF797NI.js → f2z7Vhzy.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{DwPRscxf.js → qjmh8Sgh.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{DVy-_nYK.js → xY7vVkih.js} +1 -1
- package/dist/control-ui/_app/immutable/chunks/{aXQqHONi.js → xiH5_-XQ.js} +1 -1
- package/dist/control-ui/_app/immutable/entry/{app.DdWEO2JM.js → app.D7kdWIZ9.js} +2 -2
- package/dist/control-ui/_app/immutable/entry/start.BYvWRDfG.js +1 -0
- package/dist/control-ui/_app/immutable/nodes/{0.C6WLhEYF.js → 0.D6FVZzqA.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{1.C8XVTSEb.js → 1.C9c9_PmZ.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{10.DfK8stgG.js → 10.BDapaGMa.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{11.Dzw5x9Jt.js → 11.DBYtQZHB.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{12.Sd6L6Nq2.js → 12.D8XUK_lu.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{13.tVVXkjFh.js → 13.BDfcMPWD.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{14.D93_LX58.js → 14.CRNfMLjf.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{15.hsoE3Qhh.js → 15.CQ6Hk24N.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{16.Cf772zrj.js → 16.C4l7NDBm.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{17.QX2ielYQ.js → 17.BkTX8oXe.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{18.6qOW3iFE.js → 18.B5ULV77i.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/2.BbOfUph1.js +1 -0
- package/dist/control-ui/_app/immutable/nodes/{3.CJTqvGaW.js → 3.CAwDlZXX.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{4.Dz3JH-PB.js → 4.UqbCNSjq.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{5.BbK5Iwro.js → 5.fyz3FwUS.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{6.CbanPjIA.js → 6.Dico67qE.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{7.B2G6IFSu.js → 7.CTGW4yVr.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{8.C7FQ9bAP.js → 8.B4g5dpji.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{9.D4Abr5tX.js → 9.BzrUr7aI.js} +1 -1
- package/dist/control-ui/_app/version.json +1 -1
- package/dist/control-ui/index.html +6 -6
- package/dist/{deliver-6ybd_3jT.js → deliver-Brnl4HfK.js} +1 -1
- package/dist/extensionAPI.js +6 -6
- package/dist/{image-BccL3ngs.js → image-4JNpzCjn.js} +1 -1
- package/dist/{pi-embedded-BgUNEKQv.js → pi-embedded-DCp1o-Q-.js} +16 -16
- package/dist/{pi-embedded-helpers-Dh6fWzG0.js → pi-embedded-helpers-OUBsvbo7.js} +4 -4
- package/dist/plugin-sdk/{accounts-uAqOguyH.js → accounts-LxMkgia0.js} +1 -1
- package/dist/plugin-sdk/{accounts-b1Cok6r_.js → accounts-iN-dbgw4.js} +3 -3
- package/dist/plugin-sdk/{accounts-CRs7kbLB.js → accounts-vV5Gfd26.js} +1 -1
- package/dist/plugin-sdk/{active-listener-BdVTYHTN.js → active-listener-Bh0LXjEI.js} +1 -1
- package/dist/plugin-sdk/{agent-scope-Bs92YR2y.js → agent-scope-CbyigN8s.js} +2 -2
- package/dist/plugin-sdk/{api-key-rotation-wd2Jnynp.js → api-key-rotation--_SHlBvO.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-CblfMzuT.js → audio-preflight-Cs-ml8zg.js} +25 -25
- package/dist/plugin-sdk/{bindings-BiEEaTNG.js → bindings-EiVe9I7R.js} +2 -2
- package/dist/plugin-sdk/{channel-activity-DHI8R5Xg.js → channel-activity-PV3vhwo2.js} +1 -1
- package/dist/plugin-sdk/{channel-web-B06HVGIL.js → channel-web-21Mv-TmV.js} +22 -22
- package/dist/plugin-sdk/{chrome-ORXV3sOi.js → chrome-DY36v1wL.js} +3 -3
- package/dist/plugin-sdk/{chunk-C9J4kyVw.js → chunk-CyOBR4uk.js} +1 -1
- package/dist/plugin-sdk/{command-format-BTciq6Gg.js → command-format-C5kdEGEu.js} +1 -1
- package/dist/plugin-sdk/{commands-registry-B03cVRjI.js → commands-registry-OichNmLJ.js} +3 -3
- package/dist/plugin-sdk/{common-xLIrQlvS.js → common-BnJL1iD6.js} +2 -2
- package/dist/plugin-sdk/{config-gGD5Rkaw.js → config-BG3Dq3SQ.js} +9 -9
- package/dist/plugin-sdk/{deliver-DrIvPqH5.js → deliver-BtCdGBea.js} +10 -10
- package/dist/plugin-sdk/{diagnostic-oBxO5N68.js → diagnostic-DFXnVf2I.js} +1 -1
- package/dist/plugin-sdk/{fs-safe--E2UxVCE.js → fs-safe-D3UMk9-G.js} +1 -1
- package/dist/plugin-sdk/{image-psst3EfB.js → image-CcHh2-91.js} +4 -4
- package/dist/plugin-sdk/index.js +52 -52
- package/dist/plugin-sdk/{ir-B7KEB-SH.js → ir-CyBaWJwF.js} +4 -4
- package/dist/plugin-sdk/{local-roots-BCWc25rb.js → local-roots-BO0Dyqgm.js} +3 -3
- package/dist/plugin-sdk/{login-B3Mf_yyo.js → login-gAP1E9vw.js} +7 -7
- package/dist/plugin-sdk/{login-qr-BwyNiRRo.js → login-qr-C_TnVe07.js} +9 -9
- package/dist/plugin-sdk/{manager-Dv8oeW8Q.js → manager-CC6jXeB-.js} +8 -8
- package/dist/plugin-sdk/{manifest-registry-Lzj-fZNH.js → manifest-registry-BgkX6ON4.js} +1 -1
- package/dist/plugin-sdk/{markdown-tables-JToF08xk.js → markdown-tables-Q9Bw5OWT.js} +1 -1
- package/dist/plugin-sdk/{message-channel-C3OrO29D.js → message-channel-DxNExIdv.js} +1 -1
- package/dist/plugin-sdk/{model-selection-BP-yZfgL.js → model-selection-CcOKuG2n.js} +4 -4
- package/dist/plugin-sdk/{normalize-CALo0r3J.js → normalize-DQzsuqr8.js} +4 -4
- package/dist/plugin-sdk/{outbound-Xv_dXAwT.js → outbound-BNo9XNzM.js} +7 -7
- package/dist/plugin-sdk/{outbound-attachment-BcrG8SHW.js → outbound-attachment-CisuJmNV.js} +2 -2
- package/dist/plugin-sdk/{pi-auth-json-cJTtFNw1.js → pi-auth-json-BHnQjxub.js} +5 -5
- package/dist/plugin-sdk/{pi-embedded-helpers-DjyrCaOR.js → pi-embedded-helpers-D5mU_VuV.js} +17 -17
- package/dist/plugin-sdk/{plugins-DkDfsqpU.js → plugins-DZx_qlHO.js} +3 -3
- package/dist/plugin-sdk/{pw-ai-DzpfUQcL.js → pw-ai-DYABE96f.js} +8 -8
- package/dist/plugin-sdk/{qmd-manager-CJcPR4Tl.js → qmd-manager-B3_LuPWI.js} +4 -4
- package/dist/plugin-sdk/{registry-C8pj8ctW.js → registry-BECEtj9n.js} +2 -2
- package/dist/plugin-sdk/{replies-D70UX9el.js → replies-DYi7SN77.js} +3 -3
- package/dist/plugin-sdk/{reply-Bd2hTqt2.js → reply-Cjk7LMy5.js} +78 -78
- package/dist/plugin-sdk/{reply-prefix-C4uKnJw5.js → reply-prefix-CjyfQ_d1.js} +1 -1
- package/dist/plugin-sdk/{resolve-route-D3KbwzED.js → resolve-route-DcFELQ2A.js} +3 -3
- package/dist/plugin-sdk/{retry-B8Oq5mgi.js → retry-Bkj1k1me.js} +1 -1
- package/dist/plugin-sdk/{runner-eN6avbf7.js → runner-DpYDxpAW.js} +9 -9
- package/dist/plugin-sdk/{send-DbftCLdT.js → send-BZCJA8cX.js} +11 -11
- package/dist/plugin-sdk/{send-NfHYBhul.js → send-DZKSn0On.js} +7 -7
- package/dist/plugin-sdk/{send-g2G5-BE1.js → send-DstsvZrR.js} +7 -7
- package/dist/plugin-sdk/{send-DTQ35K1k.js → send-L7Qzaw1k.js} +11 -11
- package/dist/plugin-sdk/{send-CYWWJEcn.js → send-ydtZKtPY.js} +6 -6
- package/dist/plugin-sdk/{session-BS3El_89.js → session-hN4eOpFg.js} +4 -4
- package/dist/plugin-sdk/{skill-commands-Cle2Lzhm.js → skill-commands-BI1wVtHZ.js} +5 -5
- package/dist/plugin-sdk/{skills-BKSekIbi.js → skills-Xz3Fbq-R.js} +7 -7
- package/dist/plugin-sdk/{sqlite-Yn48izJ_.js → sqlite-DtIiUWZr.js} +1 -1
- package/dist/plugin-sdk/{store-Cz4sBcdW.js → store-w9NR0-ll.js} +2 -2
- package/dist/plugin-sdk/{subsystem-BfLMZ8kW.js → subsystem-Ck27y_6W.js} +1 -1
- package/dist/plugin-sdk/{tables-gytp5jHK.js → tables-CmVJrzl_.js} +1 -1
- package/dist/plugin-sdk/{thinking-BOKrkVfN.js → thinking-DIWJ8ngy.js} +5 -5
- package/dist/plugin-sdk/{tokens-D1LxPszt.js → tokens-B6GWdF_0.js} +1 -1
- package/dist/plugin-sdk/{tool-loop-detection-CYSptBsl.js → tool-loop-detection-CbPwu1_R.js} +2 -2
- package/dist/plugin-sdk/web-DV9s3A0M.js +65 -0
- package/dist/plugin-sdk/{whatsapp-actions-Cxf0P-Zz.js → whatsapp-actions-DdnRWwJa.js} +20 -20
- package/dist/{pw-ai-Bp7tQXP7.js → pw-ai-ByDR1q8k.js} +1 -1
- package/dist/{runner-j4Bfr_LY.js → runner-BYhtaPKn.js} +1 -1
- package/dist/{web-y3J71ECd.js → web-ZW9Geotk.js} +6 -6
- package/package.json +1 -1
- package/dist/control-ui/_app/immutable/chunks/BBXALFLP.js +0 -112
- package/dist/control-ui/_app/immutable/chunks/BZPuz03W.js +0 -1
- package/dist/control-ui/_app/immutable/chunks/CbL4AD8o.js +0 -1
- package/dist/control-ui/_app/immutable/chunks/CrSotJB3.js +0 -1
- package/dist/control-ui/_app/immutable/entry/app._v8i6nBc.js +0 -2
- package/dist/control-ui/_app/immutable/entry/start.B3_R8Pb8.js +0 -1
- package/dist/control-ui/_app/immutable/entry/start.lsitudt4.js +0 -1
- package/dist/control-ui/_app/immutable/nodes/0.CPUGwa5J.js +0 -33
- package/dist/control-ui/_app/immutable/nodes/1.e1sYpbGn.js +0 -1
- package/dist/control-ui/_app/immutable/nodes/15.jtEPdobl.js +0 -30
- package/dist/control-ui/_app/immutable/nodes/2.BTwPpsUd.js +0 -1
- package/dist/plugin-sdk/web-CHrq1191.js +0 -65
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import{d as fe,b as l,f,s as Q,a as j,e as Se,g as ke,t as he}from"../chunks/B2A7gHtL.js";import{p as de,c as ve,r as t,h as a,f as r,g as e,t as I,a6 as Ee,s as K,a as He,u as re,b as me,j as oe,d as o,n as ye,i as Oe,bd as Te}from"../chunks/qR_TM3YX.js";import{s as Be,g as Ue}from"../chunks/Tfaq1PK1.js";import{i as R}from"../chunks/DpBBTLWw.js";import{e as ce,s as ie,b as ge,g as Ce,r as we,i as pe,l as Ae,a as je}from"../chunks/BLtDog0v.js";import{g as De}from"../chunks/C--qzJ6W.js";import{g as Me}from"../chunks/Be_uRYmX.js";import{g as Ve,a as Ie}from"../chunks/CktI4lAE.js";import{i as Ke}from"../chunks/KBP0Pl-D.js";import{b as _e}from"../chunks/nnazh41B.js";import{b as Re}from"../chunks/BYXRTvT-.js";import{p as be,s as Pe,a as qe}from"../chunks/CkAYskLX.js";import{s as Ne,g as Le}from"../chunks/Bt3hjGaS.js";const We=!1,Ge=!1,Jt=Object.freeze(Object.defineProperty({__proto__:null,prerender:We,ssr:Ge},Symbol.toStringTag,{value:"Module"}));var Ye=f('<p class="text-xs text-text-secondary mt-1"> </p>'),$e=f('<div role="alert"><div class="flex items-start gap-3"><div class="flex-shrink-0 w-5 h-5 mt-0.5"><svg class="w-full h-full" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path></svg></div> <div class="flex-1 min-w-0"><p class="text-sm font-medium text-text-primary"> </p> <!></div> <button class="flex-shrink-0 ml-auto p-1 rounded hover:bg-bg-hover text-text-muted hover:text-text-primary transition-colors" aria-label="Close notification"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div></div>'),Fe=f('<div class="fixed bottom-4 right-4 z-50 space-y-2 max-w-sm" aria-live="polite" aria-relevant="additions removals"></div>');function Xe(P,H){de(H,!1);const m=Me(),q={success:{color:"bg-accent-green border-accent-green",glow:"glow-green",icon:"M5 13l4 4L19 7"},error:{color:"bg-accent-red border-accent-red",glow:"glow-red",icon:"M6 18L18 6M6 6l12 12"},warning:{color:"bg-accent-amber border-accent-amber",glow:"glow-amber",icon:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"},info:{color:"bg-accent-cyan border-accent-cyan",glow:"glow-cyan",icon:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}};Ke();var y=Fe();ce(y,5,()=>m.list,v=>v.id,(v,n)=>{const p=Ee(()=>q[e(n).type]);var x=$e(),S=a(x),k=a(S),C=a(k),O=a(C);t(C),t(k);var D=r(k,2),T=a(D),Z=a(T,!0);t(T);var N=r(T,2);{var Y=g=>{var s=Ye(),u=a(s,!0);t(s),I(()=>Q(u,e(n).message)),l(g,s)};R(N,g=>{e(n).message&&g(Y)})}t(D);var ee=r(D,2);t(S),t(x),I(()=>{ie(x,1,`gradient-border glass p-4 rounded-lg shadow-lg ${e(p).color??""} ${e(p).glow??""} animate-in slide-in-from-right-full duration-300`,"svelte-cqwvc2"),ge(O,"d",e(p).icon),Q(Z,e(n).title)}),j("click",ee,()=>m.remove(e(n).id)),l(v,x)}),t(y),l(P,y),ve()}fe(["click"]);var Je=f(`<div><label for="gateway-token" class="block text-sm font-medium text-text-secondary mb-2">Access Token <span class="text-text-muted font-normal">(optional)</span></label> <input id="gateway-token" type="password" placeholder="Leave empty to use device pairing" class="w-full px-3 py-2 rounded-lg glass border border-border-default bg-bg-secondary
|
|
2
|
-
text-text-primary placeholder-text-muted
|
|
3
|
-
focus:outline-none focus:border-accent-cyan focus:glow-cyan
|
|
4
|
-
transition-all duration-200"/> <p class="text-xs text-text-muted mt-1">If provided, connects immediately. If empty, your gateway owner will need to approve this device.</p></div>`),Qe=f('<button type="button" class="text-xs text-text-muted hover:text-accent-cyan transition-colors flex items-center gap-1"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg> I have an access token</button>'),Ze=f('<div class="p-3 rounded-lg border border-accent-amber/30 bg-accent-amber/10" role="status"><div class="flex items-start gap-2"><svg class="w-5 h-5 text-accent-amber flex-shrink-0 animate-pulse mt-0.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <div><p class="text-sm font-medium text-accent-amber">Device Pairing Required</p> <p class="text-xs text-text-muted mt-1">Your gateway owner needs to approve this device. Ask them to run:</p> <code class="block text-xs font-mono text-accent-cyan bg-bg-primary/50 px-2 py-1 rounded mt-1">openclaw devices approve</code></div></div></div>'),et=f('<div class="p-3 rounded-lg border border-accent-red/30 bg-accent-red/10 glow-red" role="alert" aria-live="assertive"><div class="flex items-center gap-2"><svg class="w-4 h-4 text-accent-red flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"></path></svg> <p class="text-sm text-accent-red"> </p></div></div>'),tt=f('<div class="flex items-center justify-center gap-2"><svg class="w-4 h-4 animate-spin" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> Connecting...</div>'),at=f(`<div class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm" role="dialog" aria-modal="true" aria-labelledby="auth-dialog-title"><div class="w-full max-w-md gradient-border glass p-6 rounded-lg glow-cyan animate-in zoom-in-95 duration-300 svelte-htsx5a"><div class="flex items-center gap-3 mb-6"><div class="w-12 h-12 rounded-lg gradient-bg flex items-center justify-center glow-purple"><svg class="w-6 h-6 text-accent-purple" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path></svg></div> <div><h2 id="auth-dialog-title" class="text-lg font-semibold gradient-text">Connect to OpenClaw</h2> <p class="text-sm text-text-muted">Enter your gateway credentials to get started</p></div></div> <form class="space-y-4"><div><label for="gateway-url" class="block text-sm font-medium text-text-secondary mb-2">Gateway URL</label> <input id="gateway-url" type="url" placeholder="wss://your-openclaw-gateway.com" class="w-full px-3 py-2 rounded-lg glass border border-border-default bg-bg-secondary
|
|
5
|
-
text-text-primary placeholder-text-muted
|
|
6
|
-
focus:outline-none focus:border-accent-cyan focus:glow-cyan
|
|
7
|
-
transition-all duration-200" required=""/></div> <!> <!> <!> <div class="flex gap-3 pt-2"><button type="button" class="flex-1 px-4 py-2 rounded-lg border border-border-default text-text-secondary
|
|
8
|
-
hover:bg-bg-hover hover:text-text-primary transition-colors">Cancel</button> <button type="submit" class="flex-1 px-4 py-2 rounded-lg gradient-bg gradient-border glow-cyan
|
|
9
|
-
text-text-primary font-medium hover:brightness-110
|
|
10
|
-
disabled:opacity-50 disabled:cursor-not-allowed
|
|
11
|
-
transition-all duration-200"><!></button></div></form> <div class="mt-4 pt-4 border-t border-border-default"><p class="text-xs text-text-muted text-center"><!> <br/> Need help? Check the <a href="https://docs.openclaw.ai" target="_blank" class="text-accent-cyan hover:underline">OpenClaw documentation</a>.</p></div></div></div>`);function rt(P,H){de(H,!0);const m=Ce(),q=Me();let y=be(H,"show",15,!1);const v=m.getConfiguredWsUrl();let n=K(He(v||"")),p=K(""),x=K(!1),S=K(""),k=K(!1),C=K(!1);re(()=>{const g=m.initialized;me(()=>{if(typeof window<"u"&&g){const{url:s,token:u}=m.loadSettings();(!s||!u)&&(!e(n)&&v&&o(n,v,!0),y(!0))}})});async function O(){if(!e(n).trim()){o(S,"Gateway URL is required");return}!e(p).trim()&&e(k),o(S,""),o(x,!0),o(C,!1);try{const g=e(p).trim()||"__device_auth__";m.connect(e(n).trim(),g),await new Promise((s,u)=>{const b=setTimeout(()=>{u(new Error("Connection timeout — check your gateway URL"))},15e3),_=m.onStateChange(M=>{M.status==="connected"?(clearTimeout(b),_(),s()):M.status==="error"&&(clearTimeout(b),_(),M.error?.includes("pairing")?(o(C,!0),u(new Error("Device pairing required — approve this device on your gateway"))):u(new Error(M.error||"Connection failed")))})}),y(!1),o(C,!1),q.success("Connected","Successfully connected to OpenClaw Gateway")}catch(g){o(S,g instanceof Error?g.message:"Connection failed",!0),e(C)||q.error("Connection Failed",e(S))}finally{o(x,!1)}}function D(){y(!1),o(S,"")}let T=K(void 0);re(()=>{if(y()&&e(T)){const g=e(T).querySelectorAll('input:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])');g.length&&g[0].focus()}});function Z(g){if(g.key==="Enter")O();else if(g.key==="Escape")D();else if(g.key==="Tab"&&e(T)){const s=e(T).querySelectorAll('input:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])');if(s.length===0)return;const u=s[0],b=s[s.length-1];g.shiftKey&&document.activeElement===u?(g.preventDefault(),b.focus()):!g.shiftKey&&document.activeElement===b&&(g.preventDefault(),u.focus())}}var N=Se(),Y=oe(N);{var ee=g=>{var s=at(),u=a(s),b=r(a(u),2),_=a(b),M=r(a(_),2);we(M),t(_);var c=r(_,2);{var U=i=>{var A=Je(),F=r(a(A),2);we(F),ye(2),t(A),I(()=>F.disabled=e(x)),_e(F,()=>e(p),X=>o(p,X)),l(i,A)},te=i=>{var A=Qe();j("click",A,()=>o(k,!0)),l(i,A)};R(c,i=>{e(k)?i(U):i(te,!1)})}var h=r(c,2);{var d=i=>{var A=Ze();l(i,A)};R(h,i=>{e(C)&&i(d)})}var w=r(h,2);{var z=i=>{var A=et(),F=a(A),X=r(a(F),2),E=a(X,!0);t(X),t(F),t(A),I(()=>Q(E,e(S))),l(i,A)};R(w,i=>{e(S)&&!e(C)&&i(z)})}var V=r(w,2),ae=a(V),W=r(ae,2),B=a(W);{var L=i=>{var A=tt();l(i,A)},$=i=>{var A=he("Connect");l(i,A)};R(B,i=>{e(x)?i(L):i($,!1)})}t(W),t(V),t(b);var G=r(b,2),se=a(G),ne=a(se);{var ue=i=>{var A=he("Credentials are saved locally and remembered for future sessions.");l(i,A)},le=i=>{var A=he("Your device will be paired with the gateway. The gateway owner will approve your access.");l(i,A)};R(ne,i=>{e(k)?i(ue):i(le,!1)})}ye(5),t(se),t(G),t(u),Re(u,i=>o(T,i),()=>e(T)),t(s),I(i=>{M.disabled=e(x),ae.disabled=e(x),W.disabled=i},[()=>e(x)||!e(n).trim()]),j("click",s,D),j("keydown",s,Z),j("click",u,i=>i.stopPropagation()),ke("submit",b,i=>{i.preventDefault(),O()}),_e(M,()=>e(n),i=>o(n,i)),j("click",ae,D),l(g,s)};R(Y,g=>{y()&&g(ee)})}l(P,N),ve()}fe(["click","keydown"]);const st=()=>{const P=Ne;return{page:{subscribe:P.page.subscribe},navigating:{subscribe:P.navigating.subscribe},updated:P.updated}},ot={subscribe(P){return st().page.subscribe(P)}};var nt=f('<img src="/logo.png" alt="Cortex" class="w-8 h-8 rounded-lg"/> <span class="text-base font-bold gradient-text tracking-wider">CORTEX</span> <button class="ml-auto p-1 rounded hover:bg-bg-hover text-text-muted hover:text-text-primary transition-colors" aria-label="Collapse navigation"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 19l-7-7 7-7m8 14l-7-7 7-7"></path></svg></button>',1),it=f('<button class="mx-auto p-1 rounded hover:bg-bg-hover text-text-muted hover:text-accent-cyan transition-colors" aria-label="Expand navigation"><img src="/logo.png" alt="Cortex" class="w-7 h-7 rounded-lg"/></button>'),lt=f('<div class="px-3 pt-3 pb-1"><span class="text-[10px] font-semibold uppercase tracking-widest text-text-muted/60"> </span></div>'),ct=f('<div class="max-md:hidden pt-2 pb-1"><div class="mx-auto w-6 h-px bg-border-default"></div></div> <div class="hidden max-md:block px-3 pt-3 pb-1"><span class="text-[10px] font-semibold uppercase tracking-widest text-text-muted/60"> </span></div>',1),dt=f("<span> </span>"),vt=f('<span class="hidden max-md:inline"> </span>'),ut=f('<a><svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path></svg> <!></a>'),pt=f("<!> <!>",1),ft=f('<div class="flex items-center gap-2 px-2 py-1.5 text-xs"><span aria-hidden="true"></span> <span class="text-text-muted truncate"> </span></div>'),xt=f('<div class="max-md:hidden flex justify-center py-1"><span aria-hidden="true"></span> <span class="sr-only"> </span></div> <div class="hidden max-md:flex items-center gap-2 px-2 py-1.5 text-xs"><span aria-hidden="true"></span> <span class="text-text-muted truncate"> </span></div>',1),mt=f('<nav aria-label="Main navigation"><div class="flex items-center gap-2 p-3 border-b border-border-default"><div class="hidden max-md:flex items-center gap-2 w-full"><img src="/logo.png" alt="Cortex" class="w-8 h-8 rounded-lg"/> <span class="text-base font-bold gradient-text tracking-wider">CORTEX</span> <button class="ml-auto p-1.5 rounded-lg hover:bg-bg-hover text-text-muted hover:text-text-primary transition-colors" aria-label="Close navigation"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div> <div class="max-md:hidden flex items-center gap-2 w-full"><!></div></div> <div class="flex-1 overflow-y-auto py-2"></div> <div class="p-2 border-t border-border-default"><div class="flex justify-center mb-1"><button class="w-6 h-6 flex items-center justify-center rounded-full text-[11px] font-mono font-semibold text-text-muted hover:text-accent-cyan hover:bg-bg-hover transition-colors" title="Keyboard shortcuts (Ctrl+/)" aria-label="Show keyboard shortcuts">?</button></div></div> <div class="p-2 border-t border-border-default" aria-live="polite" role="status"><!></div></nav>');function gt(P,H){de(H,!0);const m=()=>qe(ot,"$page",q),[q,y]=Pe(),v=Ce(),n=[{label:"Chat",items:[{label:"Chat",href:"/",icon:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"}]},{label:"Control",items:[{label:"Overview",href:"/overview",icon:"M4 6h16M4 10h16M4 14h16M4 18h16"},{label:"Channels",href:"/channels",icon:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101"},{label:"Instances",href:"/instances",icon:"M5.636 18.364a9 9 0 010-12.728m12.728 0a9 9 0 010 12.728M12 12h.01"},{label:"Sessions",href:"/sessions",icon:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"},{label:"Usage",href:"/usage",icon:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"},{label:"Cron Jobs",href:"/cron",icon:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"},{label:"Approvals",href:"/approvals",icon:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"},{label:"Audit Log",href:"/audit",icon:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"}]},{label:"Agent",items:[{label:"Agents",href:"/agents",icon:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},{label:"Skills",href:"/skills",icon:"M13 10V3L4 14h7v7l9-11h-7z"},{label:"Nodes",href:"/nodes",icon:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},{label:"Memory",href:"/memory",icon:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"}]},{label:"Settings",items:[{label:"Connection",href:"/settings",icon:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101"},{label:"Gateway Config",href:"/config",icon:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"},{label:"Debug",href:"/debug",icon:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"},{label:"Logs",href:"/logs",icon:"M4 6h16M4 12h16m-7 6h7"}]}];let p=be(H,"collapsed",15,!1),x=be(H,"mobileOpen",15,!1);function S(h,d){return h==="/"?d==="/":d.startsWith(h)}function k(){x()&&(x(!1),H.onnavigate?.())}var C=mt();let O;var D=a(C),T=a(D),Z=r(a(T),4);t(T);var N=r(T,2),Y=a(N);{var ee=h=>{var d=nt(),w=r(oe(d),4);j("click",w,()=>p(!0)),l(h,d)},g=h=>{var d=it();j("click",d,()=>p(!1)),l(h,d)};R(Y,h=>{p()?h(g,!1):h(ee)})}t(N),t(D);var s=r(D,2);ce(s,21,()=>n,pe,(h,d)=>{var w=pt(),z=oe(w);{var V=B=>{var L=lt(),$=a(L),G=a($,!0);t($),t(L),I(()=>Q(G,e(d).label)),l(B,L)},ae=B=>{var L=ct(),$=r(oe(L),2),G=a($),se=a(G,!0);t(G),t($),I(()=>Q(se,e(d).label)),l(B,L)};R(z,B=>{p()?B(ae,!1):B(V)})}var W=r(z,2);ce(W,17,()=>e(d).items,pe,(B,L)=>{const $=Oe(()=>S(e(L).href,m().url.pathname));var G=ut();let se;var ne=a(G),ue=a(ne);t(ne);var le=r(ne,2);{var i=F=>{var X=dt(),E=a(X,!0);t(X),I(()=>Q(E,e(L).label)),l(F,X)},A=F=>{var X=vt(),E=a(X,!0);t(X),I(()=>Q(E,e(L).label)),l(F,X)};R(le,F=>{p()?F(A,!1):F(i)})}t(G),I(()=>{ge(G,"href",e(L).href),ge(G,"aria-current",e($)?"page":void 0),se=ie(G,1,`flex items-center gap-2.5 mx-2 my-0.5 px-2.5 py-2 rounded-lg text-sm transition-all duration-200
|
|
12
|
-
max-md:py-2.5 max-md:text-base
|
|
13
|
-
${e($)?"gradient-bg glow-cyan text-accent-cyan font-medium":"text-text-secondary hover:text-text-primary hover:bg-bg-hover"}`,null,se,{"md:justify-center":p()}),ge(G,"title",p()?e(L).label:void 0),ie(ne,0,`w-4 h-4 max-md:w-5 max-md:h-5 flex-shrink-0 ${e($)?"text-accent-cyan":""}`),ge(ue,"d",e(L).icon)}),j("click",G,k),l(B,G)}),l(h,w)}),t(s);var u=r(s,2),b=a(u),_=a(b);t(b),t(u);var M=r(u,2),c=a(M);{var U=h=>{var d=ft(),w=a(d),z=r(w,2),V=a(z,!0);t(z),t(d),I(()=>{ie(w,1,`w-2 h-2 rounded-full flex-shrink-0
|
|
14
|
-
${v.state.status==="connected"?"bg-accent-green glow-green":v.state.status==="connecting"||v.state.status==="authenticating"?"bg-amber-500 animate-pulse":"bg-red-500"}`),Q(V,v.state.status==="connected"?`v${v.state.serverVersion??"?"}`:v.state.status)}),l(h,d)},te=h=>{var d=xt(),w=oe(d),z=a(w),V=r(z,2),ae=a(V,!0);t(V),t(w);var W=r(w,2),B=a(W),L=r(B,2),$=a(L,!0);t(L),t(W),I(()=>{ie(z,1,`w-2.5 h-2.5 rounded-full
|
|
15
|
-
${v.state.status==="connected"?"bg-accent-green glow-green":v.state.status==="connecting"||v.state.status==="authenticating"?"bg-amber-500 animate-pulse":"bg-red-500"}`),Q(ae,v.state.status),ie(B,1,`w-2 h-2 rounded-full flex-shrink-0
|
|
16
|
-
${v.state.status==="connected"?"bg-accent-green glow-green":v.state.status==="connecting"||v.state.status==="authenticating"?"bg-amber-500 animate-pulse":"bg-red-500"}`),Q($,v.state.status==="connected"?`v${v.state.serverVersion??"?"}`:v.state.status)}),l(h,d)};R(c,h=>{p()?h(te,!1):h(U)})}t(M),t(C),I(()=>O=ie(C,1,`h-full flex flex-col border-r border-border-default bg-bg-secondary/80 transition-all duration-300
|
|
17
|
-
max-md:fixed max-md:inset-y-0 max-md:left-0 max-md:z-50 max-md:w-64 max-md:shadow-2xl
|
|
18
|
-
max-md:transition-transform max-md:duration-300 max-md:ease-in-out`,null,O,{"w-56":!p(),"w-14":p(),"max-md:translate-x-0":x(),"max-md:-translate-x-full":!x()})),j("click",Z,()=>x(!1)),j("click",_,()=>H.onshortcuthelp?.()),l(P,C),ve(),y()}fe(["click"]);function bt(P,H){de(H,!0);let m=be(H,"showHelp",15,!1);const q=["/","/overview","/channels","/instances","/sessions","/usage","/cron","/approvals","/agents"];function y(){const n=document.activeElement;if(!n)return!1;const p=n.tagName.toLowerCase();return!!(p==="input"||p==="textarea"||p==="select"||n.isContentEditable)}function v(n){const p=n.metaKey||n.ctrlKey;if(n.key==="Escape"){if(m()){m(!1),n.preventDefault();return}document.activeElement&&document.activeElement!==document.body&&document.activeElement.blur?.();return}if(!y()){if(p&&n.key.toLowerCase()==="k"){n.preventDefault(),Le("/").then(()=>{requestAnimationFrame(()=>{document.querySelector("textarea[data-chat-input], input[data-chat-input], textarea, .chat-input textarea")?.focus()})});return}if(p&&n.key==="/"){n.preventDefault(),m(!m());return}if(p&&n.key===","){n.preventDefault(),Le("/settings");return}if(p&&n.key>="1"&&n.key<="9"){const x=parseInt(n.key)-1;x<q.length&&(n.preventDefault(),Le(q[x]));return}}}ke("keydown",Te,v),ve()}var ht=f('<kbd class="inline-flex items-center justify-center min-w-[1.75rem] h-7 px-1.5 rounded-md border border-border-default bg-bg-primary/80 text-[11px] font-mono font-medium text-accent-cyan shadow-[0_1px_0_1px_rgba(30,41,59,0.5)]"> </kbd>'),yt=f('<div class="flex items-center justify-between py-1"><span class="text-sm text-text-secondary"> </span> <div class="flex items-center gap-1"></div></div>'),wt=f('<div class="flex items-center gap-1.5 text-xs"><kbd class="inline-flex items-center justify-center w-5 h-5 rounded border border-border-default bg-bg-primary/80 text-[10px] font-mono text-accent-cyan"></kbd> <span class="text-text-muted truncate"> </span></div>'),_t=f('<div class="fixed inset-0 z-[999] flex items-center justify-center bg-black/60 backdrop-blur-sm"><div class="relative w-full max-w-md mx-4 rounded-xl border border-accent-cyan/30 bg-bg-surface/95 backdrop-blur-md shadow-[0_0_30px_rgba(124,77,255,0.15)] overflow-hidden"><div class="flex items-center justify-between px-5 py-4 border-b border-border-default"><h2 class="text-base font-semibold text-text-primary tracking-wide flex items-center gap-2"><svg class="w-4 h-4 text-accent-cyan" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg> Keyboard Shortcuts</h2> <button class="p-1 rounded-lg text-text-muted hover:text-text-primary hover:bg-bg-hover transition-colors" aria-label="Close"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div> <div class="px-5 py-4 space-y-2.5"></div> <div class="px-5 pb-4"><div class="rounded-lg border border-border-default/50 bg-bg-primary/40 p-3"><div class="text-[10px] uppercase tracking-widest text-text-muted/60 mb-2 font-semibold">Page Numbers</div> <div class="grid grid-cols-3 gap-x-3 gap-y-1"></div></div></div></div></div>');function kt(P,H){de(H,!0);let m=be(H,"show",15,!1);const y=typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"⌘":"Ctrl",v=[{keys:[y,"K"],desc:"Focus chat input"},{keys:[y,"/"],desc:"Toggle this help"},{keys:[y,","],desc:"Open Settings"},{keys:[y,"1–9"],desc:"Navigate to page by order"},{keys:["Esc"],desc:"Close modal / deselect"}],n=["Chat","Overview","Channels","Instances","Sessions","Usage","Cron Jobs","Approvals","Agents"];function p(){m(!1)}var x=Se(),S=oe(x);{var k=C=>{var O=_t(),D=a(O),T=a(D),Z=r(a(T),2);t(T);var N=r(T,2);ce(N,21,()=>v,pe,(s,u)=>{var b=yt(),_=a(b),M=a(_,!0);t(_);var c=r(_,2);ce(c,21,()=>e(u).keys,pe,(U,te)=>{var h=ht(),d=a(h,!0);t(h),I(()=>Q(d,e(te))),l(U,h)}),t(c),t(b),I(()=>Q(M,e(u).desc)),l(s,b)}),t(N);var Y=r(N,2),ee=a(Y),g=r(a(ee),2);ce(g,21,()=>n,pe,(s,u,b)=>{var _=wt(),M=a(_);M.textContent=b+1;var c=r(M,2),U=a(c,!0);t(c),t(_),I(()=>Q(U,e(u))),l(s,_)}),t(g),t(ee),t(Y),t(D),t(O),j("keydown",O,s=>{s.key==="Escape"&&m(!1)}),j("click",O,p),j("click",D,s=>s.stopPropagation()),j("click",Z,()=>m(!1)),l(C,O)};R(S,C=>{m()&&C(k)})}l(P,x),ve()}fe(["keydown","click"]);var Ct=f("<div></div>"),Mt=f(`<div class="space-y-4"><div><label for="setup-url" class="block text-sm font-medium text-text-secondary mb-2">Gateway URL</label> <input id="setup-url" type="text" placeholder="openclaw.example.com" class="w-full px-4 py-3 rounded-xl glass border border-border-default bg-bg-secondary
|
|
19
|
-
text-text-primary placeholder-text-muted text-center text-lg
|
|
20
|
-
focus:outline-none focus:border-accent-cyan focus:glow-cyan
|
|
21
|
-
transition-all duration-200"/> <p class="text-xs text-text-muted mt-2 text-center">The URL where your OpenClaw gateway is running</p></div> <div class="flex gap-3"><button class="flex-1 px-4 py-2.5 rounded-xl border border-border-default text-text-secondary
|
|
22
|
-
hover:bg-bg-hover transition-colors text-sm">Skip</button> <button class="flex-1 px-4 py-2.5 rounded-xl gradient-bg text-text-primary font-medium
|
|
23
|
-
hover:brightness-110 disabled:opacity-40 disabled:cursor-not-allowed
|
|
24
|
-
transition-all text-sm">Next →</button></div></div>`),zt=f(`<div class="p-5 rounded-xl border border-accent-cyan/30 bg-accent-cyan/5 text-center space-y-3"><div class="flex justify-center"><svg class="w-8 h-8 animate-spin text-accent-cyan" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg></div> <p class="text-sm font-medium text-text-primary">Waiting for approval...</p> <p class="text-xs text-text-secondary">A pairing request has been sent to the gateway. The gateway owner needs to approve
|
|
25
|
-
this device from their Cortex UI or CLI.</p> <p class="text-xs text-text-muted">Auto-retrying every 5 seconds</p></div> <button class="w-full px-4 py-2.5 rounded-xl border border-border-default text-text-secondary
|
|
26
|
-
hover:bg-bg-hover transition-colors text-sm">Cancel</button>`,1),Lt=f(`<div><label for="setup-token" class="block text-sm font-medium text-text-secondary mb-2">Access Token</label> <input id="setup-token" type="password" placeholder="Paste gateway token" class="w-full px-4 py-3 rounded-xl glass border border-border-default bg-bg-secondary
|
|
27
|
-
text-text-primary placeholder-text-muted
|
|
28
|
-
focus:outline-none focus:border-accent-cyan focus:glow-cyan
|
|
29
|
-
transition-all duration-200"/></div>`),St=f('<button class="text-xs text-text-muted hover:text-accent-cyan transition-colors flex items-center gap-1 mx-auto"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"></path></svg> I have an access token</button>'),jt=f('<div class="p-3 rounded-xl border border-accent-red/30 bg-accent-red/10"><p class="text-sm text-accent-red"> </p></div>'),Tt=f('<span class="flex items-center justify-center gap-2"><svg class="w-4 h-4 animate-spin" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> Connecting...</span>'),At=f(`<div class="p-4 rounded-xl border border-accent-cyan/20 bg-accent-cyan/5"><p class="text-sm text-text-secondary"><strong class="text-text-primary">Two ways to connect:</strong></p> <ul class="text-sm text-text-secondary mt-2 space-y-1"><li>🔗 <strong>Device pairing</strong> — just click Connect, gateway owner approves</li> <li>🔑 <strong>Token</strong> — paste your gateway token for instant access</li></ul></div> <!> <!> <div class="flex gap-3"><button class="flex-1 px-4 py-2.5 rounded-xl border border-border-default text-text-secondary
|
|
30
|
-
hover:bg-bg-hover transition-colors text-sm">← Back</button> <button class="flex-1 px-4 py-2.5 rounded-xl gradient-bg text-text-primary font-medium
|
|
31
|
-
hover:brightness-110 disabled:opacity-40 disabled:cursor-not-allowed
|
|
32
|
-
transition-all text-sm"><!></button></div>`,1),Et=f('<div class="space-y-4"><!></div>'),Ht=f(`<div class="text-center space-y-4 py-4"><div class="text-5xl animate-bounce">🎉</div> <h2 class="text-xl font-bold text-text-primary">Connected!</h2> <p class="text-text-secondary text-sm">You're all set. Your gateway is ready to go.</p> <div class="pt-2"><button class="px-6 py-2.5 rounded-xl gradient-bg text-text-primary font-medium
|
|
33
|
-
hover:brightness-110 transition-all text-sm">Let's go →</button></div></div>`),Ot=f(`<div class="fixed inset-0 z-[100] flex items-center justify-center bg-black/70 backdrop-blur-sm"><div class="glass border border-border-default rounded-2xl max-w-lg w-full mx-4 overflow-hidden shadow-2xl" style="box-shadow: 0 0 60px rgba(124, 77, 255, 0.15), 0 0 120px rgba(0, 229, 255, 0.05);"><div class="px-8 pt-8 pb-4 text-center"><div class="text-5xl mb-3">🧠</div> <h1 class="text-2xl font-bold text-text-primary">Welcome to Cortex</h1> <p class="text-text-secondary mt-1 text-sm">Let's connect to your OpenClaw gateway</p></div> <div class="flex justify-center gap-2 py-3"></div> <div class="px-8 pb-8"><!></div></div></div>`);function Bt(P,H){de(H,!0);const m=Ce(),q=Me();let y=K(1),v=K(""),n=K(""),p=K(!1),x=K(!1),S=K(""),k=K(!1),C=K(!1),O=null;re(()=>{const s=localStorage.getItem("cortex:gatewayUrl"),u=localStorage.getItem("openclaw-setup-dismissed");!s&&!u&&m.state.status==="disconnected"&&(o(k,!0),Ae().then(b=>{if(b.gatewayUrl){const _=b.gatewayWs||b.gatewayUrl.replace(/^http/,"ws");o(v,_,!0)}}))});function D(){o(k,!1),localStorage.setItem("openclaw-setup-dismissed","true")}function T(){O&&(clearInterval(O),O=null),o(C,!1)}async function Z(){if(!e(v).trim()){o(S,"Please enter your gateway URL");return}o(S,""),o(x,!0),T();try{const s=e(n).trim()||"__device_auth__";m.connect(e(v).trim(),s),await new Promise((u,b)=>{const _=setTimeout(()=>b(new Error("Connection timeout")),15e3),M=m.onStateChange(c=>{c.status==="connected"?(clearTimeout(_),M(),u()):c.status==="error"&&(clearTimeout(_),M(),b(new Error(c.error||"Connection failed")))})}),o(y,3),q.success("Connected!","You're all set."),setTimeout(()=>{o(k,!1)},3e3)}catch(s){const u=s instanceof Error?s.message:"Connection failed";if(u.toLowerCase().includes("pairing")||u.toLowerCase().includes("pair")){o(C,!0),o(S,"");const b=e(n).trim()||"__device_auth__";O=setInterval(()=>{m.connect(e(v).trim(),b);const _=m.onStateChange(M=>{M.status==="connected"?(_(),T(),o(x,!1),o(y,3),q.success("Device approved!","You're connected."),setTimeout(()=>{o(k,!1)},3e3)):M.status==="error"&&_()})},5e3);return}o(S,u,!0)}finally{e(C)||o(x,!1)}}function N(){let s=e(v).trim();s&&(s.match(/^(wss?|https?):\/\//)||(s="wss://"+s),s=s.replace(/^https:\/\//,"wss://").replace(/^http:\/\//,"ws://"),o(v,s,!0))}var Y=Se(),ee=oe(Y);{var g=s=>{var u=Ot(),b=a(u),_=r(a(b),2);ce(_,20,()=>[1,2,3],pe,(d,w)=>{var z=Ct();let V;I(()=>V=ie(z,1,"w-2 h-2 rounded-full transition-all duration-300",null,V,{"bg-accent-cyan":e(y)>=w,"scale-125":e(y)===w,"bg-border-default":e(y)<w})),l(d,z)}),t(_);var M=r(_,2),c=a(M);{var U=d=>{var w=Mt(),z=a(w),V=r(a(z),2);we(V),ye(2),t(z);var ae=r(z,2),W=a(ae),B=r(W,2);t(ae),t(w),I(L=>B.disabled=L,[()=>!e(v).trim()]),ke("blur",V,N),_e(V,()=>e(v),L=>o(v,L)),j("click",W,D),j("click",B,()=>{N(),o(y,2)}),l(d,w)},te=d=>{var w=Et(),z=a(w);{var V=W=>{var B=zt(),L=r(oe(B),2);j("click",L,()=>{T(),o(x,!1)}),l(W,B)},ae=W=>{var B=At(),L=r(oe(B),2);{var $=E=>{var J=Lt(),xe=r(a(J),2);we(xe),t(J),_e(xe,()=>e(n),ze=>o(n,ze)),l(E,J)},G=E=>{var J=St();j("click",J,()=>o(p,!0)),l(E,J)};R(L,E=>{e(p)?E($):E(G,!1)})}var se=r(L,2);{var ne=E=>{var J=jt(),xe=a(J),ze=a(xe,!0);t(xe),t(J),I(()=>Q(ze,e(S))),l(E,J)};R(se,E=>{e(S)&&E(ne)})}var ue=r(se,2),le=a(ue),i=r(le,2),A=a(i);{var F=E=>{var J=Tt();l(E,J)},X=E=>{var J=he("Connect");l(E,J)};R(A,E=>{e(x)?E(F):E(X,!1)})}t(i),t(ue),I(()=>{le.disabled=e(x),i.disabled=e(x)}),j("click",le,()=>{o(y,1),o(S,"")}),j("click",i,Z),l(W,B)};R(z,W=>{e(C)?W(V):W(ae,!1)})}t(w),l(d,w)},h=d=>{var w=Ht(),z=r(a(w),6),V=a(z);t(z),t(w),j("click",V,()=>o(k,!1)),l(d,w)};R(c,d=>{e(y)===1?d(U):e(y)===2?d(te,1):e(y)===3&&d(h,2)})}t(M),t(b),t(u),l(s,u)};R(ee,s=>{e(k)&&s(g)})}l(P,Y),ve()}fe(["click"]);var Ut=f('<div class="fixed inset-0 bg-black/60 z-40 md:hidden backdrop-blur-sm" role="button" tabindex="0" aria-label="Close navigation"></div>'),Dt=f('<div class="h-screen w-screen overflow-hidden bg-bg-primary flex"><a href="#main-content" class="skip-to-content">Skip to content</a> <!> <!> <div id="main-content" class="flex-1 flex flex-col min-w-0 overflow-hidden" role="main"><header class="flex items-center gap-3 px-3 py-2 border-b border-border-default bg-bg-secondary/50 md:hidden flex-shrink-0"><button class="p-2 rounded-lg hover:bg-bg-hover text-text-muted hover:text-accent-cyan transition-colors" aria-label="Open navigation menu"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path></svg></button> <img src="/logo.png" alt="Cortex" class="w-6 h-6 rounded-lg"/> <span class="text-sm font-bold gradient-text tracking-wider">CORTEX</span></header> <!></div> <!> <!> <!> <!> <!></div>');function Qt(P,H){de(H,!0);const m=Ce(),q=De(),y=Ue(),v=Me(),n=Ie();Ve();let p=K(!1),x=K(!1),S=K(!1),k=K(!1),C=K(!1);re(()=>{Ae().then(()=>{m.init()})}),re(()=>{typeof window<"u"&&"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").catch(()=>{})}),re(()=>{const c=m.state.status;me(()=>{if(c==="connected"&&!e(p)){o(p,!0),q.fetchSessions();const U=q.activeKey||m.state.mainSessionKey;U&&(q.setActiveSession(U),y.loadHistory(U))}c==="disconnected"&&o(p,!1)})}),re(()=>{const c=q.activeKey;me(()=>{c&&c!==y.activeSessionKey&&je.connected&&y.loadHistory(c)})}),re(()=>{const c=m.state.status;me(()=>{c==="error"&&m.state.error&&v.error("Connection Error",m.state.error,8e3)})}),re(()=>{me(()=>n.init())}),re(()=>je.on("chat",U=>{const te=U;if(te.state!=="final"||!n.notifyOnMessages)return;const h=te.message;if(!h||h.role!=="assistant")return;let d="";if(typeof h.content=="string"?d=h.content:Array.isArray(h.content)&&(d=h.content.filter(z=>z.type==="text"&&typeof z.text=="string").map(z=>z.text).join(" ")),!d)return;const w=d.length>100?d.slice(0,100)+"…":d;n.notify("Cortex — New message",w)})),re(()=>m.onStateChange(U=>{U.status==="disconnected"&&n.notifyOnDisconnect&&n.notify("Cortex — Connection lost","The gateway connection was lost. Attempting to reconnect…")}));var O=Dt();ke("keydown",Te,c=>{c.key==="Escape"&&e(k)&&o(k,!1)});var D=r(a(O),2);{var T=c=>{var U=Ut();j("click",U,()=>o(k,!1)),j("keydown",U,te=>te.key==="Escape"&&o(k,!1)),l(c,U)};R(D,c=>{e(k)&&c(T)})}var Z=r(D,2);gt(Z,{onshortcuthelp:()=>o(C,!0),onnavigate:()=>o(k,!1),get collapsed(){return e(S)},set collapsed(c){o(S,c,!0)},get mobileOpen(){return e(k)},set mobileOpen(c){o(k,c,!0)}});var N=r(Z,2),Y=a(N),ee=a(Y);ye(4),t(Y);var g=r(Y,2);Be(g,()=>H.children),t(N);var s=r(N,2);Xe(s,{});var u=r(s,2);rt(u,{get show(){return e(x)},set show(c){o(x,c,!0)}});var b=r(u,2);bt(b,{get showHelp(){return e(C)},set showHelp(c){o(C,c,!0)}});var _=r(b,2);kt(_,{get show(){return e(C)},set show(c){o(C,c,!0)}});var M=r(_,2);Bt(M,{}),t(O),j("click",ee,()=>o(k,!0)),l(P,O),ve()}fe(["click","keydown"]);export{Qt as component,Jt as universal};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as h,f as u,s as e}from"../chunks/B2A7gHtL.js";import{i as g}from"../chunks/KBP0Pl-D.js";import{p as l,j as v,t as d,c as _,h as a,r as o,f as x}from"../chunks/qR_TM3YX.js";import{s as $,p}from"../chunks/Bt3hjGaS.js";const b={get error(){return p.error},get status(){return p.status}};$.updated.check;const m=b;var k=u("<h1> </h1> <p> </p>",1);function y(f,i){l(i,!1),g();var t=k(),r=v(t),c=a(r,!0);o(r);var s=x(r,2),n=a(s,!0);o(s),d(()=>{e(c,m.status),e(n,m.error?.message)}),h(f,t),_()}export{y as component};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import{d as _a,a as k,b as x,s as g,f as b,e as ka,g as Cr}from"../chunks/B2A7gHtL.js";import{p as wa,s as L,a as q,u as Ar,g as e,d as f,b as Ma,t as y,c as Ca,e as Aa,h as a,f as n,i as D,$ as Ta,r,n as O,j as Kt,m as Tr,o as Lr}from"../chunks/qR_TM3YX.js";import{i as w}from"../chunks/DpBBTLWw.js";import{g as La,a as Pt,s as S,r as K,e as ne,i as Qt,b as xe}from"../chunks/BLtDog0v.js";import{h as Sa}from"../chunks/CXQ1lKJR.js";import{s as ja}from"../chunks/SHB02qEx.js";import{b as $e,a as Be}from"../chunks/nnazh41B.js";import{b as Da,i as Sr,s as jr}from"../chunks/DVP7Iy08.js";import{g as $a}from"../chunks/C--qzJ6W.js";import{g as Ba}from"../chunks/Be_uRYmX.js";import{g as Fa}from"../chunks/CrSotJB3.js";var za=b('<div class="mt-4 rounded-xl border border-border-default bg-bg-secondary/50 p-4 animate-fade-in"><div class="grid grid-cols-2 md:grid-cols-4 gap-4"><div><label class="block text-xs text-text-muted mb-1">Active Minutes (0=all)</label> <input type="number" min="0" step="1" class="w-full px-3 py-1.5 text-sm rounded-lg border border-border-default bg-bg-tertiary text-text-primary focus:outline-none focus:border-accent-cyan transition-all"/></div> <div><label class="block text-xs text-text-muted mb-1">Limit</label> <input type="number" min="1" max="500" step="1" class="w-full px-3 py-1.5 text-sm rounded-lg border border-border-default bg-bg-tertiary text-text-primary focus:outline-none focus:border-accent-cyan transition-all"/></div> <div class="flex flex-col justify-end gap-2"><label class="flex items-center gap-2 text-sm text-text-secondary cursor-pointer"><input type="checkbox" class="rounded border-border-default bg-bg-tertiary text-accent-cyan focus:ring-accent-cyan/30"/> Include Global</label> <label class="flex items-center gap-2 text-sm text-text-secondary cursor-pointer"><input type="checkbox" class="rounded border-border-default bg-bg-tertiary text-accent-cyan focus:ring-accent-cyan/30"/> Include Unknown</label></div> <div class="flex items-end"><button class="w-full px-3 py-1.5 text-sm rounded-lg bg-accent-cyan/10 text-accent-cyan border border-accent-cyan/30 hover:bg-accent-cyan/20 transition-all">Apply Filters</button></div></div></div>'),Va=b('<div class="flex rounded-lg border border-border-default overflow-hidden"><button>Grouped</button> <button>All</button></div>'),Ha=b('<div class="flex items-center gap-1"><button class="px-2 py-2 text-xs rounded-lg bg-bg-tertiary border border-border-default text-text-muted hover:text-text-secondary transition-all" title="Expand all"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></button> <button class="px-2 py-2 text-xs rounded-lg bg-bg-tertiary border border-border-default text-text-muted hover:text-text-secondary transition-all" title="Collapse all"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg></button> <span class="text-[10px] text-text-muted ml-1"> </span></div>'),Ia=b('<div class="flex flex-col items-center justify-center h-full text-center"><div class="w-16 h-16 rounded-2xl bg-bg-tertiary border border-border-default flex items-center justify-center mb-4"><svg class="w-8 h-8 text-text-muted" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18.364 5.636a9 9 0 010 12.728m-2.829-2.829a5 5 0 000-7.07"></path></svg></div> <p class="text-text-muted text-sm">Connect to the gateway to view sessions.</p></div>'),Na=b('<div class="rounded-xl border border-border-default bg-bg-secondary/50 p-5 animate-pulse"><div class="h-4 w-48 bg-bg-tertiary rounded mb-3"></div> <div class="h-3 w-96 bg-bg-tertiary rounded mb-2"></div> <div class="flex gap-2"><div class="h-5 w-16 bg-bg-tertiary rounded-full"></div> <div class="h-5 w-20 bg-bg-tertiary rounded-full"></div> <div class="h-5 w-14 bg-bg-tertiary rounded-full"></div></div></div>'),Ra=b('<div class="flex flex-col gap-3"></div>'),Ua=b('<div class="flex flex-col items-center justify-center h-64 text-center"><p class="text-text-muted text-sm"> </p></div>'),Ea=b('<div class="flex flex-col items-center justify-center h-64 text-center"><p class="text-text-muted text-sm"> </p></div>'),Oa=b('<button><svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg></button>'),Ga=b('<div class="w-6 flex-shrink-0 mt-0.5 flex items-center justify-center"><span></span></div>'),qa=b('<form class="flex items-center gap-2"><input type="text" class="px-2 py-1 text-sm rounded border border-accent-cyan/50 bg-bg-tertiary text-text-primary focus:outline-none focus:border-accent-cyan w-48"/> <button type="submit" class="text-accent-cyan text-xs hover:underline">Save</button> <button type="button" class="text-text-muted text-xs hover:text-text-secondary">Cancel</button></form>'),Ka=b('<span> </span> <button class="p-0.5 rounded hover:bg-bg-hover text-text-muted hover:text-accent-cyan transition-colors" title="Rename"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path></svg></button>',1),Pa=b('<span class="px-2 py-0.5 rounded text-[10px] font-medium bg-bg-tertiary text-text-muted border border-border-default"> </span>'),Qa=b('<span class="px-2 py-0.5 rounded text-[10px] font-medium bg-accent-purple/10 text-purple-300 border border-accent-purple/10"> </span>'),Wa=b("<span> </span>"),Ja=b('<span class="flex items-center gap-1 px-2 py-0.5 rounded text-[10px] bg-accent-purple/10 text-purple-300 border border-accent-purple/10"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"></path></svg> </span>'),Xa=b('<span class="px-2 py-0.5 rounded text-[10px] bg-bg-tertiary text-text-muted border border-border-default"> </span>'),Ya=b('<span class="flex items-center gap-1 px-2 py-0.5 rounded text-[10px] bg-accent-green/10 text-accent-green border border-accent-green/10"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A2 2 0 013 12V7a4 4 0 014-4z"></path></svg> </span>'),Za=b('<p class="text-xs text-text-muted truncate mb-1.5 max-w-[500px]"> </p>'),en=b('<span class="flex items-center gap-1 px-2 py-1 rounded-lg text-[10px] font-medium bg-accent-amber/15 text-accent-amber border border-accent-amber/30"> </span>'),tn=b("<option> </option>"),rn=b(`<select class="px-2 py-1 rounded-lg text-[11px] border border-border-default bg-bg-tertiary
|
|
2
|
-
text-text-secondary hover:border-accent-purple/40 focus:outline-none focus:border-accent-purple
|
|
3
|
-
transition-all disabled:opacity-50 max-w-[200px] cursor-pointer appearance-none
|
|
4
|
-
bg-[url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2388929e%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E')]
|
|
5
|
-
bg-[length:12px] bg-[right_6px_center] bg-no-repeat pr-6" title="Override model for this session"><option>🤖 Model: default</option><!></select>`),an=b('<div class="px-4 pb-4"><div class="pt-3 border-t border-border-default flex items-center gap-3 flex-wrap"><span class="text-xs text-red-400">Delete this session permanently?</span> <label class="flex items-center gap-1.5 text-xs text-text-muted cursor-pointer"><input type="checkbox" class="rounded border-border-default bg-bg-tertiary text-red-400"/> Also delete transcript</label> <button class="px-3 py-1 rounded text-xs bg-red-500/20 text-red-400 border border-red-500/30 hover:bg-red-500/30 transition-colors">Confirm Delete</button> <button class="px-3 py-1 rounded text-xs bg-bg-tertiary text-text-muted border border-border-default hover:text-text-secondary transition-colors">Cancel</button></div></div>'),nn=b("<div></div>"),on=b(`<div class="animate-fade-in"><div><div class="p-4"><div class="flex items-start gap-3"><!> <div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-1.5 flex-wrap"><!> <span> </span> <!> <!> <!></div> <div class="flex items-center gap-2 mb-1.5 flex-wrap"><!> <!> <!></div> <!> <div class="flex items-center gap-3 text-xs text-text-muted"><span class="flex items-center gap-1"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> </span> <span class="font-mono text-text-muted/40 text-[10px] truncate max-w-[250px]"> </span></div></div> <div class="flex flex-col items-end gap-2 flex-shrink-0"><div class="flex items-center gap-1"><button><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"></path></svg> </button> <button><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg> </button> <!></div> <!> <div class="flex items-center gap-1"><button class="px-3 py-1.5 rounded-lg text-xs border border-accent-cyan/30 text-accent-cyan
|
|
6
|
-
hover:bg-accent-cyan/10 transition-colors" title="Open in chat">Chat</button> <button class="p-1.5 rounded-lg hover:bg-bg-hover text-text-muted hover:text-red-400 transition-colors" title="Delete session"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg></button></div></div></div></div> <!></div> <!></div>`),sn=b('<div class="flex flex-col gap-3"></div>'),ln=b('<div class="flex flex-col items-center justify-center h-64 text-center"><p class="text-text-muted text-sm"> </p></div>'),cn=b('<form class="flex items-center gap-2"><input type="text" class="px-2 py-1 text-sm rounded border border-accent-cyan/50 bg-bg-tertiary text-text-primary focus:outline-none focus:border-accent-cyan w-48"/> <button type="submit" class="text-accent-cyan text-xs hover:underline">Save</button> <button type="button" class="text-text-muted text-xs hover:text-text-secondary">Cancel</button></form>'),dn=b('<span class="font-medium text-text-primary truncate max-w-[300px]"> </span> <button class="p-0.5 rounded hover:bg-bg-hover text-text-muted hover:text-accent-cyan transition-colors" title="Rename"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path></svg></button>',1),vn=b('<span class="px-2 py-0.5 rounded text-[10px] font-medium bg-bg-tertiary text-text-muted border border-border-default"> </span>'),un=b('<span class="px-2 py-0.5 rounded text-[10px] font-medium bg-accent-purple/10 text-purple-300 border border-accent-purple/10"> </span>'),pn=b('<button class="flex items-center gap-1 px-2 py-0.5 rounded text-[10px] font-medium bg-accent-amber/10 text-accent-amber border border-accent-amber/20 hover:bg-accent-amber/20 transition-colors"><svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg> </button>'),xn=b('<span class="flex items-center gap-1 px-2 py-0.5 rounded text-[10px] bg-accent-purple/10 text-purple-300 border border-accent-purple/10"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"></path></svg> </span>'),bn=b('<span class="px-2 py-0.5 rounded text-[10px] bg-bg-tertiary text-text-muted border border-border-default"> </span>'),gn=b('<span class="flex items-center gap-1 px-2 py-0.5 rounded text-[10px] bg-accent-green/10 text-accent-green border border-accent-green/10"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A2 2 0 013 12V7a4 4 0 014-4z"></path></svg> </span>'),fn=b('<p class="text-xs text-text-muted truncate mb-1.5 max-w-[500px]"> </p>'),mn=b('<span class="flex items-center gap-1 px-2 py-1 rounded-lg text-[10px] font-medium bg-accent-amber/15 text-accent-amber border border-accent-amber/30"> </span>'),hn=b("<option> </option>"),yn=b(`<select class="px-2 py-1 rounded-lg text-[11px] border border-border-default bg-bg-tertiary
|
|
7
|
-
text-text-secondary hover:border-accent-purple/40 focus:outline-none focus:border-accent-purple
|
|
8
|
-
transition-all disabled:opacity-50 max-w-[200px] cursor-pointer appearance-none
|
|
9
|
-
bg-[url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2388929e%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E')]
|
|
10
|
-
bg-[length:12px] bg-[right_6px_center] bg-no-repeat pr-6" title="Override model for this session"><option>🤖 Model: default</option><!></select>`),_n=b('<div class="px-4 pb-4"><div class="pt-3 border-t border-border-default flex items-center gap-3 flex-wrap"><span class="text-xs text-red-400">Delete this session permanently?</span> <label class="flex items-center gap-1.5 text-xs text-text-muted cursor-pointer"><input type="checkbox" class="rounded border-border-default bg-bg-tertiary text-red-400"/> Also delete transcript</label> <button class="px-3 py-1 rounded text-xs bg-red-500/20 text-red-400 border border-red-500/30 hover:bg-red-500/30 transition-colors">Confirm Delete</button> <button class="px-3 py-1 rounded text-xs bg-bg-tertiary text-text-muted border border-border-default hover:text-text-secondary transition-colors">Cancel</button></div></div>'),kn=b('<p class="text-xs text-text-muted truncate mb-1 max-w-[400px]"> </p>'),wn=b("<span> </span>"),Mn=b("<span> </span>"),Cn=b('<div class="mt-2 pt-2 border-t border-border-default/50 flex items-center gap-2"><span class="text-[10px] text-red-400">Delete?</span> <label class="flex items-center gap-1 text-[10px] text-text-muted cursor-pointer"><input type="checkbox" class="rounded border-border-default bg-bg-tertiary text-red-400 w-3 h-3"/> + transcript</label> <button class="px-2 py-0.5 rounded text-[10px] bg-red-500/20 text-red-400 hover:bg-red-500/30 transition-colors">Confirm</button> <button class="px-2 py-0.5 rounded text-[10px] bg-bg-tertiary text-text-muted hover:text-text-secondary transition-colors">Cancel</button></div>'),An=b(`<div class="rounded-lg border border-border-default/50 bg-bg-secondary/30 p-3 ml-4 relative
|
|
11
|
-
before:absolute before:left-[-12px] before:top-1/2 before:w-3 before:h-px before:bg-accent-amber/30"><div class="flex items-start justify-between gap-3"><div class="min-w-0 flex-1"><div class="flex items-center gap-2 mb-1"><span></span> <span class="text-sm font-medium text-text-primary truncate"> </span> <span> </span></div> <!> <div class="flex items-center gap-3 text-[10px] text-text-muted"><!> <!> <span> </span></div></div> <div class="flex items-center gap-1 flex-shrink-0"><button class="px-2 py-1 rounded text-[10px] border border-accent-cyan/20 text-accent-cyan hover:bg-accent-cyan/10 transition-colors">Chat</button> <button class="p-1 rounded hover:bg-bg-hover text-text-muted hover:text-red-400 transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg></button></div></div> <!></div>`),Tn=b('<div class="border-t border-border-default bg-bg-primary/30"><div class="px-4 py-2"><div class="text-[10px] uppercase tracking-wider text-text-muted font-semibold mb-2 flex items-center gap-2"><svg class="w-3.5 h-3.5 text-accent-amber" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg> </div> <div class="space-y-2"></div></div></div>'),Ln=b(`<div class="rounded-xl border border-border-default bg-bg-secondary/50 hover:border-accent-cyan/20 transition-all animate-fade-in"><div class="p-4"><div class="flex items-start gap-4"><div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-1.5 flex-wrap"><!> <span> </span> <!> <!> <!></div> <div class="flex items-center gap-2 mb-1.5 flex-wrap"><!> <!> <!></div> <!> <div class="flex items-center gap-3 text-xs text-text-muted"><span class="flex items-center gap-1"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> </span> <span class="font-mono text-text-muted/40 text-[10px] truncate max-w-[250px]"> </span></div></div> <div class="flex flex-col items-end gap-2 flex-shrink-0"><div class="flex items-center gap-1"><button><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"></path></svg> </button> <button><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg> </button> <!></div> <!> <div class="flex items-center gap-1"><button class="px-3 py-1.5 rounded-lg text-xs border border-accent-cyan/30 text-accent-cyan
|
|
12
|
-
hover:bg-accent-cyan/10 transition-colors" title="Open in chat">Chat</button> <button class="p-1.5 rounded-lg hover:bg-bg-hover text-text-muted hover:text-red-400 transition-colors" title="Delete session"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg></button></div></div></div></div> <!> <!></div>`),Sn=b('<div class="flex flex-col gap-3"></div>'),jn=b(`<div class="h-full flex flex-col overflow-hidden"><div class="flex-shrink-0 p-4 md:p-6 pb-4 border-b border-border-default"><div class="flex items-start justify-between gap-4 flex-wrap"><div class="flex items-center gap-3"><div class="w-10 h-10 rounded-xl gradient-bg border border-border-glow flex items-center justify-center flex-shrink-0"><svg class="w-5 h-5 text-accent-cyan" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"></path></svg></div> <div><h1 class="text-xl font-bold text-text-primary glow-text-cyan">Sessions</h1> <p class="text-sm text-text-muted">Inspect, control, and manage active sessions</p></div></div> <div class="flex items-center gap-2"><button><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"></path></svg> Filters</button> <button class="flex items-center gap-1.5 px-3 py-1.5 text-sm bg-bg-tertiary border border-border-default rounded-lg text-text-secondary hover:text-accent-cyan hover:border-accent-cyan/30 transition-all disabled:opacity-40 disabled:cursor-not-allowed"><svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path></svg> </button></div></div> <div class="grid grid-cols-3 md:grid-cols-5 gap-3 mt-4"><div class="rounded-lg border border-border-default bg-bg-secondary/50 p-3 text-center"><div class="text-xl font-bold text-text-primary font-mono"> </div> <div class="text-xs text-text-muted">Total</div></div> <div class="rounded-lg border border-border-default bg-bg-secondary/50 p-3 text-center"><div class="text-xl font-bold text-accent-purple font-mono"> </div> <div class="text-xs text-text-muted">Main</div></div> <div class="rounded-lg border border-border-default bg-bg-secondary/50 p-3 text-center"><div class="text-xl font-bold text-accent-cyan font-mono"> </div> <div class="text-xs text-text-muted">Isolated</div></div> <div class="rounded-lg border border-border-default bg-bg-secondary/50 p-3 text-center"><div class="text-xl font-bold text-accent-amber font-mono"> </div> <div class="text-xs text-text-muted">Sub-agents</div></div> <div class="rounded-lg border border-border-default bg-bg-secondary/50 p-3 text-center"><div class="text-xl font-bold text-accent-green font-mono"> </div> <div class="text-xs text-text-muted">Tokens</div></div></div> <!></div> <div class="flex-shrink-0 px-4 md:px-6 py-3 border-b border-border-default/50"><div class="flex gap-3 items-center flex-wrap"><div class="relative flex-1"><input type="text" placeholder="Search sessions by name, key, channel, model, agent..." class="w-full pl-9 pr-3 py-2 text-sm rounded-lg border border-border-default bg-bg-tertiary
|
|
13
|
-
text-text-primary placeholder-text-muted focus:outline-none focus:border-accent-cyan transition-all"/> <svg class="absolute left-3 top-2.5 w-4 h-4 text-text-muted" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg></div> <select class="px-3 py-2 text-sm rounded-lg border border-border-default bg-bg-tertiary text-text-secondary"><option>Sort: Activity</option><option>Sort: Name</option><option>Sort: Channel</option><option>Sort: Tokens</option></select> <div class="flex rounded-lg border border-border-default overflow-hidden"><button><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path></svg> List</button> <button><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 4h2v16H3zM9 4h2v8H9zM15 8h2v12h-2zM21 4h2v6h-2z"></path></svg> Tree</button></div> <!></div></div> <div class="flex-1 overflow-y-auto p-4 md:p-6"><!></div></div>`);function En(Dr,$r){wa($r,!0);const it=La(),j=$a(),Fe=Ba();let oe=L(!1),se=L(""),be=L(""),ge=L("activity"),I=L(null),H=L(!1),ze=L(!1),fe=L(null),P=L(""),Ve=L(null),He=L(q(new Set)),ee=L("grouped"),me=L(q([]));L(q(new Set)),L(q(new Map)),L(q(new Set));let Z=L("list"),he=L(q(new Set)),Ie=L(q(j.filters.activeMinutes)),Ne=L(q(j.filters.limit)),Re=L(q(j.filters.includeGlobal)),Ue=L(q(j.filters.includeUnknown));Ar(()=>{const t=e(se),o=setTimeout(()=>{f(be,t,!0)},200);return()=>clearTimeout(o)}),Ar(()=>{it.state.status==="connected"&&Ma(()=>{ye(),Fr()})});async function ye(){f(oe,!0),await j.fetchSessions({activeMinutes:e(Ie),limit:e(Ne),includeGlobal:e(Re),includeUnknown:e(Ue)}),f(oe,!1)}function Br(){j.setFilters({activeMinutes:e(Ie),limit:e(Ne),includeGlobal:e(Re),includeUnknown:e(Ue)}),ye()}async function Fr(){try{const t=await Pt.call("models.list",{});f(me,t?.models??[],!0)}catch{}}async function Wt(t,o){await Ee(t.key,{model:o})}async function ct(t){try{await Pt.call("sessions.delete",{key:t,deleteTranscript:e(H)}),Fe.success("Deleted","Session removed"),f(I,null),f(H,!1),await ye()}catch(o){Fe.error("Failed",String(o))}}async function Ee(t,o){f(Ve,t,!0);try{await Pt.call("sessions.patch",{key:t,...o}),Fe.success("Updated","Session settings saved"),await ye()}catch(i){Fe.error("Failed",String(i))}finally{f(Ve,null)}}function Jt(t){f(fe,t.key,!0),f(P,t.label??j.getSessionTitle(t),!0)}async function Xt(t){e(P).trim()&&await Ee(t,{label:e(P).trim()}),f(fe,null),f(P,"")}function Yt(){f(fe,null),f(P,"")}async function Zt(t){const o=["off","on","stream"],i=t.thinkingLevel??"off",m=o.indexOf(i),h=o[(m+1)%o.length];await Ee(t.key,{thinkingLevel:h})}async function er(t){const i=(t.verboseLevel??"off")==="off"?"on":"off";await Ee(t.key,{verboseLevel:i})}function dt(t){j.setActiveSession(t),Fa("/")}function zr(t){const o=new Set(e(He));o.has(t)?o.delete(t):o.add(t),f(He,o,!0)}function Vr(t){return t.key.includes(":main")?"main":t.key.includes(":subagent:")?"subagent":"isolated"}function vt(t){return t.key.includes(":subagent:")}function Hr(t){if(!vt(t))return null;const o=t.key.indexOf(":subagent:");return o===-1?null:t.key.substring(0,o)+":main"}function Ir(t){const o=t.key.lastIndexOf(":subagent:");return o===-1?t.key:t.key.substring(o+10)}function Nr(t){if(t.status==="error")return"error";if(t.status==="done"||t.status==="completed")return"done";const o=t.lastActivityAt?new Date(t.lastActivityAt).getTime():t.lastActivity?t.lastActivity:0;return o&&Date.now()-o>300*1e3?"done":o?"active":"unknown"}function tr(t){return t.includes(":subagent:")?{type:"subagent",parent:t.split(":subagent:")[0]+":main"}:t.includes(":cron:")&&t.includes(":run:")?{type:"cron-run",parent:t.split(":run:")[0]}:t.includes(":cron:")?{type:"cron",parent:t.split(":cron:")[0]+":main"}:t.endsWith(":main")?{type:"main"}:{type:"channel"}}function Rr(t){switch(t){case"main":return"cyan";case"subagent":return"purple";case"cron":return"amber";case"cron-run":return"amber";case"channel":return"green";default:return"cyan"}}function Ur(t){const o=new Set(e(he));o.has(t)?o.delete(t):o.add(t),f(he,o,!0)}function Er(){f(he,new Set,!0)}function Or(){const t=new Set,o=i=>{for(const m of i)m.children.length>0&&(t.add(m.session.key),o(m.children))};o(e(ke)),f(he,t,!0)}function ut(t){if(!t)return"n/a";const o=typeof t=="string"?new Date(t):new Date(t),i=Date.now()-o.getTime();return i<6e4?"just now":i<36e5?`${Math.floor(i/6e4)}m ago`:i<864e5?`${Math.floor(i/36e5)}h ago`:o.toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Oe(t){return!t&&t!==0?"—":t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:String(t)}let Gr=D(()=>j.list.filter(t=>!vt(t))),qr=D(()=>{const t=new Map;for(const o of j.list)if(vt(o)){const i=Hr(o);i&&(t.has(i)||t.set(i,[]),t.get(i).push(o))}return t}),pt=D(()=>{let t=e(ee)==="grouped"?e(Gr):j.list;if(e(be).trim()){const o=e(be).toLowerCase();t=t.filter(i=>j.getSessionTitle(i).toLowerCase().includes(o)||i.key.toLowerCase().includes(o)||(i.channel?.toLowerCase().includes(o)??!1)||(i.model?.toLowerCase().includes(o)??!1)||(i.agentId?.toLowerCase().includes(o)??!1)||(i.provider?.toLowerCase().includes(o)??!1))}return t=[...t],e(ge)==="name"?t.sort((o,i)=>j.getSessionTitle(o).localeCompare(j.getSessionTitle(i))):e(ge)==="channel"?t.sort((o,i)=>(o.channel??"").localeCompare(i.channel??"")):e(ge)==="tokens"?t.sort((o,i)=>le(i)-le(o)):t.sort((o,i)=>{const m=o.lastActivityAt?new Date(o.lastActivityAt).getTime():o.lastActivity??0;return(i.lastActivityAt?new Date(i.lastActivityAt).getTime():i.lastActivity??0)-m}),t});function le(t){return t.totalTokens??t.tokenCount??0}let _e=D(()=>{const t=j.list,o=t.reduce((i,m)=>i+le(m),0);return{total:t.length,main:t.filter(i=>i.key.includes(":main")&&!i.key.includes(":subagent:")).length,isolated:t.filter(i=>!i.key.includes(":main")&&!i.key.includes(":subagent:")).length,subagent:t.filter(i=>i.key.includes(":subagent:")).length,totalTokens:o}}),ke=D(()=>{const t=j.list,o=new Map,i=[];for(const h of t){const C=tr(h.key);o.set(h.key,{session:h,sessionType:C.type,children:[]})}for(const h of t){const C=tr(h.key),c=o.get(h.key);if(C.parent){const _=o.get(C.parent);if(_){_.children.push(c);continue}}i.push(c)}const m=h=>{h.sort((C,c)=>{const _=C.session.lastActivityAt?new Date(C.session.lastActivityAt).getTime():C.session.lastActivity??0;return(c.session.lastActivityAt?new Date(c.session.lastActivityAt).getTime():c.session.lastActivity??0)-_});for(const C of h)C.children.length>0&&m(C.children)};if(m(i),e(be).trim()){const h=e(be).toLowerCase(),C=c=>{const _=c.session,v=j.getSessionTitle(_).toLowerCase().includes(h)||_.key.toLowerCase().includes(h)||(_.channel?.toLowerCase().includes(h)??!1)||(_.model?.toLowerCase().includes(h)??!1)||(_.agentId?.toLowerCase().includes(h)??!1)||(_.provider?.toLowerCase().includes(h)??!1),G=c.children.some(U=>C(U));return v||G};return i.filter(c=>C(c))}return i}),rr=D(()=>{let t=0;const o=i=>{for(const m of i)t+=m.children.length,o(m.children)};return o(e(ke)),{roots:e(ke).length,nested:t}});var xt=jn();Sa("98wg7q",t=>{Aa(()=>{Ta.title="Sessions — Cortex"})});var bt=a(xt),gt=a(bt),ar=n(a(gt),2),ft=a(ar),Ge=n(ft,2),nr=a(Ge),Kr=n(nr);r(Ge),r(ar),r(gt);var mt=n(gt,2),ht=a(mt),or=a(ht),Pr=a(or,!0);r(or),O(2),r(ht);var yt=n(ht,2),sr=a(yt),Qr=a(sr,!0);r(sr),O(2),r(yt);var _t=n(yt,2),lr=a(_t),Wr=a(lr,!0);r(lr),O(2),r(_t);var kt=n(_t,2),ir=a(kt),Jr=a(ir,!0);r(ir),O(2),r(kt);var cr=n(kt,2),dr=a(cr),Xr=a(dr,!0);r(dr),O(2),r(cr),r(mt);var Yr=n(mt,2);{var Zr=t=>{var o=za(),i=a(o),m=a(i),h=n(a(m),2);K(h),r(m);var C=n(m,2),c=n(a(C),2);K(c),r(C);var _=n(C,2),v=a(_),G=a(v);K(G),O(),r(v);var U=n(v,2),N=a(U);K(N),O(),r(U),r(_);var $=n(_,2),Q=a($);r($),r(i),r(o),$e(h,()=>e(Ie),B=>f(Ie,B)),$e(c,()=>e(Ne),B=>f(Ne,B)),Be(G,()=>e(Re),B=>f(Re,B)),Be(N,()=>e(Ue),B=>f(Ue,B)),k("click",Q,Br),x(t,o)};w(Yr,t=>{e(ze)&&t(Zr)})}r(bt);var wt=n(bt,2),vr=a(wt),Mt=a(vr),ur=a(Mt);K(ur),O(2),r(Mt);var qe=n(Mt,2),Ct=a(qe);Ct.value=Ct.__value="activity";var At=n(Ct);At.value=At.__value="name";var Tt=n(At);Tt.value=Tt.__value="channel";var pr=n(Tt);pr.value=pr.__value="tokens",r(qe);var Lt=n(qe,2),St=a(Lt),xr=n(St,2);r(Lt);var ea=n(Lt,2);{var ta=t=>{var o=Va(),i=a(o),m=n(i,2);r(o),y(()=>{S(i,1,`px-3 py-2 text-xs transition-all ${e(ee)==="grouped"?"bg-accent-cyan/10 text-accent-cyan":"bg-bg-tertiary text-text-muted hover:text-text-secondary"}`),S(m,1,`px-3 py-2 text-xs transition-all ${e(ee)==="all"?"bg-accent-cyan/10 text-accent-cyan":"bg-bg-tertiary text-text-muted hover:text-text-secondary"}`)}),k("click",i,()=>f(ee,"grouped")),k("click",m,()=>f(ee,"all")),x(t,o)},ra=t=>{var o=Ha(),i=a(o),m=n(i,2),h=n(m,2),C=a(h);r(h),r(o),y(()=>g(C,`${e(rr).roots??""} roots · ${e(rr).nested??""} nested`)),k("click",i,Er),k("click",m,Or),x(t,o)};w(ea,t=>{e(Z)==="list"?t(ta):t(ra,!1)})}r(vr),r(wt);var br=n(wt,2),aa=a(br);{var na=t=>{var o=Ia();x(t,o)},oa=t=>{var o=Ra();ne(o,20,()=>Array(4),Qt,(i,m)=>{var h=Na();x(i,h)}),r(o),x(t,o)},sa=t=>{var o=Ua(),i=a(o),m=a(i,!0);r(i),r(o),y(()=>g(m,e(se)?"No sessions match your search.":"No sessions found.")),x(t,o)},la=t=>{var o=Ea(),i=a(o),m=a(i,!0);r(i),r(o),y(()=>g(m,e(se)?"No sessions match your search.":"No sessions found.")),x(t,o)},ia=t=>{const o=(m,h=Tr,C=Tr)=>{const c=D(()=>h().session),_=D(()=>h().sessionType),v=D(()=>le(e(c))),G=D(()=>e(Ve)===e(c).key),U=D(()=>!e(he).has(e(c).key)),N=D(()=>h().children.length>0),$=D(()=>Rr(e(_)));var Q=on(),B=a(Q),te=a(B),we=a(te),ie=a(we);{var Me=s=>{var l=Oa(),u=a(l);r(l),y(()=>{S(l,1,`mt-0.5 p-1 rounded-lg hover:bg-bg-hover transition-all flex-shrink-0
|
|
14
|
-
${e($)==="cyan"?"text-accent-cyan hover:bg-accent-cyan/10":e($)==="purple"?"text-accent-purple hover:bg-accent-purple/10":e($)==="amber"?"text-accent-amber hover:bg-accent-amber/10":"text-accent-green hover:bg-accent-green/10"}`),S(u,0,`w-4 h-4 transition-transform duration-200 ${e(U)?"rotate-90":""}`)}),k("click",l,()=>Ur(e(c).key)),x(s,l)},Ke=s=>{var l=Ga(),u=a(l);r(l),y(()=>S(u,1,`w-1.5 h-1.5 rounded-full
|
|
15
|
-
${e($)==="cyan"?"bg-accent-cyan/40":e($)==="purple"?"bg-accent-purple/40":e($)==="amber"?"bg-accent-amber/40":"bg-accent-green/40"}`)),x(s,l)};w(ie,s=>{e(N)?s(Me):s(Ke,!1)})}var Ce=n(ie,2),Ae=a(Ce),re=a(Ae);{var jt=s=>{var l=qa(),u=a(l);K(u),Lr(u);var A=n(u,4);r(l),Cr("submit",l,T=>{T.preventDefault(),Xt(e(c).key)}),$e(u,()=>e(P),T=>f(P,T)),k("click",A,Yt),x(s,l)},Pe=s=>{var l=Ka(),u=Kt(l),A=a(u,!0);r(u);var T=n(u,2);y(M=>{S(u,1,`font-medium text-text-primary truncate max-w-[300px]
|
|
16
|
-
${C()===0?"text-base font-semibold":"text-sm"}`),g(A,M)},[()=>j.getSessionTitle(e(c))]),k("click",T,()=>Jt(e(c))),x(s,l)};w(re,s=>{e(fe)===e(c).key?s(jt):s(Pe,!1)})}var ce=n(re,2),Qe=a(ce,!0);r(ce);var We=n(ce,2);{var Dt=s=>{var l=Pa(),u=a(l,!0);r(l),y(()=>g(u,e(c).channel)),x(s,l)};w(We,s=>{e(c).channel&&s(Dt)})}var Je=n(We,2);{var Te=s=>{var l=Qa(),u=a(l,!0);r(l),y(()=>g(u,e(c).agentId)),x(s,l)};w(Je,s=>{e(c).agentId&&s(Te)})}var Xe=n(Je,2);{var $t=s=>{var l=Wa(),u=a(l);r(l),y(()=>{S(l,1,`px-2 py-0.5 rounded-full text-[10px] font-bold
|
|
17
|
-
${e($)==="cyan"?"bg-accent-cyan/15 text-accent-cyan":e($)==="purple"?"bg-accent-purple/15 text-accent-purple":e($)==="amber"?"bg-accent-amber/15 text-accent-amber":"bg-accent-green/15 text-accent-green"}`),g(u,`${h().children.length??""} child${h().children.length!==1?"ren":""}`)}),x(s,l)};w(Xe,s=>{e(N)&&s($t)})}r(Ae);var de=n(Ae,2),Ye=a(de);{var Bt=s=>{var l=Ja(),u=n(a(l));r(l),y(()=>g(u,` ${e(c).model??""}`)),x(s,l)};w(Ye,s=>{e(c).model&&s(Bt)})}var Ze=n(Ye,2);{var et=s=>{var l=Xa(),u=a(l,!0);r(l),y(()=>g(u,e(c).provider)),x(s,l)};w(Ze,s=>{e(c).provider&&s(et)})}var Ft=n(Ze,2);{var tt=s=>{var l=Ya(),u=n(a(l));r(l),y(A=>g(u,` ${A??""} tokens`),[()=>Oe(e(v))]),x(s,l)};w(Ft,s=>{e(v)>0&&s(tt)})}r(de);var ve=n(de,2);{var zt=s=>{var l=Za(),u=a(l,!0);r(l),y(()=>g(u,e(c).lastMessage)),x(s,l)};w(ve,s=>{e(c).lastMessage&&s(zt)})}var ue=n(ve,2),Le=a(ue),rt=n(a(Le));r(Le);var ae=n(Le,2),W=a(ae,!0);r(ae),r(ue),r(Ce);var at=n(Ce,2),E=a(at),J=a(E),Vt=n(a(J));r(J);var X=n(J,2),nt=n(a(X));r(X);var Ht=n(X,2);{var ot=s=>{var l=en(),u=a(l);r(l),y(()=>g(u,`R:${e(c).reasoningLevel??""}`)),x(s,l)};w(Ht,s=>{e(c).reasoningLevel&&e(c).reasoningLevel!=="off"&&s(ot)})}r(E);var Se=n(E,2);{var It=s=>{var l=rn(),u=a(l);u.value=u.__value="default";var A=n(u);ne(A,17,()=>e(me),Qt,(M,V)=>{var R=tn(),De=a(R,!0);r(R);var pe={};y(()=>{g(De,e(V).name||e(V).id),pe!==(pe=e(V).id)&&(R.value=(R.__value=e(V).id)??"")}),x(M,R)}),r(l);var T;Sr(l),y(()=>{l.disabled=e(G),T!==(T=e(c).model||"default")&&(l.value=(l.__value=e(c).model||"default")??"",jr(l,e(c).model||"default"))}),k("change",l,M=>Wt(e(c),M.currentTarget.value)),x(s,l)};w(Se,s=>{e(me).length>0&&s(It)})}var je=n(Se,2),st=a(je),Nt=n(st,2);r(je),r(at),r(we),r(te);var Rt=n(te,2);{var Ut=s=>{var l=an(),u=a(l),A=n(a(u),2),T=a(A);K(T),O(),r(A);var M=n(A,2),V=n(M,2);r(u),r(l),Be(T,()=>e(H),R=>f(H,R)),k("click",M,()=>ct(e(c).key)),k("click",V,()=>{f(I,null),f(H,!1)}),x(s,l)};w(Rt,s=>{e(I)===e(c).key&&s(Ut)})}r(B);var p=n(B,2);{var d=s=>{var l=nn();ne(l,21,()=>h().children,u=>u.session.key,(u,A)=>{o(u,()=>e(A),()=>C()+1)}),r(l),y(()=>S(l,1,`ml-6 pl-4 mt-2 space-y-2 border-l-2
|
|
18
|
-
${e($)==="cyan"?"border-accent-cyan/30":e($)==="purple"?"border-accent-purple/30":e($)==="amber"?"border-accent-amber/30":"border-accent-green/30"}`)),x(s,l)};w(p,s=>{e(N)&&e(U)&&s(d)})}r(Q),y(s=>{S(B,1,`rounded-xl border bg-bg-secondary/50 transition-all
|
|
19
|
-
${e(_)==="main"?"border-accent-cyan/25 hover:border-accent-cyan/50":e(_)==="subagent"?"border-accent-purple/25 hover:border-accent-purple/50":e(_)==="cron"||e(_)==="cron-run"?"border-accent-amber/25 hover:border-accent-amber/50":"border-accent-green/25 hover:border-accent-green/50"}`),S(ce,1,`px-2 py-0.5 rounded text-[10px] font-medium
|
|
20
|
-
${e(_)==="main"?"bg-accent-cyan/20 text-accent-cyan border border-accent-cyan/20":e(_)==="subagent"?"bg-accent-purple/20 text-accent-purple border border-accent-purple/20":e(_)==="cron"||e(_)==="cron-run"?"bg-accent-amber/20 text-accent-amber border border-accent-amber/20":"bg-accent-green/20 text-accent-green border border-accent-green/20"}`),g(Qe,e(_)),g(rt,` ${s??""}`),xe(ae,"title",e(c).key),g(W,e(c).key),J.disabled=e(G),S(J,1,`flex items-center gap-1 px-2 py-1 rounded-lg text-[10px] font-medium border transition-all disabled:opacity-50
|
|
21
|
-
${e(c).thinkingLevel==="stream"?"bg-accent-cyan/15 text-accent-cyan border-accent-cyan/30 glow-cyan":e(c).thinkingLevel==="on"?"bg-accent-purple/15 text-accent-purple border-accent-purple/30":"bg-bg-tertiary text-text-muted border-border-default hover:border-accent-cyan/30 hover:text-text-secondary"}`),xe(J,"title",`Thinking: ${e(c).thinkingLevel??"off"??""} (click to cycle)`),g(Vt,` T:${e(c).thinkingLevel??"off"??""}`),X.disabled=e(G),S(X,1,`flex items-center gap-1 px-2 py-1 rounded-lg text-[10px] font-medium border transition-all disabled:opacity-50
|
|
22
|
-
${e(c).verboseLevel==="on"?"bg-accent-green/15 text-accent-green border-accent-green/30":"bg-bg-tertiary text-text-muted border-border-default hover:border-accent-green/30 hover:text-text-secondary"}`),xe(X,"title",`Verbose: ${e(c).verboseLevel??"off"??""} (click to toggle)`),g(nt,` V:${e(c).verboseLevel??"off"??""}`)},[()=>ut(e(c).lastActivityAt??e(c).lastActivity)]),k("click",J,()=>Zt(e(c))),k("click",X,()=>er(e(c))),k("click",st,()=>dt(e(c).key)),k("click",Nt,()=>{f(I,e(I)===e(c).key?null:e(c).key,!0),f(H,!1)}),x(m,Q)};var i=sn();ne(i,21,()=>e(ke),m=>m.session.key,(m,h)=>{o(m,()=>e(h),()=>0)}),r(i),x(t,i)},ca=t=>{var o=ka(),i=Kt(o);{var m=C=>{var c=ln(),_=a(c),v=a(_,!0);r(_),r(c),y(()=>g(v,e(se)?"No sessions match your search.":"No sessions found.")),x(C,c)},h=C=>{var c=Sn();ne(c,23,()=>e(pt),_=>_.key,(_,v,G)=>{const U=D(()=>Vr(e(v))),N=D(()=>e(qr).get(e(v).key)??[]),$=D(()=>le(e(v))),Q=D(()=>e(Ve)===e(v).key);var B=Ln(),te=a(B),we=a(te),ie=a(we),Me=a(ie),Ke=a(Me);{var Ce=p=>{var d=cn(),s=a(d);K(s),Lr(s);var l=n(s,4);r(d),Cr("submit",d,u=>{u.preventDefault(),Xt(e(v).key)}),$e(s,()=>e(P),u=>f(P,u)),k("click",l,Yt),x(p,d)},Ae=p=>{var d=dn(),s=Kt(d),l=a(s,!0);r(s);var u=n(s,2);y(A=>g(l,A),[()=>j.getSessionTitle(e(v))]),k("click",u,()=>Jt(e(v))),x(p,d)};w(Ke,p=>{e(fe)===e(v).key?p(Ce):p(Ae,!1)})}var re=n(Ke,2),jt=a(re,!0);r(re);var Pe=n(re,2);{var ce=p=>{var d=vn(),s=a(d,!0);r(d),y(()=>g(s,e(v).channel)),x(p,d)};w(Pe,p=>{e(v).channel&&p(ce)})}var Qe=n(Pe,2);{var We=p=>{var d=un(),s=a(d,!0);r(d),y(()=>g(s,e(v).agentId)),x(p,d)};w(Qe,p=>{e(v).agentId&&p(We)})}var Dt=n(Qe,2);{var Je=p=>{var d=pn(),s=a(d),l=n(s);r(d),y(u=>{S(s,0,`w-3 h-3 transition-transform ${u??""}`),g(l,` ${e(N).length??""} sub-agent${e(N).length!==1?"s":""}`)},[()=>e(He).has(e(v).key)?"rotate-90":""]),k("click",d,()=>zr(e(v).key)),x(p,d)};w(Dt,p=>{e(ee)==="grouped"&&e(N).length>0&&p(Je)})}r(Me);var Te=n(Me,2),Xe=a(Te);{var $t=p=>{var d=xn(),s=n(a(d));r(d),y(()=>g(s,` ${e(v).model??""}`)),x(p,d)};w(Xe,p=>{e(v).model&&p($t)})}var de=n(Xe,2);{var Ye=p=>{var d=bn(),s=a(d,!0);r(d),y(()=>g(s,e(v).provider)),x(p,d)};w(de,p=>{e(v).provider&&p(Ye)})}var Bt=n(de,2);{var Ze=p=>{var d=gn(),s=n(a(d));r(d),y(l=>g(s,` ${l??""} tokens`),[()=>Oe(e($))]),x(p,d)};w(Bt,p=>{e($)>0&&p(Ze)})}r(Te);var et=n(Te,2);{var Ft=p=>{var d=fn(),s=a(d,!0);r(d),y(()=>g(s,e(v).lastMessage)),x(p,d)};w(et,p=>{e(v).lastMessage&&p(Ft)})}var tt=n(et,2),ve=a(tt),zt=n(a(ve));r(ve);var ue=n(ve,2),Le=a(ue,!0);r(ue),r(tt),r(ie);var rt=n(ie,2),ae=a(rt),W=a(ae),at=n(a(W));r(W);var E=n(W,2),J=n(a(E));r(E);var Vt=n(E,2);{var X=p=>{var d=mn(),s=a(d);r(d),y(()=>g(s,`R:${e(v).reasoningLevel??""}`)),x(p,d)};w(Vt,p=>{e(v).reasoningLevel&&e(v).reasoningLevel!=="off"&&p(X)})}r(ae);var nt=n(ae,2);{var Ht=p=>{var d=yn(),s=a(d);s.value=s.__value="default";var l=n(s);ne(l,17,()=>e(me),Qt,(A,T)=>{var M=hn(),V=a(M,!0);r(M);var R={};y(()=>{g(V,e(T).name||e(T).id),R!==(R=e(T).id)&&(M.value=(M.__value=e(T).id)??"")}),x(A,M)}),r(d);var u;Sr(d),y(()=>{d.disabled=e(Q),u!==(u=e(v).model||"default")&&(d.value=(d.__value=e(v).model||"default")??"",jr(d,e(v).model||"default"))}),k("change",d,A=>Wt(e(v),A.currentTarget.value)),x(p,d)};w(nt,p=>{e(me).length>0&&p(Ht)})}var ot=n(nt,2),Se=a(ot),It=n(Se,2);r(ot),r(rt),r(we),r(te);var je=n(te,2);{var st=p=>{var d=_n(),s=a(d),l=n(a(s),2),u=a(l);K(u),O(),r(l);var A=n(l,2),T=n(A,2);r(s),r(d),Be(u,()=>e(H),M=>f(H,M)),k("click",A,()=>ct(e(v).key)),k("click",T,()=>{f(I,null),f(H,!1)}),x(p,d)};w(je,p=>{e(I)===e(v).key&&p(st)})}var Nt=n(je,2);{var Rt=p=>{var d=Tn(),s=a(d),l=a(s),u=n(a(l));r(l);var A=n(l,2);ne(A,21,()=>e(N),T=>T.key,(T,M)=>{const V=D(()=>Nr(e(M))),R=D(()=>le(e(M)));var De=An(),pe=a(De),Et=a(pe),Ot=a(Et),gr=a(Ot),Gt=n(gr,2),da=a(Gt,!0);r(Gt);var qt=n(Gt,2),va=a(qt,!0);r(qt),r(Ot);var fr=n(Ot,2);{var ua=F=>{var z=kn(),Y=a(z,!0);r(z),y(()=>g(Y,e(M).lastMessage)),x(F,z)};w(fr,F=>{e(M).lastMessage&&F(ua)})}var mr=n(fr,2),hr=a(mr);{var pa=F=>{var z=wn(),Y=a(z,!0);r(z),y(()=>g(Y,e(M).model)),x(F,z)};w(hr,F=>{e(M).model&&F(pa)})}var yr=n(hr,2);{var xa=F=>{var z=Mn(),Y=a(z);r(z),y(lt=>g(Y,`${lt??""} tokens`),[()=>Oe(e(R))]),x(F,z)};w(yr,F=>{e(R)>0&&F(xa)})}var _r=n(yr,2),ba=a(_r,!0);r(_r),r(mr),r(Et);var kr=n(Et,2),wr=a(kr),ga=n(wr,2);r(kr),r(pe);var fa=n(pe,2);{var ma=F=>{var z=Cn(),Y=n(a(z),2),lt=a(Y);K(lt),O(),r(Y);var Mr=n(Y,2),ha=n(Mr,2);r(z),Be(lt,()=>e(H),ya=>f(H,ya)),k("click",Mr,()=>ct(e(M).key)),k("click",ha,()=>{f(I,null),f(H,!1)}),x(F,z)};w(fa,F=>{e(I)===e(M).key&&F(ma)})}r(De),y((F,z)=>{S(gr,1,`w-2 h-2 rounded-full flex-shrink-0
|
|
23
|
-
${e(V)==="active"?"bg-accent-green glow-pulse":e(V)==="done"?"bg-accent-cyan":e(V)==="error"?"bg-accent-pink":"bg-text-muted"}`),g(da,F),S(qt,1,`px-1.5 py-0.5 rounded text-[9px] font-medium
|
|
24
|
-
${e(V)==="active"?"bg-accent-green/15 text-accent-green":e(V)==="done"?"bg-accent-cyan/15 text-accent-cyan":e(V)==="error"?"bg-accent-pink/15 text-accent-pink":"bg-bg-tertiary text-text-muted"}`),g(va,e(V)),g(ba,z)},[()=>e(M).label||Ir(e(M)),()=>ut(e(M).lastActivityAt??e(M).lastActivity)]),k("click",wr,()=>dt(e(M).key)),k("click",ga,()=>{f(I,e(I)===e(M).key?null:e(M).key,!0),f(H,!1)}),x(T,De)}),r(A),r(s),r(d),y(()=>g(u,` Sub-Agents (${e(N).length??""})`)),x(p,d)},Ut=D(()=>e(ee)==="grouped"&&e(He).has(e(v).key)&&e(N).length>0);w(Nt,p=>{e(Ut)&&p(Rt)})}r(B),y(p=>{ja(B,`animation-delay: ${e(G)*30}ms`),S(re,1,`px-2 py-0.5 rounded text-[10px] font-medium
|
|
25
|
-
${e(U)==="main"?"bg-accent-purple/20 text-accent-purple border border-accent-purple/20":e(U)==="subagent"?"bg-accent-amber/20 text-accent-amber border border-accent-amber/20":"bg-accent-cyan/20 text-accent-cyan border border-accent-cyan/20"}`),g(jt,e(U)),g(zt,` ${p??""}`),xe(ue,"title",e(v).key),g(Le,e(v).key),W.disabled=e(Q),S(W,1,`flex items-center gap-1 px-2 py-1 rounded-lg text-[10px] font-medium border transition-all disabled:opacity-50
|
|
26
|
-
${e(v).thinkingLevel==="stream"?"bg-accent-cyan/15 text-accent-cyan border-accent-cyan/30 glow-cyan":e(v).thinkingLevel==="on"?"bg-accent-purple/15 text-accent-purple border-accent-purple/30":"bg-bg-tertiary text-text-muted border-border-default hover:border-accent-cyan/30 hover:text-text-secondary"}`),xe(W,"title",`Thinking: ${e(v).thinkingLevel??"off"??""} (click to cycle)`),g(at,` T:${e(v).thinkingLevel??"off"??""}`),E.disabled=e(Q),S(E,1,`flex items-center gap-1 px-2 py-1 rounded-lg text-[10px] font-medium border transition-all disabled:opacity-50
|
|
27
|
-
${e(v).verboseLevel==="on"?"bg-accent-green/15 text-accent-green border-accent-green/30":"bg-bg-tertiary text-text-muted border-border-default hover:border-accent-green/30 hover:text-text-secondary"}`),xe(E,"title",`Verbose: ${e(v).verboseLevel??"off"??""} (click to toggle)`),g(J,` V:${e(v).verboseLevel??"off"??""}`)},[()=>ut(e(v).lastActivityAt??e(v).lastActivity)]),k("click",W,()=>Zt(e(v))),k("click",E,()=>er(e(v))),k("click",Se,()=>dt(e(v).key)),k("click",It,()=>{f(I,e(I)===e(v).key?null:e(v).key,!0),f(H,!1)}),x(_,B)}),r(c),x(C,c)};w(i,C=>{e(pt).length===0?C(m):C(h,!1)})}x(t,o)};w(aa,t=>{it.state.status!=="connected"?t(na):e(oe)&&j.list.length===0?t(oa,1):e(Z)==="list"&&e(pt).length===0?t(sa,2):e(Z)==="tree"&&e(ke).length===0?t(la,3):e(Z)==="tree"?t(ia,4):t(ca,!1)})}r(br),r(xt),y(t=>{S(ft,1,`flex items-center gap-1.5 px-3 py-1.5 text-sm border rounded-lg transition-all
|
|
28
|
-
${e(ze)?"border-accent-cyan/50 text-accent-cyan bg-accent-cyan/10":"border-border-default text-text-secondary hover:text-accent-cyan hover:border-accent-cyan/30 bg-bg-tertiary"}`),Ge.disabled=e(oe)||it.state.status!=="connected",S(nr,0,`w-4 h-4 ${e(oe)?"animate-spin":""}`),g(Kr,` ${e(oe)?"Loading…":"Refresh"}`),g(Pr,e(_e).total),g(Qr,e(_e).main),g(Wr,e(_e).isolated),g(Jr,e(_e).subagent),g(Xr,t),S(St,1,`px-3 py-2 text-xs transition-all flex items-center gap-1.5
|
|
29
|
-
${e(Z)==="list"?"bg-accent-cyan/10 text-accent-cyan":"bg-bg-tertiary text-text-muted hover:text-text-secondary"}`),S(xr,1,`px-3 py-2 text-xs transition-all flex items-center gap-1.5
|
|
30
|
-
${e(Z)==="tree"?"bg-accent-purple/10 text-accent-purple":"bg-bg-tertiary text-text-muted hover:text-text-secondary"}`)},[()=>Oe(e(_e).totalTokens)]),k("click",ft,()=>f(ze,!e(ze))),k("click",Ge,ye),$e(ur,()=>e(se),t=>f(se,t)),Da(qe,()=>e(ge),t=>f(ge,t)),k("click",St,()=>f(Z,"list")),k("click",xr,()=>f(Z,"tree")),x(Dr,xt),Ca()}_a(["click","change"]);export{En as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as m}from"../chunks/BBXALFLP.js";export{m as component};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { a as WA_WEB_AUTH_DIR, g as webAuthExists, s as logWebSelfId, u as pickWebChannel } from "./accounts-b1Cok6r_.js";
|
|
2
|
-
import "./reply-Bd2hTqt2.js";
|
|
3
|
-
import "./registry-C8pj8ctW.js";
|
|
4
|
-
import "./paths-DJmOcr7Q.js";
|
|
5
|
-
import "./model-selection-BP-yZfgL.js";
|
|
6
|
-
import "./config-gGD5Rkaw.js";
|
|
7
|
-
import "./send-g2G5-BE1.js";
|
|
8
|
-
import "./fs-safe--E2UxVCE.js";
|
|
9
|
-
import "./subsystem-BfLMZ8kW.js";
|
|
10
|
-
import "./agent-scope-Bs92YR2y.js";
|
|
11
|
-
import "./common-xLIrQlvS.js";
|
|
12
|
-
import "./send-NfHYBhul.js";
|
|
13
|
-
import "./chunk-C9J4kyVw.js";
|
|
14
|
-
import "./send-DbftCLdT.js";
|
|
15
|
-
import "./runner-eN6avbf7.js";
|
|
16
|
-
import "./reply-prefix-C4uKnJw5.js";
|
|
17
|
-
import "./tokens-D1LxPszt.js";
|
|
18
|
-
import "./skill-commands-Cle2Lzhm.js";
|
|
19
|
-
import "./skills-BKSekIbi.js";
|
|
20
|
-
import "./redact-DPnDWsnT.js";
|
|
21
|
-
import "./errors-Bv8oZiTO.js";
|
|
22
|
-
import "./ssrf-DxmqkHJJ.js";
|
|
23
|
-
import "./local-roots-BCWc25rb.js";
|
|
24
|
-
import "./chrome-ORXV3sOi.js";
|
|
25
|
-
import "./command-format-BTciq6Gg.js";
|
|
26
|
-
import "./thinking-BOKrkVfN.js";
|
|
27
|
-
import "./normalize-CALo0r3J.js";
|
|
28
|
-
import "./accounts-CRs7kbLB.js";
|
|
29
|
-
import "./accounts-uAqOguyH.js";
|
|
30
|
-
import "./bindings-BiEEaTNG.js";
|
|
31
|
-
import "./plugins-DkDfsqpU.js";
|
|
32
|
-
import "./send-DTQ35K1k.js";
|
|
33
|
-
import "./deliver-DrIvPqH5.js";
|
|
34
|
-
import "./message-channel-C3OrO29D.js";
|
|
35
|
-
import "./pi-embedded-helpers-DjyrCaOR.js";
|
|
36
|
-
import "./github-copilot-token-etmIcdko.js";
|
|
37
|
-
import "./manifest-registry-Lzj-fZNH.js";
|
|
38
|
-
import "./paths-a1ZEI8nz.js";
|
|
39
|
-
import "./diagnostic-oBxO5N68.js";
|
|
40
|
-
import "./store-Cz4sBcdW.js";
|
|
41
|
-
import "./ir-B7KEB-SH.js";
|
|
42
|
-
import "./retry-B8Oq5mgi.js";
|
|
43
|
-
import "./channel-activity-DHI8R5Xg.js";
|
|
44
|
-
import "./fetch-B79-NBmS.js";
|
|
45
|
-
import "./markdown-tables-JToF08xk.js";
|
|
46
|
-
import "./render-DehvxLfa.js";
|
|
47
|
-
import "./tables-gytp5jHK.js";
|
|
48
|
-
import { n as monitorWebInbox, t as monitorWebChannel } from "./channel-web-B06HVGIL.js";
|
|
49
|
-
import "./image-psst3EfB.js";
|
|
50
|
-
import "./pi-model-discovery-3Y4hcIsw.js";
|
|
51
|
-
import "./api-key-rotation-wd2Jnynp.js";
|
|
52
|
-
import "./sqlite-Yn48izJ_.js";
|
|
53
|
-
import "./diagnostic-session-state-BW5KRYN1.js";
|
|
54
|
-
import "./manager-Dv8oeW8Q.js";
|
|
55
|
-
import "./commands-registry-B03cVRjI.js";
|
|
56
|
-
import "./send-CYWWJEcn.js";
|
|
57
|
-
import "./proxy-BwzmpJWq.js";
|
|
58
|
-
import "./resolve-route-D3KbwzED.js";
|
|
59
|
-
import "./replies-D70UX9el.js";
|
|
60
|
-
import "./outbound-attachment-BcrG8SHW.js";
|
|
61
|
-
import { n as sendMessageWhatsApp } from "./outbound-Xv_dXAwT.js";
|
|
62
|
-
import { i as waitForWaConnection, t as createWaSocket } from "./session-BS3El_89.js";
|
|
63
|
-
import { t as loginWeb } from "./login-B3Mf_yyo.js";
|
|
64
|
-
|
|
65
|
-
export { WA_WEB_AUTH_DIR, createWaSocket, logWebSelfId, loginWeb, monitorWebChannel, monitorWebInbox, pickWebChannel, sendMessageWhatsApp, waitForWaConnection, webAuthExists };
|