@mmmbuto/nexuscrew 0.2.0 → 0.2.2
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/README.md +124 -56
- package/bin/nexuscrew.js +79 -152
- package/frontend/dist/assets/{index-8pw4eMB-.js → index-BsldfYnr.js} +1704 -1716
- package/frontend/dist/assets/index-DcQGg3dp.css +1 -0
- package/frontend/dist/index.html +2 -2
- package/lib/server/routes/hosts.js +3 -2
- package/lib/server/routes/launchers.js +12 -0
- package/lib/server/routes/models.js +16 -63
- package/lib/server/routes/runtime.js +10 -0
- package/lib/server/routes/send.js +97 -218
- package/lib/server/routes/sessions.js +7 -39
- package/lib/server/routes/status.js +16 -18
- package/lib/server/routes/tmux.js +88 -0
- package/lib/server/server.js +45 -65
- package/lib/services/engine-discovery.js +192 -445
- package/lib/services/session-store.js +86 -60
- package/lib/services/tmux-manager.js +103 -154
- package/package.json +3 -7
- package/frontend/dist/assets/index-BF0tdvNT.css +0 -1
- package/lib/config/manager.js +0 -362
- package/lib/config/models.js +0 -408
- package/lib/server/db/adapter.js +0 -274
- package/lib/server/db/drivers/sql-js.js +0 -75
- package/lib/server/db/migrate.js +0 -174
- package/lib/server/db/migrations/001_base_schema.sql +0 -70
- package/lib/server/middleware/auth.js +0 -134
- package/lib/server/middleware/rate-limit.js +0 -63
- package/lib/server/models/User.js +0 -128
- package/lib/server/routes/auth.js +0 -168
- package/lib/server/routes/keys.js +0 -15
- package/lib/server/routes/runtimes.js +0 -34
- package/lib/server/routes/speech.js +0 -75
- package/lib/server/routes/upload.js +0 -134
- package/lib/server/routes/wake-lock.js +0 -95
- package/lib/server/routes/workspaces.js +0 -101
- package/lib/server/services/context-bridge.js +0 -425
- package/lib/server/services/runtime-manager.js +0 -462
- package/lib/server/services/summary-generator.js +0 -309
- package/lib/server/services/workspace-manager.js +0 -79
- package/lib/utils/paths.js +0 -107
- package/lib/utils/termux.js +0 -145
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.icon{display:inline-flex;align-items:center;justify-content:center;color:currentColor;flex-shrink:0;vertical-align:middle;transition:all .2s ease}.icon svg{width:100%;height:100%}button .icon{pointer-events:none}.icon-btn:hover .icon,.action-btn:hover .icon,.refresh-btn:hover .icon{transform:scale(1.1)}.bookmark-btn.bookmarked .icon,.bookmark-indicator .icon{fill:currentColor}.status-line{display:flex;flex-direction:column;gap:0;background:var(--bg-secondary);border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color);font-size:.8rem;font-family:Fira Code,Courier New,monospace;transition:all .3s ease}.status-row{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;min-height:1.8rem;border-bottom:1px solid var(--border-color);cursor:pointer}.status-row:last-child{border-bottom:none}.status-row:hover{background:var(--bg-hover)}.status-row.status-directory{background:var(--bg-primary);cursor:default;border-top:1px solid var(--border-color)}.status-row.status-directory:hover{background:var(--bg-primary)}.directory-path{color:var(--accent-primary);font-weight:500;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:text;padding:.2rem .5rem;border-radius:4px;transition:background .2s}.directory-path:hover{background:var(--bg-hover)}.directory-input{flex:1;background:var(--bg-tertiary);border:1px solid var(--accent-primary);border-radius:4px;padding:.2rem .5rem;color:var(--accent-primary);font-size:.8rem;font-family:Fira Code,Courier New,monospace;outline:none}.status-icon{font-size:.9rem;line-height:1;flex-shrink:0;color:var(--text-secondary)}.status-message{color:var(--text-primary);font-weight:400;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-message.status-empty{color:var(--text-muted);font-style:italic}.status-count{color:var(--text-secondary);font-size:.75rem;margin-left:auto;padding-left:.5rem}.status-line.status-expanded{cursor:default;max-height:300px}.status-line.status-expanded:hover{background:var(--bg-secondary)}.status-header{display:flex;justify-content:space-between;align-items:center;padding:.5rem .75rem;background:var(--bg-tertiary);border-bottom:1px solid var(--border-color);cursor:pointer}.status-header:hover{background:var(--bg-hover)}.status-title{color:var(--text-primary);font-weight:600;font-size:.85rem}.status-toggle{color:var(--text-secondary);font-size:.75rem}.status-events-list{max-height:250px;overflow-y:auto;overflow-x:hidden}.status-event{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;border-bottom:1px solid var(--border-color)}.status-event:hover{background:var(--bg-hover)}.status-event:last-child{border-bottom:none}.status-time{color:var(--text-muted);font-size:.7rem;margin-left:auto;padding-left:.5rem;flex-shrink:0}.folder-icon-btn{background:none;border:none;color:var(--text-secondary);cursor:pointer;padding:.2rem;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all .2s;pointer-events:auto;z-index:10;position:relative}.folder-icon-btn:hover{background:var(--bg-hover);color:var(--accent-primary)}.status-line{position:relative}.workspace-dropdown-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:998;background:#0000004d}.workspace-dropdown{position:fixed;bottom:6rem;left:.75rem;right:.75rem;margin-bottom:.5rem;max-width:400px;max-height:300px;overflow-y:auto;background:var(--bg-tertiary);border:1px solid var(--border-hover);border-radius:8px;box-shadow:0 -4px 12px #00000080;z-index:999;animation:slideUpIn .2s ease-out}@keyframes slideUpIn{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}.workspace-item{display:flex;align-items:center;gap:.75rem;width:100%;padding:.75rem 1rem;background:none;border:none;border-bottom:1px solid var(--border-color);color:var(--text-primary);cursor:pointer;text-align:left;transition:background .2s}.workspace-item:last-child{border-bottom:none}.workspace-item:hover{background:var(--bg-hover)}.workspace-item.active{background:var(--accent-glow);border-left:3px solid var(--accent-primary)}.workspace-info{flex:1;min-width:0}.workspace-name{font-size:.9rem;font-weight:500;color:var(--text-primary);margin-bottom:.2rem}.workspace-path{font-size:.75rem;color:var(--text-muted);font-family:Fira Code,Courier New,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workspace-check{color:var(--accent-primary);flex-shrink:0}.workspace-deprecate-btn{padding:.25rem;background:transparent;border:none;color:var(--text-muted);cursor:pointer;opacity:0;transition:opacity .2s,color .2s,transform .1s;flex-shrink:0;margin-left:.5rem;display:flex;align-items:center;justify-content:center;border-radius:4px}.workspace-item:hover .workspace-deprecate-btn{opacity:1}.workspace-deprecate-btn:hover{color:var(--error-color);background:#ff6b6b1a}.workspace-deprecate-btn:active{transform:scale(.9)}.workspace-dropdown::-webkit-scrollbar{width:6px}.workspace-dropdown::-webkit-scrollbar-track{background:var(--scrollbar-track)}.workspace-dropdown::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:3px}.workspace-dropdown::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-hover)}.status-events-list::-webkit-scrollbar{width:6px}.status-events-list::-webkit-scrollbar-track{background:var(--scrollbar-track)}.status-events-list::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:3px}.status-events-list::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-hover)}.status-row:last-child .status-icon{animation:pulse 2s infinite}.tmux-sessions-indicator{display:flex;align-items:center;gap:4px;padding:.2rem .5rem;background:var(--bg-tertiary);border-radius:4px;font-size:.75rem;color:var(--text-secondary);margin-left:auto}.tmux-sessions-indicator:hover{background:var(--bg-hover);color:var(--accent-primary)}@media (max-width: 768px){.status-line{font-size:.75rem}.status-row{padding:.5rem .75rem;min-height:2rem}.status-icon{font-size:.85rem}.directory-path{font-size:.75rem;padding:.3rem .6rem}.directory-input{font-size:16px;padding:.3rem .6rem}.status-message{font-size:.75rem}.status-count{font-size:.7rem}.status-header{padding:.6rem .75rem}.status-line.status-expanded{max-height:250px}.status-events-list{max-height:180px;-webkit-overflow-scrolling:touch}.status-event{padding:.5rem .75rem}.status-time{font-size:.65rem}.folder-icon-btn{min-width:44px;min-height:44px;padding:.5rem}.workspace-dropdown{left:.5rem;right:.5rem;max-height:60vh;-webkit-overflow-scrolling:touch}.workspace-item{min-height:44px;padding:1rem}}.message-actions{display:flex;gap:.5rem;margin-top:.75rem;flex-wrap:wrap}.action-btn{padding:.375rem .75rem;background:transparent;border:1px solid var(--border-color);border-radius:4px;color:var(--text-secondary);font-size:.75rem;cursor:pointer;transition:all .2s;display:flex;align-items:center;gap:.25rem}.action-btn:hover{background:var(--bg-hover);color:var(--text-primary);border-color:var(--accent-primary)}.action-btn:active{transform:scale(.98)}@media (max-width: 768px){.action-btn{padding:.5rem 1rem;font-size:.85rem;flex:1;justify-content:center}}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-keyword,.hljs-formula{color:#c678dd}.hljs-section,.hljs-name,.hljs-selector-tag,.hljs-deletion,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-string,.hljs-regexp,.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string{color:#98c379}.hljs-attr,.hljs-variable,.hljs-template-variable,.hljs-type,.hljs-selector-class,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-number{color:#d19a66}.hljs-symbol,.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-title.class_,.hljs-class .hljs-title{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.44"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.markdown-container{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;line-height:1.6;color:var(--text-primary)}.markdown-empty{color:var(--text-secondary);font-style:italic;padding:10px}.markdown-h1,.markdown-h2,.markdown-h3{margin:16px 0 8px;font-weight:600;color:var(--text-primary)}.markdown-h1{font-size:24px;border-bottom:1px solid var(--border-hover);padding-bottom:8px}.markdown-h2{font-size:20px}.markdown-h3{font-size:16px}.markdown-p{margin:8px 0}.markdown-inline-code{background-color:var(--bg-tertiary);color:var(--text-primary);padding:2px 6px;border-radius:3px;font-family:Courier New,monospace;font-size:12px}.markdown-code-block{background-color:var(--bg-tertiary);color:var(--text-primary);border:1px solid var(--border-color);border-radius:6px;margin:12px 0;overflow-x:auto;padding:0;font-family:Courier New,monospace;font-size:13px;line-height:1.5}.markdown-code-header{background-color:var(--bg-hover);border-bottom:1px solid var(--border-color);padding:6px 12px;display:flex;justify-content:space-between;align-items:center}.markdown-copy-btn{display:flex;align-items:center;gap:4px;padding:4px 8px;background:transparent;border:none;border-radius:4px;color:var(--text-secondary);font-size:12px;cursor:pointer;transition:all .2s ease}.markdown-copy-btn:hover{background:var(--bg-hover);color:var(--text-primary)}.markdown-copy-btn.copied{color:var(--accent-primary)}.markdown-copy-btn .copy-text{font-weight:500}.markdown-code-language{color:var(--text-secondary);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.markdown-code-block code{display:block;padding:12px;overflow-x:auto;margin:0}.markdown-code-block .hljs-string,.markdown-code-block .hljs-attr,.markdown-code-block .hljs-name{color:#98c379}.markdown-code-block .hljs-number,.markdown-code-block .hljs-literal{color:#d19a66}.markdown-code-block .hljs-title,.markdown-code-block .hljs-section,.markdown-code-block .hljs-class{color:#61afef}.markdown-code-block .hljs-keyword,.markdown-code-block .hljs-type{color:#c678dd}.markdown-code-block .hljs-comment{color:#5c6370;font-style:italic}.markdown-image-wrapper{margin:12px 0;text-align:center}.markdown-image{max-width:100%;height:auto;border-radius:6px;border:1px solid var(--border-hover);box-shadow:0 2px 8px #0000004d}.markdown-image-caption{display:block;margin-top:6px;font-size:12px;color:var(--text-secondary);font-style:italic}.markdown-link{color:var(--accent-primary);text-decoration:none;border-bottom:1px dotted var(--accent-primary);transition:color .2s}.markdown-link:hover{color:var(--accent-secondary);border-bottom-style:solid}.markdown-ul,.markdown-ol{margin:12px 0;padding-left:32px}.markdown-li{margin:4px 0}.markdown-table-wrapper{margin:12px 0;overflow-x:auto}.markdown-table{border-collapse:collapse;width:100%;font-size:13px}.markdown-table thead{background-color:var(--bg-tertiary)}.markdown-table th{padding:8px 12px;text-align:left;font-weight:600;color:var(--text-primary);border:1px solid var(--border-color)}.markdown-table td{padding:8px 12px;border:1px solid var(--border-color);color:var(--text-primary)}.markdown-table tbody tr:nth-child(odd){background-color:var(--bg-secondary)}.markdown-table tbody tr:nth-child(2n){background-color:var(--bg-tertiary)}.markdown-table tbody tr:hover{background-color:var(--bg-hover)}.markdown-blockquote{margin:12px 0;border-left:4px solid var(--accent-primary);color:var(--text-secondary);font-style:italic;background-color:var(--bg-secondary);padding:8px 12px 8px 16px}.markdown-container hr{border:none;border-top:1px solid var(--border-color);margin:16px 0}.markdown-container del{color:var(--text-muted);text-decoration:line-through}.markdown-container strong{font-weight:600;color:var(--text-primary)}.markdown-container em{font-style:italic;color:var(--text-secondary)}.markdown-container input[type=checkbox]{margin-right:8px;cursor:pointer}.markdown-container .math{margin:8px 0}.markdown-container .math.math-block{display:block;text-align:center;margin:16px 0}.markdown-container .math-inline{display:inline}@media (prefers-color-scheme: dark){.markdown-container{color:var(--text-primary)}.markdown-image{border-color:var(--border-hover)}}.message{display:flex;flex-direction:row;padding:0;margin-bottom:1.5rem;border-radius:0;box-shadow:none;background:transparent;width:100%;animation:slideIn .2s ease-out}@keyframes slideIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.message-avatar{flex-shrink:0;width:30px;margin-right:1rem;display:flex;flex-direction:column;align-items:center}.avatar-icon{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center}.assistant-icon{background:var(--accent-primary);color:#fff;border:1px solid rgba(255,255,255,.1)}.user-icon{background:var(--bg-hover);color:var(--text-primary)}.message-body{flex:1;min-width:0;display:flex;flex-direction:column}.message-sender{font-weight:600;font-size:.9rem;color:var(--text-primary);margin-bottom:.25rem}.user-message{flex-direction:row-reverse}.user-message .message-avatar{margin-right:0;margin-left:1rem;display:none}.user-message .message-body{align-items:flex-end}.user-message .message-content{background:var(--bg-tertiary);color:var(--text-primary);padding:10px 20px;border-radius:20px 20px 4px;max-width:85%;text-align:left}.assistant-message .message-content{background:transparent;padding:0;max-width:100%;color:var(--text-primary);line-height:1.6}.text-content{font-size:1rem;white-space:pre-wrap}.code-block{background:var(--bg-tertiary);border-radius:8px;padding:1rem;overflow-x:auto;margin:1rem 0;font-family:Fira Code,Consolas,monospace;font-size:.9rem;border:1px solid var(--border-color)}.streaming-indicator{display:inline-flex;align-items:center;gap:6px;margin-top:8px;padding:4px 0}.streaming-indicator .dot{width:8px;height:8px;background:linear-gradient(135deg,var(--accent-primary) 0%,var(--accent-secondary) 100%);border-radius:50%;animation:pulse-dot 1.4s ease-in-out infinite;box-shadow:0 0 8px var(--accent-glow)}.streaming-indicator .dot:nth-child(1){animation-delay:0s}.streaming-indicator .dot:nth-child(2){animation-delay:.15s}.streaming-indicator .dot:nth-child(3){animation-delay:.3s}@keyframes pulse-dot{0%,to{transform:scale(.8);opacity:.4}50%{transform:scale(1.2);opacity:1}}@media (max-width: 768px){.message{margin-bottom:1rem}.message-avatar{width:24px;margin-right:.75rem}.avatar-icon{width:24px;height:24px}.user-message .message-content{max-width:95%;font-size:.95rem}}.model-selector{position:relative;display:inline-flex;align-items:center;gap:.5rem}.model-selector-trigger{display:inline-flex;align-items:center;gap:.5rem;padding:.4rem .75rem;min-width:180px;background:var(--bg-tertiary);border:1px solid var(--border-hover);border-radius:6px;cursor:pointer;transition:all .2s;font-size:.85rem;color:var(--text-primary)}.model-selector-trigger:hover{background:var(--bg-hover);border-color:var(--scrollbar-hover)}.model-icon{flex-shrink:0;color:var(--accent-primary);display:flex;align-items:center}.model-label{color:var(--text-primary);font-weight:500;white-space:nowrap;flex:1;overflow:hidden;text-overflow:ellipsis}.lane-badge{margin-left:auto;padding:.1rem .35rem;border:1px solid var(--border-hover);border-radius:999px;font-size:.65rem;font-family:Fira Code,monospace;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.lane-badge.lane-custom{color:#6c5ce7;border-color:#6c5ce759;background:#6c5ce71a}.lane-badge.lane-native{color:#3fb950;border-color:#3fb95059;background:#3fb9501a}.think-toggle{display:flex;align-items:center;justify-content:center;gap:.4rem;min-width:70px;height:32px;padding:0 .6rem;background:var(--bg-tertiary);border:1px solid var(--border-hover);border-radius:6px;color:var(--text-muted);cursor:pointer;transition:all .2s}.think-toggle:hover{background:var(--bg-hover);border-color:var(--scrollbar-hover);color:var(--text-secondary)}.think-toggle.active{background:var(--accent-glow);border-color:var(--accent-primary);color:var(--accent-primary)}.toggle-label{font-size:.75rem;font-family:Fira Code,monospace;font-weight:500}.reasoning-wrapper{display:flex;align-items:center;gap:.4rem;padding:0 .5rem;height:32px;background:var(--bg-tertiary);border:1px solid var(--border-hover);border-radius:6px;color:var(--accent-primary);transition:all .2s}.reasoning-wrapper:hover{background:var(--bg-hover);border-color:var(--scrollbar-hover)}.reasoning-wrapper:focus-within{border-color:var(--accent-primary)}.reasoning-select{padding:.4rem .2rem;background:transparent;border:none;color:var(--text-primary);font-size:.75rem;font-family:Fira Code,monospace;cursor:pointer;outline:none;transition:all .2s}.reasoning-select option{background:var(--bg-primary);color:var(--text-primary)}.model-dropdown-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:999;background:#0000004d}.model-dropdown{position:absolute;top:100%;left:0;margin-top:.5rem;min-width:380px;max-width:500px;max-height:50vh;background:var(--bg-primary);border:1px solid var(--accent-primary);border-radius:4px;box-shadow:0 0 20px var(--accent-glow);z-index:1000;overflow:hidden;display:flex;flex-direction:column}.dropdown-tabs{display:flex;border-bottom:1px solid var(--border-hover);background:var(--bg-secondary)}.tab{flex:1;padding:.75rem 1rem;background:transparent;border:none;color:var(--text-muted);font-size:.85rem;font-weight:500;cursor:pointer;transition:all .2s;border-bottom:2px solid transparent}.tab:hover{background:var(--bg-hover);color:var(--text-secondary)}.tab.active{color:var(--accent-primary);border-bottom-color:var(--accent-primary);background:var(--bg-tertiary)}.model-search{padding:1rem;border-bottom:1px solid var(--border-hover);position:sticky;top:0;background:var(--bg-primary);z-index:10}.model-search input{width:100%;padding:.6rem 1rem;background:var(--bg-primary);border:1px solid var(--border-hover);border-radius:6px;color:var(--text-primary);font-size:.9rem;outline:none;transition:border-color .2s}.model-search input:focus{border-color:var(--accent-primary)}.model-search input::placeholder{color:var(--text-muted)}.models-content,.hosts-content{overflow-y:auto;flex:1}.model-category{border-bottom:1px solid var(--border-color)}.model-category:last-child{border-bottom:none}.category-header{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;color:var(--text-muted);font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;font-family:Fira Code,Monaco,Courier New,monospace;background:var(--bg-secondary);border-bottom:1px solid var(--border-color)}.category-icon{font-size:1.1rem;color:var(--text-primary)}.category-name{flex:1}.lane-section+.lane-section{border-top:1px solid var(--border-color)}.lane-header{padding:.45rem .75rem .2rem;color:var(--text-muted);font-size:.68rem;text-transform:uppercase;letter-spacing:.08em;font-family:Fira Code,monospace;font-weight:600}.model-list{padding:.25rem .5rem .5rem}.model-item{display:flex;align-items:center;justify-content:space-between;padding:.35rem .75rem;margin:0;border-radius:2px;cursor:pointer;transition:all .15s;font-family:Fira Code,Monaco,Courier New,monospace;line-height:1.4;border-left:3px solid transparent}.model-item:hover{background:var(--bg-hover);border-left-color:var(--accent-primary);padding-left:calc(.75rem - 3px)}.model-item.selected{background:var(--accent-glow);border-left-color:var(--accent-primary);padding-left:calc(.75rem - 3px)}.model-item.disabled{opacity:.5;cursor:not-allowed}.model-item.disabled:hover{background:transparent;border-left-color:transparent;padding-left:.75rem}.model-copy{display:flex;flex-direction:column;gap:.15rem;flex:1}.model-title{color:var(--text-primary);font-size:.8rem;font-weight:500}.model-meta{color:var(--text-muted);font-size:.7rem;display:flex;align-items:center;gap:.5rem}.provider-badge{padding:.1rem .35rem;background:var(--bg-tertiary);border:1px solid var(--border-hover);border-radius:999px;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-secondary)}.checkmark{color:var(--accent-primary);font-size:1rem;margin-left:.5rem;flex-shrink:0}.host-item{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-bottom:1px solid var(--border-color);cursor:pointer;transition:all .2s}.host-item:hover{background:var(--bg-hover)}.host-item.selected{background:var(--accent-glow)}.host-item:last-child{border-bottom:none}.host-info{display:flex;flex-direction:column;gap:.1rem;flex:1}.host-name{color:var(--text-primary);font-weight:500;font-size:.9rem}.host-type{color:var(--text-muted);font-size:.75rem}.no-results{padding:2rem;text-align:center;color:var(--text-muted);font-size:.9rem}.model-dropdown::-webkit-scrollbar,.models-content::-webkit-scrollbar,.hosts-content::-webkit-scrollbar{width:6px}.model-dropdown::-webkit-scrollbar-track,.models-content::-webkit-scrollbar-track,.hosts-content::-webkit-scrollbar-track{background:var(--scrollbar-track)}.model-dropdown::-webkit-scrollbar-thumb,.models-content::-webkit-scrollbar-thumb,.hosts-content::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:3px}.model-dropdown::-webkit-scrollbar-thumb:hover,.models-content::-webkit-scrollbar-thumb:hover,.hosts-content::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-hover)}@media (max-width: 768px){.model-selector{padding:.5rem 1rem}.model-selector-trigger{min-height:44px;padding:.75rem 1rem;min-width:150px}.think-toggle,.reasoning-wrapper{min-height:44px;padding:0 .75rem}.model-dropdown{left:.5rem;right:.5rem;min-width:unset;max-width:unset;max-height:60vh}.model-search input{font-size:16px;padding:.75rem}.model-item{min-height:44px;padding:1rem}.model-item:hover,.model-item.selected{padding-left:1rem}.category-header,.host-item{min-height:44px;padding:1rem}}.tmux-status-bar{display:flex;align-items:center;gap:8px;padding:4px 12px;background:var(--bg-secondary, #1a1a2e);border-bottom:1px solid var(--border, #333);font-size:12px;overflow-x:auto;white-space:nowrap}.tmux-status-label{display:flex;align-items:center;gap:4px;color:var(--text-secondary, #888);flex-shrink:0}.tmux-windows-list{display:flex;gap:4px;overflow-x:auto;flex:1}.tmux-chip{display:flex;align-items:center;gap:4px;padding:2px 6px;border-radius:4px;background:var(--bg-tertiary, #252540);color:var(--text-primary, #e0e0e0);font-size:11px;cursor:pointer;transition:all .2s ease;flex-shrink:0;border:1px solid transparent}.tmux-chip:hover{background:var(--bg-hover, #2a2a4a);border-color:var(--accent, #6c5ce7)}.tmux-chip:active{transform:scale(.98)}.tmux-chip.tmux-chip-active{background:var(--accent, #6c5ce7);color:#fff;box-shadow:0 0 8px #6c5ce766}.tmux-dot{width:6px;height:6px;border-radius:50%;display:inline-block;flex-shrink:0}.tmux-dot-active{background:#4ade80;box-shadow:0 0 4px #4ade8099}.tmux-dot-idle{background:#fbbf24;box-shadow:0 0 4px #fbbf2499}.tmux-dot-dead{background:#f87171;box-shadow:0 0 4px #f8717199}.tmux-window-name{max-width:120px;overflow:hidden;text-overflow:ellipsis;font-weight:500}.tmux-engine-icon{color:var(--text-secondary, #888);flex-shrink:0;opacity:.8}.tmux-chip.tmux-chip-active .tmux-engine-icon{color:#fff;opacity:1}@media (max-width: 768px){.tmux-status-bar{padding:4px 8px;gap:6px}.tmux-chip{padding:3px 6px;font-size:10px;gap:3px}.tmux-window-name{max-width:80px}.tmux-dot{width:5px;height:5px}.tmux-windows-list{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scroll-snap-type:x mandatory}.tmux-chip{scroll-snap-align:start}.tmux-windows-list::-webkit-scrollbar{display:none}.tmux-windows-list{-ms-overflow-style:none;scrollbar-width:none}}@media (max-width: 768px){.tmux-chip{min-height:28px;min-width:44px}}.delete-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background:#0009;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:fadeIn .2s ease-out}.delete-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:1001;width:90%;max-width:420px;background:var(--bg-tertiary);border:1px solid var(--border-hover);border-radius:12px;padding:1.5rem;box-shadow:0 20px 40px #000000b3;animation:scaleIn .2s ease-out}@keyframes scaleIn{0%{opacity:0;transform:translate(-50%,-50%) scale(.95)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}.delete-modal-header{display:flex;align-items:center;gap:.75rem;margin-bottom:1rem}.delete-modal-icon{color:var(--error-color);flex-shrink:0}.delete-modal-title{margin:0;font-size:1.125rem;font-weight:600;color:var(--text-primary)}.delete-modal-message{margin:0 0 1.5rem;color:var(--text-secondary);font-size:.9rem;line-height:1.5}.delete-modal-actions{display:flex;gap:.75rem;justify-content:flex-end}.delete-modal-btn{padding:.625rem 1.25rem;border:none;border-radius:6px;font-size:.9rem;font-weight:500;cursor:pointer;transition:all .2s;display:flex;align-items:center;gap:.5rem}.cancel-btn{background:var(--bg-hover);color:var(--text-primary)}.cancel-btn:hover{background:var(--scrollbar-hover)}.confirm-btn{background:var(--error-color);color:#fff}.confirm-btn:hover{background:var(--error-color)}.confirm-btn:active{transform:scale(.98)}@media (max-width: 768px){.delete-modal{width:85%;padding:1.25rem}.delete-modal-title{font-size:1rem}.delete-modal-message{font-size:.85rem}.delete-modal-btn{padding:.75rem 1rem;font-size:.85rem;min-height:44px}}.sidebar-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;z-index:998;animation:fadeIn .2s ease-out}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.sidebar{position:fixed;left:0;top:0;bottom:0;width:260px;background:var(--bg-secondary);border-right:1px solid var(--border-color);display:flex;flex-direction:column;z-index:999;transform:translate(-100%);transition:transform .3s ease-out;box-shadow:4px 0 8px #0000004d}.sidebar.open{transform:translate(0)}.sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-bottom:1px solid var(--border-color);background:var(--bg-primary)}.sidebar-header h3{margin:0;font-size:1.1rem;font-weight:600;color:var(--text-primary)}.sidebar-close{background:none;border:none;color:var(--text-secondary);cursor:pointer;padding:.25rem;border-radius:4px;transition:background .2s;display:flex;align-items:center;justify-content:center}.sidebar-close:hover{background:var(--bg-hover);color:var(--text-primary)}.new-chat-btn-sidebar{margin:.75rem;padding:.75rem 1rem;background:var(--accent-primary);color:#fff;border:none;border-radius:8px;font-size:.9rem;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:.5rem;transition:background .2s,transform .1s}.new-chat-btn-sidebar:hover{background:var(--accent-secondary);transform:translateY(-1px)}.new-chat-btn-sidebar:active{transform:translateY(0)}.sidebar-workspace{padding:0 .75rem .75rem}.workspace-label{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;background:var(--bg-primary);border-radius:6px;font-size:.85rem;color:var(--text-secondary)}.workspace-label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-search{padding:.5rem .75rem .75rem;display:flex;align-items:center;gap:.5rem;border-bottom:1px solid var(--border-color)}.search-icon{color:var(--text-secondary);flex-shrink:0}.sidebar-search input{flex:1;min-width:0;background:var(--bg-primary);border:1px solid var(--border-hover);border-radius:8px;padding:.6rem .75rem;color:var(--text-primary);font-size:.9rem;outline:none;transition:border-color .2s}.sidebar-search input:focus{border-color:var(--accent-primary)}.sidebar-search input::placeholder{color:var(--text-muted)}.conversation-list{flex:1;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.conversation-list::-webkit-scrollbar{width:6px}.conversation-list::-webkit-scrollbar-track{background:var(--scrollbar-track)}.conversation-list::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:3px}.conversation-list::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-hover)}.session-group{margin-bottom:1rem}.group-title{display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem;color:var(--text-muted);font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.session-group.pinned-group{margin-bottom:1.5rem;padding-bottom:.5rem;border-bottom:2px solid var(--accent-primary);background:linear-gradient(180deg,var(--accent-glow) 0%,transparent 100%)}.pinned-group .group-title{color:var(--accent-primary);font-weight:800;font-size:.75rem;background:var(--accent-glow);padding:.6rem 1rem;border-radius:6px;margin:.5rem .75rem;border:1px solid var(--accent-primary);text-transform:uppercase;letter-spacing:.1em}.pinned-group .group-title .icon{color:var(--accent-primary);animation:pinPulse 2s infinite}@keyframes pinPulse{0%,to{opacity:1;transform:rotate(0)}50%{opacity:.7;transform:rotate(-5deg)}}.session-item{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;margin:.25rem .5rem;border-radius:6px;cursor:pointer;transition:background .2s;position:relative;min-height:44px}.session-item:hover{background:var(--bg-hover)}.session-item:hover .session-actions{opacity:1;transform:scaleX(1)}.session-item.active{background:var(--accent-glow)}.session-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;position:absolute;left:4px;box-shadow:0 0 4px #0000004d;animation:dotPulse 2s infinite}@keyframes dotPulse{0%,to{opacity:1}50%{opacity:.6}}.session-icon{font-size:1rem;color:var(--text-secondary);flex-shrink:0;margin-left:4px}.session-icon.claude{color:#ff6b35}.session-icon.codex{color:#00d26a}.session-icon.gemini{color:#4285f4}.session-icon.qwen{color:#d32f2f}.session-item:hover .session-icon.claude{background:#ff6b351a;border-radius:4px}.session-item:hover .session-icon.codex{background:#00d26a1a;border-radius:4px}.session-item:hover .session-icon.gemini{background:#4285f41a;border-radius:4px}.session-item:hover .session-icon.qwen{background:#d32f2f1a;border-radius:4px}.session-title-wrapper{position:relative;flex:1;min-width:0;overflow:hidden}.session-title{color:var(--text-primary);font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:clip}.fade-gradient{position:absolute;right:0;top:0;bottom:0;width:60px;background:linear-gradient(to left,var(--bg-secondary) 0%,transparent 100%);pointer-events:none;z-index:1}.session-item:hover .fade-gradient{background:linear-gradient(to left,var(--bg-hover) 40%,transparent 100%)}.session-item.active .fade-gradient{background:linear-gradient(to left,var(--accent-glow) 0%,transparent 100%)}.session-title-edit{flex:1;background:var(--bg-primary);border:1px solid var(--accent-primary);border-radius:4px;padding:.25rem .5rem;color:var(--text-primary);font-size:.9rem;outline:none}.session-actions{display:flex;flex-shrink:0;gap:.25rem;opacity:0;transform:scaleX(0);transform-origin:right;transition:all .2s ease-in-out;pointer-events:none;z-index:2}.session-item:hover .session-actions,.session-item:focus-within .session-actions{opacity:1;transform:scaleX(1);pointer-events:auto}.action-btn{background:none;border:none;font-size:.9rem;cursor:pointer;padding:.25rem;border-radius:4px;transition:all .2s;color:var(--text-secondary);display:flex;align-items:center;justify-content:center;min-width:32px;min-height:32px}.action-btn:hover{background:var(--bg-hover);color:var(--text-primary)}.action-btn.danger:hover{background:#f851491a;color:#f85149}.empty-state{padding:2rem 1rem;text-align:center;color:var(--text-muted)}.empty-state p{margin:0;font-size:.9rem}.loading-indicator{display:flex;justify-content:center;align-items:center;padding:2rem}.loading-spinner{width:24px;height:24px;border:2px solid var(--border-hover);border-top-color:var(--accent-primary);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media (min-width: 1024px){.sidebar{width:280px}}@media (max-width: 767px){.sidebar{width:260px}.session-item{padding:1rem;min-height:52px}.action-btn{min-width:44px;min-height:44px;padding:.5rem}.sidebar-search input{font-size:16px;padding:.75rem}.sidebar{padding-bottom:env(safe-area-inset-bottom)}.sidebar-header{padding-top:calc(1rem + env(safe-area-inset-top))}}.attach-menu-container{position:relative;display:inline-block}.attach-btn{background:transparent;border:none;color:var(--text-secondary);cursor:pointer;padding:8px;border-radius:6px;transition:all .2s;display:flex;align-items:center;justify-content:center}.attach-btn:hover{background:var(--bg-hover);color:var(--text-primary)}.attach-dropdown{position:absolute;bottom:calc(100% + 8px);left:0;background:var(--bg-primary);border:1px solid var(--border-color);border-radius:8px;box-shadow:0 4px 12px #00000026;min-width:150px;z-index:1000;overflow:hidden}.attach-option{width:100%;padding:10px 12px;background:transparent;border:none;color:var(--text-primary);cursor:pointer;display:flex;align-items:center;gap:8px;font-size:14px;transition:background .2s;text-align:left}.attach-option:hover{background:var(--bg-hover)}.attach-option:first-child{border-radius:8px 8px 0 0}.attach-option:last-child{border-radius:0 0 8px 8px}.attach-hidden-input{display:none}.chat-container{display:flex;height:100vh;height:100dvh;max-height:100dvh;max-width:100%;margin:0 auto;background:var(--bg-primary);color:var(--text-primary);overflow:hidden;position:relative}.chat-main{display:flex;flex-direction:column;flex:1;min-width:0;height:100%}.chat-header{position:sticky;top:0;z-index:10;display:flex;justify-content:space-between;align-items:center;height:3.5rem;padding:.5rem 1rem;background:var(--bg-secondary);border-bottom:1px solid var(--border-color);gap:.75rem;flex-shrink:0}.hamburger-btn{background:none;border:none;color:var(--text-primary);font-size:1.5rem;cursor:pointer;padding:.5rem;transition:opacity .2s}.hamburger-btn:hover{opacity:.7}.reasoning-selector{background:var(--bg-tertiary);border:1px solid var(--border-hover);border-radius:6px;color:var(--text-primary);padding:.35rem .5rem;font-size:.85rem;cursor:pointer;outline:none;transition:border-color .2s}.reasoning-selector:hover{border-color:var(--scrollbar-hover)}.reasoning-selector:focus{border-color:var(--scrollbar-hover)}.new-chat-btn{background:none;border:none;font-size:1.3rem;cursor:pointer;padding:.5rem;transition:opacity .2s;color:var(--text-primary);margin-left:auto}.new-chat-btn:hover{opacity:.7}.bookmark-btn{background:none;border:none;font-size:1.3rem;cursor:pointer;padding:.5rem;opacity:.4;transition:opacity .2s;color:var(--text-primary)}.bookmark-btn:hover,.bookmark-btn.bookmarked{opacity:1;color:var(--accent-primary)}.messages-container{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:1rem;min-height:0}.messages-container::-webkit-scrollbar{width:8px}.messages-container::-webkit-scrollbar-track{background:var(--scrollbar-track)}.messages-container::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:4px}.messages-container::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-hover)}.load-more-container{display:flex;flex-direction:column;align-items:center;gap:.5rem;margin-bottom:1rem;padding:1rem}.load-more-btn{display:flex;align-items:center;gap:.5rem;padding:.75rem 1.5rem;background:var(--bg-tertiary);border:1px solid var(--border-hover);border-radius:8px;color:var(--text-primary);font-size:.9rem;cursor:pointer;transition:all .2s}.load-more-btn:hover:not(:disabled){background:var(--bg-hover);border-color:var(--scrollbar-hover)}.load-more-btn:disabled{opacity:.5;cursor:not-allowed}.load-more-btn .spinning{animation:spin 1s linear infinite}.message-count{font-size:.85rem;color:var(--text-muted)}.welcome-screen{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-align:center;gap:1.5rem}.terminal-icon{font-size:6rem;color:var(--text-primary);font-weight:300;font-family:Monaco,Courier New,monospace;margin-bottom:1rem}.welcome-screen h2{margin:0;font-size:2rem;font-weight:600;color:var(--text-primary);white-space:pre-line}.welcome-screen p{margin:0;font-size:1.1rem;color:var(--text-secondary);max-width:600px}.input-container{display:flex;flex-direction:column;align-items:stretch;gap:.5rem;padding:.75rem 1rem;padding-bottom:calc(.75rem + env(safe-area-inset-bottom));background:var(--bg-secondary);border-top:1px solid var(--border-color);flex-shrink:0}.input-actions-left,.input-actions-right{display:flex;align-items:center;gap:.5rem}.icon-btn{background:none;border:none;font-size:1.3rem;cursor:pointer;padding:.5rem;border-radius:6px;transition:background .2s;color:var(--text-secondary)}.icon-btn:hover{background:var(--bg-tertiary);color:var(--text-primary)}.microphone-btn{color:var(--text-primary)}.send-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--accent-primary) 0%,var(--accent-secondary) 100%);border:none;border-radius:50%;color:#fff;cursor:pointer;transition:all .3s cubic-bezier(.4,0,.2,1);padding:0;box-shadow:0 2px 8px var(--accent-glow)}.send-btn:hover:not(:disabled){background:linear-gradient(135deg,#34d399 0%,var(--accent-primary) 100%);transform:scale(1.1);box-shadow:0 4px 12px var(--accent-glow)}.send-btn:active:not(:disabled){transform:scale(.95)}.send-btn:disabled{opacity:.3;cursor:not-allowed;box-shadow:none}.stop-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--bg-secondary) 0%,var(--bg-tertiary) 100%);border:2px solid var(--border-hover);border-radius:50%;color:var(--text-primary);cursor:pointer;transition:all .3s cubic-bezier(.4,0,.2,1);padding:0;position:relative;overflow:hidden}.stop-btn:before{content:"";position:absolute;top:-2px;right:-2px;bottom:-2px;left:-2px;border-radius:50%;background:conic-gradient(from 0deg,#ef4444,#f97316,#ef4444);animation:rotate-border 2s linear infinite;z-index:-1}.stop-btn:after{content:"";position:absolute;top:2px;right:2px;bottom:2px;left:2px;border-radius:50%;background:linear-gradient(135deg,var(--bg-secondary) 0%,var(--bg-tertiary) 100%);z-index:-1}@keyframes rotate-border{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.stop-btn:hover{background:linear-gradient(135deg,var(--bg-tertiary) 0%,var(--bg-hover) 100%);transform:scale(1.1);border-color:var(--error-color)}.stop-btn:active{transform:scale(.95)}.message-textarea{flex:1;min-height:24px;max-height:200px;padding:.75rem 1rem;background:var(--bg-tertiary);border:1px solid var(--border-hover);border-radius:8px;color:var(--text-primary);font-size:.95rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;resize:none;outline:none;transition:border-color .2s;overflow-y:auto}.message-textarea:focus{border-color:var(--scrollbar-hover)}.message-textarea:disabled{opacity:.5;cursor:not-allowed}.message-textarea::placeholder{color:var(--text-muted)}.message-textarea::-webkit-scrollbar{width:6px}.message-textarea::-webkit-scrollbar-track{background:var(--bg-tertiary)}.message-textarea::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:3px}.sidebar{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000}.sidebar-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:#00000080}.sidebar-content{position:absolute;left:0;top:0;bottom:0;width:280px;background:var(--bg-secondary);border-right:1px solid var(--border-color);padding:1.5rem;box-shadow:4px 0 8px #0000004d;animation:slideIn .2s ease-out}@keyframes slideIn{0%{transform:translate(-100%)}to{transform:translate(0)}}.sidebar-content h3{margin:0 0 1.5rem;color:var(--text-primary);font-size:1.2rem}.sidebar-logout-btn{width:100%;padding:.75rem 1rem;background:#ef44441a;border:1px solid rgba(239,68,68,.3);border-radius:6px;color:var(--error-color);font-size:.95rem;font-weight:600;cursor:pointer;transition:all .2s}.sidebar-logout-btn:hover{background:#ef444433;border-color:#ef444480}@media (min-width: 1024px){.hamburger-btn{display:flex}}@media (max-width: 768px){.chat-header{padding:.75rem 1rem;gap:.75rem}.hamburger-btn,.new-chat-btn,.bookmark-btn{min-width:44px;min-height:44px;padding:.75rem}.messages-container{padding:.75rem}.terminal-icon{font-size:3rem}.welcome-screen h2{font-size:1.3rem}.welcome-screen p{font-size:.9rem}.icon-btn,.scroll-btn{min-width:44px;min-height:44px;padding:.75rem}.input-container{padding:.75rem;gap:.5rem}.message-textarea{font-size:16px;padding:.75rem}.input-actions-left,.input-actions-right{gap:.25rem}}.attached-files-preview{display:flex;flex-wrap:wrap;gap:.5rem;padding:.5rem 1rem;background:var(--bg-tertiary);border-radius:8px 8px 0 0;margin-bottom:-4px;width:100%}.attached-file-item{display:flex;align-items:center;gap:.5rem;padding:.375rem .75rem;background:var(--bg-hover);border-radius:6px;font-size:.85rem;color:var(--text-secondary)}.attached-file-item .file-name{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.remove-file-btn{background:none;border:none;color:var(--text-secondary);cursor:pointer;padding:.125rem;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:all .2s}.remove-file-btn:hover{background:var(--bg-hover);color:var(--error-color)}.attached-files-chips{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.5rem}.file-chip{display:flex;align-items:center;gap:.5rem;padding:.375rem .75rem;background:var(--bg-tertiary);border:1px solid var(--border-color);border-radius:20px;font-size:.85rem;color:var(--text-primary)}.file-chip-name{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-chip-remove{background:none;border:none;color:var(--text-secondary);cursor:pointer;padding:.125rem;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:all .2s}.file-chip-remove:hover{background:var(--bg-hover);color:var(--error-color)}.input-row{display:flex;align-items:flex-end;gap:.5rem;width:100%}.microphone-btn.listening,.mic-btn.listening{color:var(--error-color);animation:pulse 1s infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.input-container{background:linear-gradient(180deg,var(--bg-tertiary) 0%,var(--bg-secondary) 100%)!important;border:1px solid var(--border-color)!important;border-radius:24px!important;width:85%!important;max-width:720px!important;margin:0 auto 1rem!important;box-shadow:0 0 0 1px #ffffff0d,0 2px 12px #0000004d,inset 0 1px #ffffff0d;padding:.5rem .75rem!important;transition:all .3s ease}.input-container:focus-within{border-color:var(--accent-glow)!important;box-shadow:0 0 0 1px var(--accent-glow),0 2px 16px #0006,inset 0 1px #ffffff0d}.message-textarea{background:transparent!important;border:none!important;padding:.5rem!important}.message-textarea:focus{border-color:transparent!important;outline:none}@media (max-width: 768px){.input-container{width:100%!important;max-width:100%!important;margin-bottom:0!important;border-radius:0!important;border-left:none!important;border-right:none!important;border-bottom:none!important;padding-bottom:calc(.75rem + env(safe-area-inset-bottom))!important}}.login-container{display:flex;align-items:center;justify-content:center;min-height:100vh;background:var(--bg-primary)}.login-box{width:100%;max-width:400px;padding:2rem;background:var(--bg-tertiary);border:1px solid var(--border-hover);border-radius:8px}.login-header{text-align:center;margin-bottom:2rem}.login-header h1{margin:0 0 .5rem;font-size:2rem;font-weight:600;color:var(--accent-primary)}.login-header p{margin:0;font-size:.9rem;color:var(--text-secondary);font-family:Monaco,Courier New,monospace}.login-form{display:flex;flex-direction:column;gap:1.5rem}.login-error{padding:.75rem;background:#ef44441a;border:1px solid rgba(239,68,68,.3);border-radius:4px;color:var(--error-color);font-size:.9rem}.form-group{display:flex;flex-direction:column;gap:.5rem}.form-group label{font-size:.9rem;font-weight:500;color:var(--text-primary)}.form-group input{padding:.75rem;background:var(--bg-primary);border:1px solid var(--border-hover);border-radius:4px;color:var(--text-primary);font-size:1rem;transition:border-color .2s}.form-group input:focus{outline:none;border-color:var(--accent-primary)}.form-group input:disabled{opacity:.5;cursor:not-allowed}.form-group input::placeholder{color:var(--text-muted)}.login-form button{padding:.75rem;background:linear-gradient(135deg,var(--accent-primary) 0%,var(--accent-secondary) 100%);color:#fff;border:none;border-radius:4px;font-size:1rem;font-weight:600;cursor:pointer;transition:opacity .2s,transform .1s}.login-form button:hover:not(:disabled){opacity:.9;transform:translateY(-1px)}.login-form button:active:not(:disabled){transform:translateY(0)}.login-form button:disabled{opacity:.5;cursor:not-allowed}.App{height:100vh;width:100vw;overflow:hidden}:root{--bg-primary: #0d1117;--bg-secondary: #161b22;--bg-tertiary: #21262d;--bg-hover: #30363d;--text-primary: #e6edf3;--text-secondary: #8b949e;--text-tertiary: #6e7681;--border: #30363d;--accent: #6c5ce7;--accent-hover: #7c6cf7;--success: #3fb950;--warning: #d29922;--error: #f85149;--user-bg: #1c2333;--assistant-bg: transparent;--font-mono: "SF Mono", monospace;--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif}.light-theme{--bg-primary: #ffffff;--bg-secondary: #f5f5f5;--bg-tertiary: #e8e8e8;--bg-hover: #d0d0d0;--text-primary: #1a1a1a;--text-secondary: #555555;--text-tertiary: #888888;--border: #d0d0d0;--border-hover: #bbbbbb;--accent: #6c5ce7;--accent-hover: #5a4bd6;--user-bg: #e8e8e8;--assistant-bg: transparent}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%;width:100%;overflow:hidden}body{font-family:var(--font-sans);background:var(--bg-primary);color:var(--text-primary);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;overscroll-behavior:none}@media (max-width: 768px){button,a,[role=button],input[type=checkbox],input[type=radio]{min-height:44px;min-width:44px}textarea,input[type=text],input[type=search]{font-size:16px}}.input-container,.chat-input-area,.status-bar-bottom{padding-bottom:env(safe-area-inset-bottom,0px)}.sidebar-header,.top-bar{padding-top:env(safe-area-inset-top,0px);padding-left:env(safe-area-inset-left,0px)}button,a,[role=button]{touch-action:manipulation}.messages-container,.sidebar-content{-webkit-overflow-scrolling:touch;scroll-behavior:smooth}.sidebar,.status-bar,.model-selector,.user-menu{-webkit-user-select:none;user-select:none}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--bg-tertiary);border-radius:3px}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.spinning{animation:spin 1s linear infinite}
|
package/lib/config/manager.js
DELETED
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration Manager
|
|
3
|
-
* Handles reading/writing ~/.nexuscrew/config.json
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
const path = require('path');
|
|
8
|
-
const { PATHS, ensureDirectories } = require('../utils/paths');
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Default configuration
|
|
12
|
-
*/
|
|
13
|
-
const DEFAULT_CONFIG = {
|
|
14
|
-
version: 2,
|
|
15
|
-
server: {
|
|
16
|
-
port: 41820,
|
|
17
|
-
host: '0.0.0.0'
|
|
18
|
-
},
|
|
19
|
-
auth: {
|
|
20
|
-
jwt_secret: null, // Generated on init
|
|
21
|
-
user: 'admin',
|
|
22
|
-
pass_hash: null // Generated on init
|
|
23
|
-
},
|
|
24
|
-
tmuxSession: 'nexuscrew',
|
|
25
|
-
logDir: path.join(process.env.HOME || '', '.nexuscrew', 'logs'),
|
|
26
|
-
providersPath: '',
|
|
27
|
-
engines: {
|
|
28
|
-
active: ['claude'],
|
|
29
|
-
check_on_boot: false,
|
|
30
|
-
claude: {
|
|
31
|
-
enabled: true,
|
|
32
|
-
path: 'auto',
|
|
33
|
-
model: 'sonnet',
|
|
34
|
-
lanes: {
|
|
35
|
-
native: {
|
|
36
|
-
runtimeId: 'claude-native',
|
|
37
|
-
command: 'claude',
|
|
38
|
-
enabled: true
|
|
39
|
-
},
|
|
40
|
-
custom: {
|
|
41
|
-
runtimeId: 'claude-custom',
|
|
42
|
-
command: 'claude',
|
|
43
|
-
enabled: true
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
codex: {
|
|
48
|
-
enabled: false,
|
|
49
|
-
path: null,
|
|
50
|
-
model: 'gpt-5.3-codex',
|
|
51
|
-
lanes: {
|
|
52
|
-
native: {
|
|
53
|
-
runtimeId: 'codex-native',
|
|
54
|
-
command: 'codex',
|
|
55
|
-
enabled: true
|
|
56
|
-
},
|
|
57
|
-
custom: {
|
|
58
|
-
runtimeId: 'codex-custom',
|
|
59
|
-
command: 'codex-lts',
|
|
60
|
-
enabled: true
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
gemini: {
|
|
65
|
-
enabled: false,
|
|
66
|
-
path: null,
|
|
67
|
-
model: 'gemini-3-pro-preview',
|
|
68
|
-
lanes: {
|
|
69
|
-
native: {
|
|
70
|
-
runtimeId: 'gemini-native',
|
|
71
|
-
command: 'gemini',
|
|
72
|
-
enabled: true
|
|
73
|
-
},
|
|
74
|
-
custom: {
|
|
75
|
-
runtimeId: 'gemini-custom',
|
|
76
|
-
command: 'gemini',
|
|
77
|
-
enabled: false
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
qwen: {
|
|
82
|
-
enabled: false,
|
|
83
|
-
path: null,
|
|
84
|
-
model: 'qwen3-coder-plus',
|
|
85
|
-
lanes: {
|
|
86
|
-
native: {
|
|
87
|
-
runtimeId: 'qwen-native',
|
|
88
|
-
command: 'qwen',
|
|
89
|
-
enabled: true
|
|
90
|
-
},
|
|
91
|
-
custom: {
|
|
92
|
-
runtimeId: 'qwen-custom',
|
|
93
|
-
command: 'qwen',
|
|
94
|
-
enabled: false
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
runtimes: {
|
|
100
|
-
preferredInstallMethod: 'npm',
|
|
101
|
-
customProviders: {}
|
|
102
|
-
},
|
|
103
|
-
workspaces: {
|
|
104
|
-
default: null,
|
|
105
|
-
paths: []
|
|
106
|
-
},
|
|
107
|
-
termux: {
|
|
108
|
-
wake_lock: true,
|
|
109
|
-
notifications: true,
|
|
110
|
-
boot_start: false
|
|
111
|
-
},
|
|
112
|
-
preferences: {
|
|
113
|
-
defaultModel: null
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
function isPlainObject(value) {
|
|
118
|
-
return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function deepMergeDefaults(defaults, current) {
|
|
122
|
-
if (Array.isArray(defaults)) {
|
|
123
|
-
return Array.isArray(current) ? current : [...defaults];
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (!isPlainObject(defaults)) {
|
|
127
|
-
return current === undefined ? defaults : current;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
const merged = {};
|
|
131
|
-
const keys = new Set([
|
|
132
|
-
...Object.keys(defaults),
|
|
133
|
-
...Object.keys(isPlainObject(current) ? current : {})
|
|
134
|
-
]);
|
|
135
|
-
|
|
136
|
-
for (const key of keys) {
|
|
137
|
-
const defaultValue = defaults[key];
|
|
138
|
-
const currentValue = isPlainObject(current) ? current[key] : undefined;
|
|
139
|
-
|
|
140
|
-
if (defaultValue === undefined) {
|
|
141
|
-
merged[key] = currentValue;
|
|
142
|
-
continue;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
merged[key] = deepMergeDefaults(defaultValue, currentValue);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
return merged;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function normalizeConfig(config) {
|
|
152
|
-
const merged = deepMergeDefaults(DEFAULT_CONFIG, config || {});
|
|
153
|
-
merged.version = DEFAULT_CONFIG.version;
|
|
154
|
-
|
|
155
|
-
if (!Array.isArray(merged.engines.active) || merged.engines.active.length === 0) {
|
|
156
|
-
merged.engines.active = ['claude'];
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
return merged;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Load configuration from file
|
|
164
|
-
*/
|
|
165
|
-
function loadConfig() {
|
|
166
|
-
ensureDirectories();
|
|
167
|
-
|
|
168
|
-
if (!fs.existsSync(PATHS.CONFIG_FILE)) {
|
|
169
|
-
return null;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
try {
|
|
173
|
-
const content = fs.readFileSync(PATHS.CONFIG_FILE, 'utf8');
|
|
174
|
-
return normalizeConfig(JSON.parse(content));
|
|
175
|
-
} catch (error) {
|
|
176
|
-
console.error('Error loading config:', error.message);
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Save configuration to file
|
|
183
|
-
*/
|
|
184
|
-
function saveConfig(config) {
|
|
185
|
-
ensureDirectories();
|
|
186
|
-
|
|
187
|
-
try {
|
|
188
|
-
fs.writeFileSync(
|
|
189
|
-
PATHS.CONFIG_FILE,
|
|
190
|
-
JSON.stringify(config, null, 2),
|
|
191
|
-
'utf8'
|
|
192
|
-
);
|
|
193
|
-
return true;
|
|
194
|
-
} catch (error) {
|
|
195
|
-
console.error('Error saving config:', error.message);
|
|
196
|
-
return false;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Get configuration (load or create default)
|
|
202
|
-
*/
|
|
203
|
-
function getConfig() {
|
|
204
|
-
const config = loadConfig();
|
|
205
|
-
if (config) {
|
|
206
|
-
return config;
|
|
207
|
-
}
|
|
208
|
-
return normalizeConfig(DEFAULT_CONFIG);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Check if NexusCrew is initialized
|
|
213
|
-
*/
|
|
214
|
-
function isInitialized() {
|
|
215
|
-
return fs.existsSync(PATHS.CONFIG_FILE);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Get a config value by dot-notation path
|
|
220
|
-
*/
|
|
221
|
-
function getConfigValue(key) {
|
|
222
|
-
const config = getConfig();
|
|
223
|
-
const parts = key.split('.');
|
|
224
|
-
let value = config;
|
|
225
|
-
|
|
226
|
-
for (const part of parts) {
|
|
227
|
-
if (value === undefined || value === null) {
|
|
228
|
-
return undefined;
|
|
229
|
-
}
|
|
230
|
-
value = value[part];
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
return value;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Set a config value by dot-notation path
|
|
238
|
-
*/
|
|
239
|
-
function setConfigValue(key, value) {
|
|
240
|
-
const config = getConfig();
|
|
241
|
-
const parts = key.split('.');
|
|
242
|
-
let current = config;
|
|
243
|
-
|
|
244
|
-
for (let i = 0; i < parts.length - 1; i++) {
|
|
245
|
-
const part = parts[i];
|
|
246
|
-
if (current[part] === undefined) {
|
|
247
|
-
current[part] = {};
|
|
248
|
-
}
|
|
249
|
-
current = current[part];
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
let parsedValue = value;
|
|
253
|
-
if (value === 'true') parsedValue = true;
|
|
254
|
-
else if (value === 'false') parsedValue = false;
|
|
255
|
-
else if (!isNaN(value) && value !== '') parsedValue = Number(value);
|
|
256
|
-
|
|
257
|
-
current[parts[parts.length - 1]] = parsedValue;
|
|
258
|
-
|
|
259
|
-
return saveConfig(config);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Get all config keys as flat list
|
|
264
|
-
*/
|
|
265
|
-
function getConfigKeys(obj = null, prefix = '') {
|
|
266
|
-
if (!obj) {
|
|
267
|
-
obj = getConfig();
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
const keys = [];
|
|
271
|
-
|
|
272
|
-
for (const key of Object.keys(obj)) {
|
|
273
|
-
const fullKey = prefix ? `${prefix}.${key}` : key;
|
|
274
|
-
|
|
275
|
-
if (typeof obj[key] === 'object' && obj[key] !== null && !Array.isArray(obj[key])) {
|
|
276
|
-
keys.push(...getConfigKeys(obj[key], fullKey));
|
|
277
|
-
} else {
|
|
278
|
-
keys.push(fullKey);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
return keys;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* Initialize config with generated secrets
|
|
287
|
-
* IMPORTANT: Creates ~/.nexuscrew/config.json and ~/.nexuscrew/hosts.json
|
|
288
|
-
* Does NOT create database user - that's handled by server.js seed
|
|
289
|
-
*/
|
|
290
|
-
function initializeConfig(options = {}) {
|
|
291
|
-
const { v4: uuidv4 } = require('uuid');
|
|
292
|
-
const bcrypt = require('bcryptjs');
|
|
293
|
-
|
|
294
|
-
const config = normalizeConfig(DEFAULT_CONFIG);
|
|
295
|
-
|
|
296
|
-
// Generate JWT secret
|
|
297
|
-
config.auth.jwt_secret = uuidv4() + '-' + uuidv4();
|
|
298
|
-
|
|
299
|
-
// Set user credentials
|
|
300
|
-
const username = options.username || 'admin';
|
|
301
|
-
const password = options.password || 'admin';
|
|
302
|
-
|
|
303
|
-
config.auth.user = username;
|
|
304
|
-
config.auth.pass_hash = bcrypt.hashSync(password, 10);
|
|
305
|
-
|
|
306
|
-
// Set workspaces
|
|
307
|
-
if (options.workspaces) {
|
|
308
|
-
config.workspaces.paths = options.workspaces;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
// Set default workspace
|
|
312
|
-
if (options.defaultWorkspace) {
|
|
313
|
-
config.workspaces.default = options.defaultWorkspace;
|
|
314
|
-
} else if (options.workspaces && options.workspaces.length > 0) {
|
|
315
|
-
config.workspaces.default = options.workspaces[0];
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
// Set port
|
|
319
|
-
if (options.port) {
|
|
320
|
-
config.server.port = options.port;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
// Termux options
|
|
324
|
-
if (options.wakeLock !== undefined) {
|
|
325
|
-
config.termux.wake_lock = options.wakeLock;
|
|
326
|
-
}
|
|
327
|
-
if (options.notifications !== undefined) {
|
|
328
|
-
config.termux.notifications = options.notifications;
|
|
329
|
-
}
|
|
330
|
-
if (options.bootStart !== undefined) {
|
|
331
|
-
config.termux.boot_start = options.bootStart;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
// Save config
|
|
335
|
-
if (!saveConfig(config)) {
|
|
336
|
-
return null;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
// Create default hosts.json
|
|
340
|
-
const hostsPath = path.join(process.env.HOME, '.nexuscrew', 'hosts.json');
|
|
341
|
-
const defaultHosts = [{ name: 'local', type: 'local', default: true }];
|
|
342
|
-
try {
|
|
343
|
-
fs.writeFileSync(hostsPath, JSON.stringify(defaultHosts, null, 2), 'utf8');
|
|
344
|
-
} catch (error) {
|
|
345
|
-
console.error('Error creating hosts.json:', error.message);
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
return config;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
module.exports = {
|
|
352
|
-
DEFAULT_CONFIG,
|
|
353
|
-
normalizeConfig,
|
|
354
|
-
loadConfig,
|
|
355
|
-
saveConfig,
|
|
356
|
-
getConfig,
|
|
357
|
-
isInitialized,
|
|
358
|
-
getConfigValue,
|
|
359
|
-
setConfigValue,
|
|
360
|
-
getConfigKeys,
|
|
361
|
-
initializeConfig
|
|
362
|
-
};
|