titan-agent 6.4.0 → 6.4.3
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/utils/constants.js +1 -1
- package/dist/utils/constants.js.map +1 -1
- package/package.json +10 -2
- package/ui/dist/assets/AuditPanel-BOIeotPE.js +1 -0
- package/ui/dist/assets/{AutonomyPanel-E6arcbAb.js → AutonomyPanel-Dv8ClpL9.js} +1 -1
- package/ui/dist/assets/{AutopilotPanel-AhNEPP_2.js → AutopilotPanel-Dv3-_6fZ.js} +1 -1
- package/ui/dist/assets/AutoresearchPanel-DdLmfGpC.js +6 -0
- package/ui/dist/assets/{BackupPanel-CGQAxeWf.js → BackupPanel-DYr6APwV.js} +1 -1
- package/ui/dist/assets/{BrowserPanel-BylOyNpQ.js → BrowserPanel-DMZf6mNn.js} +2 -2
- package/ui/dist/assets/{CPActivity-7zS0dXGf.js → CPActivity-B2kmaYR9.js} +1 -1
- package/ui/dist/assets/{CPAgentDetail-DUi0ygHI.js → CPAgentDetail--ploJZFv.js} +1 -1
- package/ui/dist/assets/{CPAgents-BZYynbga.js → CPAgents-ctC99jCR.js} +1 -1
- package/ui/dist/assets/{CPApprovals-CwNTmqzq.js → CPApprovals-BZHaJ6d_.js} +1 -1
- package/ui/dist/assets/{CPCosts-5hylxGvH.js → CPCosts--xJmtfEi.js} +1 -1
- package/ui/dist/assets/{CPDashboard-5f8qcBKy.js → CPDashboard-rThYnRLi.js} +1 -1
- package/ui/dist/assets/CPFiles-IRzbOaxo.js +1 -0
- package/ui/dist/assets/{CPGoals-CVSxXk1i.js → CPGoals-BQ4Kasli.js} +1 -1
- package/ui/dist/assets/{CPInbox-DD4RYSpf.js → CPInbox-DYvoAJdg.js} +1 -1
- package/ui/dist/assets/{CPIssueDetail-Dpuc_wTi.js → CPIssueDetail-D4JUVm7B.js} +1 -1
- package/ui/dist/assets/{CPIssues-DsPZLTGm.js → CPIssues-C_K0zuiB.js} +1 -1
- package/ui/dist/assets/CPLayout-B3Lr8puc.js +2 -0
- package/ui/dist/assets/{CPOrg-C121ZFWy.js → CPOrg-CAKwV8Kr.js} +1 -1
- package/ui/dist/assets/{CPRuns-BUdKn-uk.js → CPRuns-COUYpSBB.js} +1 -1
- package/ui/dist/assets/{CPSocial-CriG1P45.js → CPSocial-BCTgcO3V.js} +1 -1
- package/ui/dist/assets/{CPVoice-BNhgXUE1.js → CPVoice-D-wxXUGf.js} +1 -1
- package/ui/dist/assets/{ChannelsPanel-9SjAkSHg.js → ChannelsPanel-Cx3dxaP9.js} +1 -1
- package/ui/dist/assets/{CheckpointsPanel-D2sCPz2u.js → CheckpointsPanel-D2ATiPXs.js} +1 -1
- package/ui/dist/assets/{CommandPostHub-DHTVn2_E.js → CommandPostHub-DTs1EGm8.js} +4 -4
- package/ui/dist/assets/{CronPanel-CLQ0_Z_9.js → CronPanel-D0j9zDVW.js} +1 -1
- package/ui/dist/assets/{DataTable-CrBYCT2O.js → DataTable-CgeOprjv.js} +1 -1
- package/ui/dist/assets/{DreamPanel-BAkiDqQc.js → DreamPanel-CJAI6Aka.js} +3 -3
- package/ui/dist/assets/{EmptyState-DSuZC-Tg.js → EmptyState-NMpt-ODJ.js} +1 -1
- package/ui/dist/assets/{EvalHarnessPanel-BykaelQd.js → EvalHarnessPanel-ZPXlKHaK.js} +2 -2
- package/ui/dist/assets/{EvalPanel-BlFByCOv.js → EvalPanel-DpmEQQXh.js} +1 -1
- package/ui/dist/assets/{FileViewer-B0WedL9k.js → FileViewer-B7Mm4cJL.js} +1 -1
- package/ui/dist/assets/{FilesPanel-DwUzP4Hv.js → FilesPanel-CvrGQwh3.js} +2 -2
- package/ui/dist/assets/{FleetPanel-JW9Pk1FM.js → FleetPanel-BDf9E7dQ.js} +1 -1
- package/ui/dist/assets/{HomelabPanel-DigWCjaM.js → HomelabPanel-CKGR1kGN.js} +1 -1
- package/ui/dist/assets/InfraView-CreCQSNl.js +2 -0
- package/ui/dist/assets/{InlineEditableField-Car7F635.js → InlineEditableField-JxqorUFO.js} +1 -1
- package/ui/dist/assets/{Input-BGGQDAyP.js → Input-rfmX8eLw.js} +1 -1
- package/ui/dist/assets/IntegrationsPanel-Ds5KCGUi.js +1 -0
- package/ui/dist/assets/IntelligenceView-YcrYQTVO.js +2 -0
- package/ui/dist/assets/{LearningPanel-CGENRFnq.js → LearningPanel-CZUd4UsW.js} +1 -1
- package/ui/dist/assets/LogsPanel-CmUBA-jG.js +1 -0
- package/ui/dist/assets/McpPanel-CVyjQ6H6.js +1 -0
- package/ui/dist/assets/{MemoryGraphPanel-FQxiv5x5.js → MemoryGraphPanel-BK-AbsbF.js} +1 -1
- package/ui/dist/assets/{MemoryWikiPanel-C1w7xDNl.js → MemoryWikiPanel-DkfHLaje.js} +1 -1
- package/ui/dist/assets/MeshPanel-BCDzhBRO.js +11 -0
- package/ui/dist/assets/{MissionCanvas-BvbSfN_4.js → MissionCanvas-GvSYEkjz.js} +1 -1
- package/ui/dist/assets/{MissionChat-Do8j0nvp.js → MissionChat-DpyGbBhk.js} +1 -1
- package/ui/dist/assets/{MissionLibrary-CTzkJFJ7.js → MissionLibrary-Dwn2vP2g.js} +1 -1
- package/ui/dist/assets/{MissionStart-_-qlVcRK.js → MissionStart-DIYEotqX.js} +1 -1
- package/ui/dist/assets/{Modal-CNnSfYJm.js → Modal-BFii_RIq.js} +1 -1
- package/ui/dist/assets/NvidiaPanel-BCmLv4bY.js +1 -0
- package/ui/dist/assets/{OrganismPanel-DBy9J7Vl.js → OrganismPanel-CDMC8-yf.js} +1 -1
- package/ui/dist/assets/{OverviewPanel-B7JFNH2w.js → OverviewPanel-C9ErRTB1.js} +1 -1
- package/ui/dist/assets/{PageHeader-CwcMp_4A.js → PageHeader-CawSrb9E.js} +1 -1
- package/ui/dist/assets/{PersonaProfilesPanel-CmZhQC8H.js → PersonaProfilesPanel-B_hx3sLQ.js} +1 -1
- package/ui/dist/assets/{PersonasPanel-DSP0tTKz.js → PersonasPanel-BhfAKQWd.js} +1 -1
- package/ui/dist/assets/{PhoneDeskPanel-DZSs7aPr.js → PhoneDeskPanel-Cew4jv5F.js} +1 -1
- package/ui/dist/assets/{RecipesPanel-BW0hW2sW.js → RecipesPanel-KSNQil0R.js} +1 -1
- package/ui/dist/assets/{SecurityPanel-_Saqrvw7.js → SecurityPanel-ojbdvuZR.js} +1 -1
- package/ui/dist/assets/SelfImprovePanel-D743Dh0z.js +1 -0
- package/ui/dist/assets/{SelfProposalsPanel-D24kB0uM.js → SelfProposalsPanel-DHPrgGsJ.js} +1 -1
- package/ui/dist/assets/{SessionsPanel-BCxsCKwr.js → SessionsPanel-Bd8dAJQa.js} +1 -1
- package/ui/dist/assets/{SessionsTab-C5fvnjtl.js → SessionsTab-BjyOfaQ9.js} +1 -1
- package/ui/dist/assets/SettingsPanel-CWvFc8MJ.js +1 -0
- package/ui/dist/assets/SettingsView-Chh-hdRF.js +2 -0
- package/ui/dist/assets/{SkeletonLoader-C42HbL9c.js → SkeletonLoader-sjDa7Y96.js} +1 -1
- package/ui/dist/assets/{SkillsPanel-DYG8avbV.js → SkillsPanel-B0UwrZGA.js} +1 -1
- package/ui/dist/assets/{SomaView-8Rwvw2sJ.js → SomaView-CXfqpdNP.js} +1 -1
- package/ui/dist/assets/{StatCard-vp0doZoE.js → StatCard-B4qf3WOB.js} +1 -1
- package/ui/dist/assets/{StatusBadge-C4dl4Z7r.js → StatusBadge-BtDtyL5L.js} +1 -1
- package/ui/dist/assets/{Tabs-B3hK5PRj.js → Tabs-CeY7i2tk.js} +1 -1
- package/ui/dist/assets/{TeamsPanel-Bgc-EYSL.js → TeamsPanel-BxFpHD58.js} +1 -1
- package/ui/dist/assets/{TelemetryPanel-DexYjpd5.js → TelemetryPanel-D2L98GwC.js} +1 -1
- package/ui/dist/assets/{TitanCanvas-Da6TxxdJ.js → TitanCanvas-D7TL368k.js} +4 -4
- package/ui/dist/assets/ToolsView-BiW0mds2.js +2 -0
- package/ui/dist/assets/{Tooltip-Chg08x7x.js → Tooltip-C3exOcZa.js} +1 -1
- package/ui/dist/assets/{TraceViewer-CojtXASo.js → TraceViewer-z42wYVdE.js} +1 -1
- package/ui/dist/assets/{TrainingPanel-tgn1BmiH.js → TrainingPanel-BPVftaSt.js} +1 -1
- package/ui/dist/assets/{VoiceOverlay-D_jfyVe9.js → VoiceOverlay-DNzDqitY.js} +1 -1
- package/ui/dist/assets/{VramPanel-DXrdQK3J.js → VramPanel-CF4l5fe_.js} +1 -1
- package/ui/dist/assets/{WatchView-BitQHsCy.js → WatchView-CewHUoxK.js} +1 -1
- package/ui/dist/assets/{WorkTab-6hdXBR7d.js → WorkTab-ByC4niLi.js} +1 -1
- package/ui/dist/assets/{WorkflowsPanel-BlB2iBik.js → WorkflowsPanel-Bsyhjv87.js} +1 -1
- package/ui/dist/assets/{archive-aaQ0bgj_.js → archive-Cz-kvWW5.js} +1 -1
- package/ui/dist/assets/{arrow-left-xxx_FceU.js → arrow-left-CGVxTClf.js} +1 -1
- package/ui/dist/assets/{book-open-B00IpKZA.js → book-open-CrOs3smB.js} +1 -1
- package/ui/dist/assets/{bot-C4CRICZX.js → bot-C0wiWyCT.js} +1 -1
- package/ui/dist/assets/{chart-column-lnilxGq2.js → chart-column-Dcc3a8m5.js} +1 -1
- package/ui/dist/assets/{check-BJMHM0tu.js → check-BhmlTEFk.js} +1 -1
- package/ui/dist/assets/{chevron-right-CA8HOEP4.js → chevron-right-DJCsUSwz.js} +1 -1
- package/ui/dist/assets/{chevron-up-n_3KVmjQ.js → chevron-up-cs3cBR4O.js} +1 -1
- package/ui/dist/assets/{circle-check-big-hiNdH5H3.js → circle-check-big-De2k5qVr.js} +1 -1
- package/ui/dist/assets/{circle-stop-BlIwj_3n.js → circle-stop-u0L9iQ69.js} +1 -1
- package/ui/dist/assets/{clipboard-list-BnOtwHQm.js → clipboard-list-DF1F3Vjf.js} +1 -1
- package/ui/dist/assets/{clock-BFgCJnqQ.js → clock-Bc6IrFv8.js} +1 -1
- package/ui/dist/assets/{dollar-sign-CBBudQd7.js → dollar-sign-BStL62ws.js} +1 -1
- package/ui/dist/assets/{download-C-DdF4cx.js → download-VXqww0Iy.js} +1 -1
- package/ui/dist/assets/{external-link-CPAx2HBG.js → external-link-BjN0VrNb.js} +1 -1
- package/ui/dist/assets/{file-text-CyC_OxlA.js → file-text-SIULFbzy.js} +1 -1
- package/ui/dist/assets/{flask-conical-BKbKUYhz.js → flask-conical-CsShOfpS.js} +1 -1
- package/ui/dist/assets/{folder-7bWz46dM.js → folder-DwOkgBGj.js} +1 -1
- package/ui/dist/assets/{funnel-C_bR-Dz5.js → funnel-CDnA2Enn.js} +1 -1
- package/ui/dist/assets/{git-branch-DGWdkudk.js → git-branch-BAFSlxgi.js} +1 -1
- package/ui/dist/assets/{index-CgHHe41p.js → index-BlFxPvdg.js} +5 -5
- package/ui/dist/assets/{index-CtD9JOx2.css → index-Dm6zcSTS.css} +1 -1
- package/ui/dist/assets/{layers-3BMDaZuk.js → layers-DKKOtsYx.js} +1 -1
- package/ui/dist/assets/{legacy-VWR8oDEy.js → legacy-YQ03_WIq.js} +1 -1
- package/ui/dist/assets/{lightbulb-CPhcUxli.js → lightbulb-D4Syh7fA.js} +1 -1
- package/ui/dist/assets/{link-CfLpUR24.js → link-C_6ueq0o.js} +1 -1
- package/ui/dist/assets/{list-todo-DgAmn8ot.js → list-todo-3Me4V-34.js} +1 -1
- package/ui/dist/assets/{message-square-WJp1dTaM.js → message-square-Dv6Q3VRO.js} +1 -1
- package/ui/dist/assets/{mic-DjXDp1Js.js → mic-BInf3BDE.js} +1 -1
- package/ui/dist/assets/{missions-CwDL2FHE.js → missions-BUTRB5Lq.js} +1 -1
- package/ui/dist/assets/{network-C_MOo5My.js → network-BsSfc5IE.js} +1 -1
- package/ui/dist/assets/{pause-CovS6Xwq.js → pause-CXCmPcHk.js} +1 -1
- package/ui/dist/assets/{pencil-C6SVDEUL.js → pencil-DAvceqn3.js} +1 -1
- package/ui/dist/assets/{play-D3Nbm1Cz.js → play-MuD1S1C5.js} +1 -1
- package/ui/dist/assets/{plug-Dpu9RRBi.js → plug-Chv5y4No.js} +1 -1
- package/ui/dist/assets/{plus-CJKkM9fM.js → plus-SBD6A3Qb.js} +1 -1
- package/ui/dist/assets/{proxy-CaK_YXZW.js → proxy-C5UuKDtU.js} +1 -1
- package/ui/dist/assets/{radio-BTFO9FV9.js → radio-BySzBvYH.js} +1 -1
- package/ui/dist/assets/{refresh-cw-_C-4Cd_3.js → refresh-cw-BdcqinTm.js} +1 -1
- package/ui/dist/assets/{rotate-ccw-DWyVAH19.js → rotate-ccw-CRA_s5tz.js} +1 -1
- package/ui/dist/assets/{save-B02XWwgN.js → save-BWhXC8Tv.js} +1 -1
- package/ui/dist/assets/{search-CHteSk-9.js → search-DF7UnWEk.js} +1 -1
- package/ui/dist/assets/{send-DkMQeZAz.js → send-CmvPtbvy.js} +1 -1
- package/ui/dist/assets/{server-CvEvPDpX.js → server-1PubNLgw.js} +1 -1
- package/ui/dist/assets/{shield-check-DQeYCvwF.js → shield-check-BjuAv28a.js} +1 -1
- package/ui/dist/assets/{terminal-BVErXh5C.js → terminal-BvDfNOXl.js} +1 -1
- package/ui/dist/assets/{test-tube-JSgqEqJs.js → test-tube-CrzRsKdm.js} +1 -1
- package/ui/dist/assets/{toggle-right-B3Qz7cQt.js → toggle-right-BRJ_dULZ.js} +1 -1
- package/ui/dist/assets/{trash-2-kiHv5iAF.js → trash-2-Dtxmn6GE.js} +1 -1
- package/ui/dist/assets/{trending-up-xhvUQXWt.js → trending-up-C7pfwW1S.js} +1 -1
- package/ui/dist/assets/{trophy-G3zNxlQS.js → trophy-Dknrgn8P.js} +1 -1
- package/ui/dist/assets/{volume-2-CELMZXsT.js → volume-2-ahkfEwxT.js} +1 -1
- package/ui/dist/assets/{wifi-off-DKKYhVWL.js → wifi-off-wACQ7wec.js} +1 -1
- package/ui/dist/index.html +2 -2
- package/ui/dist/sw.js +1 -1
- package/ui/dist/assets/AuditPanel-CLc6IVvA.js +0 -1
- package/ui/dist/assets/AutoresearchPanel-BJRXdUNa.js +0 -6
- package/ui/dist/assets/CPFiles-CR9Nn3_p.js +0 -1
- package/ui/dist/assets/CPLayout-CDkrYE-H.js +0 -2
- package/ui/dist/assets/InfraView-0iQPmcD1.js +0 -2
- package/ui/dist/assets/IntegrationsPanel-BGEkU649.js +0 -1
- package/ui/dist/assets/IntelligenceView-wm2Pw46I.js +0 -2
- package/ui/dist/assets/LogsPanel-DZ_K2xOL.js +0 -1
- package/ui/dist/assets/McpPanel-CNB1BMz-.js +0 -1
- package/ui/dist/assets/MeshPanel-DjYZh3P3.js +0 -11
- package/ui/dist/assets/NvidiaPanel-CLoX_gD2.js +0 -1
- package/ui/dist/assets/SelfImprovePanel-D5s-1XCU.js +0 -1
- package/ui/dist/assets/SettingsPanel-B7jrFmeR.js +0 -1
- package/ui/dist/assets/SettingsView-CQMHjpN8.js +0 -2
- package/ui/dist/assets/ToolsView-DkP9NfCj.js +0 -2
package/ui/dist/index.html
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
<link rel="manifest" href="/manifest.json" />
|
|
10
10
|
<link rel="apple-touch-icon" href="/titan-logo.png" />
|
|
11
11
|
<title>TITAN Mission Control</title>
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
13
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-BlFxPvdg.js"></script>
|
|
13
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Dm6zcSTS.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body class="bg-zinc-950 text-zinc-100">
|
|
16
16
|
<div id="root"></div>
|
package/ui/dist/sw.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* but a default falls back to the source-controlled value here.
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
const CACHE_NAME = 'titan-' + ('
|
|
23
|
+
const CACHE_NAME = 'titan-' + ('1779485037112');
|
|
24
24
|
const ASSETS_PREFIX = '/assets/';
|
|
25
25
|
|
|
26
26
|
self.addEventListener('install', (event) => {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as d,j as e,aJ as S,aK as A}from"./index-CgHHe41p.js";import{C as v}from"./clipboard-list-BnOtwHQm.js";import{R as C}from"./refresh-cw-_C-4Cd_3.js";import{F as T}from"./funnel-C_bR-Dz5.js";function E(){var b;const[c,p]=d.useState([]),[r,h]=d.useState(null),[g,i]=d.useState(!0),[a,n]=d.useState(""),[l,x]=d.useState(""),m=async()=>{i(!0);try{const[t,s]=await Promise.all([S({source:a||void 0,action:l||void 0,limit:100}),A(24)]);p(t),h(s)}catch{}i(!1)};d.useEffect(()=>{m()},[a,l]);const j=t=>t==="success"?"text-[var(--success)]":t==="failure"?"text-[var(--error)]":t==="escalated"?"text-[var(--warning)]":"text-[var(--text-muted)]",f=t=>t==="success"?"bg-[var(--success)]/10 border-[var(--success)]/20":t==="failure"?"bg-[var(--error)]/10 border-[var(--error)]/20":t==="escalated"?"bg-[var(--warning)]/10 border-[var(--warning)]/20":"bg-[var(--bg-tertiary)] border-[var(--border)]",u=t=>t.startsWith("daemon")?"bg-purple-500/10 text-purple-400 border-purple-500/20":t==="autopilot"?"bg-blue-500/10 text-blue-400 border-blue-500/20":t==="user"?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":t==="initiative"?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-[var(--bg-tertiary)] text-[var(--text-muted)] border-[var(--border)]",N=t=>{try{const s=new Date(t),o=new Date().getTime()-s.getTime();return o<6e4?`${Math.round(o/1e3)}s ago`:o<36e5?`${Math.round(o/6e4)}m ago`:o<864e5?`${Math.round(o/36e5)}h ago`:s.toLocaleDateString()}catch{return t}},y=[...new Set(c.map(t=>t.source))].sort(),w=[...new Set(c.map(t=>t.action))].sort();return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(v,{className:"w-6 h-6 text-[var(--accent)]"}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl font-bold text-[var(--text)]",children:"Audit Log"}),e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Every autonomous action logged for accountability"})]})]}),e.jsx("button",{onClick:m,className:"p-2 rounded-md border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors",children:e.jsx(C,{size:14})})]}),r&&e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Actions (24h)"}),e.jsx("p",{className:"text-2xl font-bold text-[var(--text)]",children:r.totalActions})]}),e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Success Rate"}),e.jsxs("p",{className:`text-2xl font-bold ${r.successRate>=80?"text-[var(--success)]":r.successRate>=50?"text-[var(--warning)]":"text-[var(--error)]"}`,children:[r.successRate,"%"]})]}),e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Sources"}),e.jsx("p",{className:"text-2xl font-bold text-[var(--text)]",children:Object.keys(r.bySource).length})]}),e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Top Tool"}),e.jsx("p",{className:"text-lg font-semibold text-[var(--accent)] truncate",children:((b=r.topTools[0])==null?void 0:b.tool)||"none"})]})]}),r&&Object.keys(r.bySource).length>0&&e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text)] mb-3",children:"Actions by Source (24h)"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Object.entries(r.bySource).sort((t,s)=>s[1]-t[1]).map(([t,s])=>e.jsxs("button",{onClick:()=>n(a===t?"":t),className:`px-3 py-1.5 text-xs rounded-md border transition-colors ${a===t?"bg-[var(--accent)] text-white border-[var(--accent)]":u(t)}`,children:[t,": ",s]},t))})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(T,{size:14,className:"text-[var(--text-muted)]"}),e.jsxs("select",{value:a,onChange:t=>n(t.target.value),className:"px-3 py-1.5 text-xs bg-[var(--bg-secondary)] border border-[var(--border)] rounded-md text-[var(--text)]",children:[e.jsx("option",{value:"",children:"All Sources"}),y.map(t=>e.jsx("option",{value:t,children:t},t))]}),e.jsxs("select",{value:l,onChange:t=>x(t.target.value),className:"px-3 py-1.5 text-xs bg-[var(--bg-secondary)] border border-[var(--border)] rounded-md text-[var(--text)]",children:[e.jsx("option",{value:"",children:"All Actions"}),w.map(t=>e.jsx("option",{value:t,children:t},t))]}),(a||l)&&e.jsx("button",{onClick:()=>{n(""),x("")},className:"text-xs text-[var(--accent)] hover:underline",children:"Clear"})]}),g?e.jsx("div",{className:"text-[var(--text-muted)] text-sm",children:"Loading audit log..."}):c.length===0?e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-8 text-center",children:[e.jsx(v,{className:"w-10 h-10 text-[var(--text-muted)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--text-secondary)]",children:"No audit entries found"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"Autonomous actions will appear here as TITAN operates."})]}):e.jsx("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-[var(--text-muted)]",children:[e.jsx("th",{className:"text-left px-4 py-2 font-medium",children:"Time"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium",children:"Action"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium",children:"Source"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium",children:"Tool"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium",children:"Result"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium",children:"Detail"})]})}),e.jsx("tbody",{children:c.map((t,s)=>e.jsxs("tr",{className:"border-b border-[var(--border)]/50 last:border-0 hover:bg-[var(--bg-tertiary)] transition-colors",children:[e.jsx("td",{className:"px-4 py-2 text-[var(--text-muted)] whitespace-nowrap",children:N(t.timestamp)}),e.jsx("td",{className:"px-4 py-2 text-[var(--text)] font-medium",children:t.action}),e.jsx("td",{className:"px-4 py-2",children:e.jsx("span",{className:`px-2 py-0.5 rounded text-[10px] border ${u(t.source)}`,children:t.source})}),e.jsx("td",{className:"px-4 py-2 text-[var(--text-secondary)] font-mono",children:t.tool||"-"}),e.jsx("td",{className:"px-4 py-2",children:t.result?e.jsx("span",{className:`px-2 py-0.5 rounded text-[10px] border ${f(t.result)} ${j(t.result)}`,children:t.result}):"-"}),e.jsx("td",{className:"px-4 py-2 text-[var(--text-muted)] max-w-[200px] truncate",children:t.detail?JSON.stringify(t.detail):"-"})]},s))})]})})})]})}export{E as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as q,r as p,b as T,j as e,a7 as O,V as W}from"./index-CgHHe41p.js";import{F as A}from"./flask-conical-BKbKUYhz.js";import{P as D}from"./play-D3Nbm1Cz.js";import{P as B}from"./pause-CovS6Xwq.js";import{R as H}from"./refresh-cw-_C-4Cd_3.js";import{T as V}from"./trophy-G3zNxlQS.js";import{T as G}from"./trending-up-xhvUQXWt.js";import{C as U}from"./clock-BFgCJnqQ.js";import{C as J}from"./chevron-right-CA8HOEP4.js";/**
|
|
2
|
-
* @license lucide-react v0.513.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const X=[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Y=q("settings-2",X);function L(t){const x=Date.now()-new Date(t).getTime(),i=Math.floor(x/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function P(t){if(t<60)return`${Math.round(t)}s`;const x=Math.floor(t/60),i=Math.round(t%60);return`${x}m ${i}s`}function K({runs:t}){if(t.length<2)return e.jsx("div",{className:"flex items-center justify-center h-[200px] rounded-xl border border-bg-tertiary bg-bg-secondary text-text-muted text-sm",children:"Need at least 2 runs to show chart"});const x=800,i=200,a={top:20,right:20,bottom:30,left:50},b=x-a.left-a.right,$=i-a.top-a.bottom,N=t.map(r=>r.val_score),y=Math.max(0,Math.min(...N)-5),_=Math.min(100,Math.max(...N)+5),j=t.length>0?t[0].val_score:null,f=r=>a.left+r/(t.length-1)*b,S=r=>a.top+$-(r-y)/(_-y)*$,v=t.map((r,l)=>`${l===0?"M":"L"} ${f(l)} ${S(r.val_score)}`).join(" "),d=j!=null?S(j):null;return e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-4 overflow-x-auto",children:[e.jsx("h3",{className:"text-xs font-medium text-text-secondary mb-2 uppercase tracking-wide",children:"Val Score Over Time"}),e.jsxs("svg",{viewBox:`0 0 ${x} ${i}`,className:"w-full",style:{minWidth:400},children:[[0,.25,.5,.75,1].map(r=>{const l=a.top+$*(1-r),R=y+(_-y)*r;return e.jsxs("g",{children:[e.jsx("line",{x1:a.left,y1:l,x2:x-a.right,y2:l,stroke:"#27272a",strokeWidth:"1"}),e.jsx("text",{x:a.left-8,y:l+4,textAnchor:"end",fill:"#52525b",fontSize:"10",children:R.toFixed(0)})]},r)}),j!=null&&j>=y&&j<=_&&d!=null&&e.jsxs("g",{children:[e.jsx("line",{x1:a.left,y1:d,x2:x-a.right,y2:d,stroke:"#eab308",strokeWidth:"1",strokeDasharray:"6,4"}),e.jsx("text",{x:x-a.right+4,y:d+3,fill:"#eab308",fontSize:"9",children:"baseline"})]}),e.jsx("path",{d:v,fill:"none",stroke:"#8b5cf6",strokeWidth:"2"}),t.map((r,l)=>{const R=l>0&&r.val_score>t[l-1].val_score,m=l>0&&r.val_score<t[l-1].val_score?"var(--color-error)":R?"var(--color-success)":"var(--color-purple)";return e.jsx("circle",{cx:f(l),cy:S(r.val_score),r:"4",fill:m,stroke:"#18181b",strokeWidth:"2",children:e.jsxs("title",{children:["Run ",l+1,": ",r.val_score," (",L(r.timestamp),")"]})},l)}),t.map((r,l)=>t.length>10&&l%Math.ceil(t.length/10)!==0&&l!==t.length-1?null:e.jsxs("text",{x:f(l),y:i-5,textAnchor:"middle",fill:"#52525b",fontSize:"9",children:["#",l+1]},l))]})]})}function C({icon:t,label:x,value:i,sub:a,color:b="text-text"}){return e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-text-muted",children:t}),e.jsx("span",{className:"text-[10px] font-medium text-text-muted uppercase tracking-wider",children:x})]}),e.jsx("div",{className:`text-2xl font-bold ${b}`,children:i}),a&&e.jsx("div",{className:"text-[10px] text-text-muted mt-0.5",children:a})]})}function ne(){const[t,x]=p.useState([]),[i,a]=p.useState(!0),[b,$]=p.useState(!1),[N,y]=p.useState(null),[_,j]=p.useState(!1),[f,S]=p.useState(!1),v=p.useRef(null),d=p.useCallback((s,h)=>{y({type:s,message:h}),setTimeout(()=>y(null),3e3)},[]),r=p.useCallback(async()=>{try{const s=await T("/api/autoresearch/results");if(s.ok){const h=await s.json();x(h.runs||[])}}catch{}finally{a(!1)}},[]);p.useEffect(()=>{r()},[r]),p.useEffect(()=>(f?v.current&&(clearInterval(v.current),v.current=null):v.current=setInterval(r,3e4),()=>{v.current&&clearInterval(v.current)}),[f,r]);const l=async()=>{j(!0);try{(await T("/api/autoresearch/trigger",{method:"POST"})).ok?d("success","Autoresearch experiment started"):d("error","Failed to trigger experiment")}catch{d("error","Failed to connect to API")}finally{j(!1)}},R=async()=>{try{(await T("/api/message",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:"Deploy the best autoresearch LoRA adapter to Ollama. Use train_deploy."})})).ok?d("success","Deploying best model to Ollama..."):d("error","Failed to start deployment")}catch{d("error","Connection error")}},w=t.length>0?Math.max(...t.map(s=>s.val_score)):0,m=t.length>0?t[0].val_score:null,k=m!=null&&t.length>0?t.reduce((s,h)=>s+(h.val_score-m),0)/t.length:null,u=t.length>0?t[t.length-1]:null,g=u==null?void 0:u.hyperparams,F=(s,h)=>{const c=[],o=s.hyperparams,n=h.hyperparams;return o.lr!==n.lr&&c.push(`LR: ${n.lr} → ${o.lr}`),o.rank!==n.rank&&c.push(`Rank: ${n.rank} → ${o.rank}`),o.alpha!==n.alpha&&c.push(`Alpha: ${n.alpha} → ${o.alpha}`),o.epochs!==n.epochs&&c.push(`Epochs: ${n.epochs} → ${o.epochs}`),o.batch_size!==n.batch_size&&c.push(`Batch: ${n.batch_size} → ${o.batch_size}`),o.dropout!==n.dropout&&c.push(`Dropout: ${n.dropout} → ${o.dropout}`),o.grad_accum!==n.grad_accum&&c.push(`GradAccum: ${n.grad_accum} → ${o.grad_accum}`),o.max_seq_len!==n.max_seq_len&&c.push(`SeqLen: ${n.max_seq_len} → ${o.max_seq_len}`),c.length>0?c:["No changes"]};return i?e.jsx("div",{className:"space-y-4",children:[1,2,3].map(s=>e.jsx("div",{className:"h-20 animate-pulse rounded-xl border border-border bg-bg-secondary"},s))}):e.jsxs("div",{className:"space-y-6 max-w-6xl",children:[N&&e.jsx("div",{className:`fixed top-4 right-4 z-50 rounded-lg px-4 py-2.5 text-sm font-medium shadow-lg ${N.type==="success"?"bg-success/20 text-success border border-success/30":"bg-error/20 text-error border border-error/30"}`,children:N.message}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-xl font-bold text-text flex items-center gap-2",children:[e.jsx(A,{className:"h-5 w-5 text-purple"}),"Autoresearch"]}),e.jsx("p",{className:"text-xs text-text-muted mt-0.5",children:"Autonomous hyper-parameter search and LoRA fine-tuning"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>S(!f),className:"flex items-center gap-1 rounded-lg border border-bg-tertiary px-2.5 py-1.5 text-xs text-text-secondary hover:bg-bg-tertiary",children:[f?e.jsx(D,{className:"h-3 w-3"}):e.jsx(B,{className:"h-3 w-3"}),f?"Resume":"Pause"]}),e.jsx("button",{onClick:r,className:"flex items-center gap-1 rounded-lg border border-bg-tertiary px-2.5 py-1.5 text-xs text-text-secondary hover:bg-bg-tertiary",children:e.jsx(H,{className:"h-3 w-3"})})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[e.jsx(C,{icon:e.jsx(A,{className:"h-4 w-4"}),label:"Total Runs",value:t.length}),e.jsx(C,{icon:e.jsx(V,{className:"h-4 w-4"}),label:"Best Val Score",value:w>0?w.toFixed(1):"—",sub:m!=null&&w>m?`+${(w-m).toFixed(1)} from baseline`:void 0,color:m!=null&&w>m?"text-success":"text-text"}),e.jsx(C,{icon:e.jsx(G,{className:"h-4 w-4"}),label:"Avg Improvement",value:k!=null?`${k>=0?"+":""}${k.toFixed(1)}`:"—",color:k!=null?k>0?"text-success":k<0?"text-error":"text-text":"text-text"}),e.jsx(C,{icon:e.jsx(U,{className:"h-4 w-4"}),label:"Last Run",value:u?L(u.timestamp):"Never",sub:u?`Score: ${u.val_score}`:void 0})]}),e.jsx(K,{runs:t}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{onClick:l,disabled:_,className:"flex items-center gap-2 rounded-lg bg-purple px-4 py-2 text-sm font-medium text-white hover:bg-[#7c3aed] disabled:opacity-50",children:[e.jsx(D,{className:"h-4 w-4"}),_?"Starting...":"Run Experiment"]}),e.jsxs("button",{onClick:R,disabled:t.length===0,className:"flex items-center gap-2 rounded-lg border border-bg-tertiary px-4 py-2 text-sm font-medium text-text-secondary hover:bg-bg-tertiary disabled:opacity-50",children:[e.jsx(O,{className:"h-4 w-4"}),"Deploy Best Model"]}),u&&e.jsxs("span",{className:"text-xs text-text-muted",children:[u.num_examples," training examples · ",P(u.training_time_s)]})]}),t.length>0&&e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-bg-tertiary",children:[e.jsx("h3",{className:"text-sm font-medium text-text",children:"What Made TITAN Better"}),e.jsx("p",{className:"text-[10px] text-text-muted",children:"Experiment history — how each change affected val_score"})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-bg-tertiary",children:[e.jsx("th",{className:"px-4 py-2 text-[10px] font-medium text-text-muted",children:"#"}),e.jsx("th",{className:"px-4 py-2 text-[10px] font-medium text-text-muted",children:"Date"}),e.jsx("th",{className:"px-4 py-2 text-[10px] font-medium text-text-muted",children:"Changes"}),e.jsx("th",{className:"px-4 py-2 text-[10px] font-medium text-text-muted text-right",children:"Score"}),e.jsx("th",{className:"px-4 py-2 text-[10px] font-medium text-text-muted text-right",children:"Δ"}),e.jsx("th",{className:"px-4 py-2 text-[10px] font-medium text-text-muted text-right",children:"Duration"}),e.jsx("th",{className:"px-4 py-2 text-[10px] font-medium text-text-muted text-right",children:"Examples"})]})}),e.jsx("tbody",{children:[...t].reverse().map((s,h)=>{const c=t.length-1-h,o=c>0?t[c-1]:null,n=o?s.val_score-o.val_score:m!=null?s.val_score-m:0,z=o?F(s,o):["Initial run"],M=new Date(s.timestamp);return e.jsxs("tr",{className:"border-b border-bg-tertiary last:border-0 hover:bg-[#27272a30]",children:[e.jsx("td",{className:"px-4 py-2 text-text-muted font-mono",children:c+1}),e.jsxs("td",{className:"px-4 py-2 text-text-secondary",children:[M.toLocaleDateString()," ",M.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]}),e.jsx("td",{className:"px-4 py-2 text-text-secondary",children:z.map((E,I)=>e.jsx("span",{className:"inline-block mr-1.5 rounded bg-bg-tertiary px-1.5 py-0.5 text-[10px] font-mono",children:E},I))}),e.jsx("td",{className:"px-4 py-2 text-right font-mono text-text font-medium",children:s.val_score.toFixed(1)}),e.jsx("td",{className:"px-4 py-2 text-right font-mono",children:e.jsxs("span",{className:n>0?"text-success":n<0?"text-error":"text-text-muted",children:[n>0?"+":"",n.toFixed(1)]})}),e.jsx("td",{className:"px-4 py-2 text-right text-text-muted",children:P(s.training_time_s)}),e.jsx("td",{className:"px-4 py-2 text-right text-text-muted",children:s.num_examples})]},c)})})]})})]}),e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>$(!b),className:"flex w-full items-center gap-2 text-xs font-medium text-text-secondary uppercase tracking-wider hover:text-text",children:[b?e.jsx(W,{className:"h-3.5 w-3.5"}):e.jsx(J,{className:"h-3.5 w-3.5"}),e.jsx(Y,{className:"h-3.5 w-3.5"}),"Current Hyperparameters"]}),b&&g&&e.jsx("div",{className:"mt-3 grid grid-cols-2 gap-2 sm:grid-cols-4",children:[{label:"Learning Rate",value:g.lr},{label:"LoRA Rank",value:g.rank},{label:"LoRA Alpha",value:g.alpha},{label:"Dropout",value:g.dropout},{label:"Epochs",value:g.epochs},{label:"Batch Size",value:g.batch_size},{label:"Grad Accum",value:g.grad_accum},{label:"Max Seq Len",value:g.max_seq_len}].map(({label:s,value:h})=>e.jsxs("div",{className:"rounded-lg border border-bg-tertiary bg-bg-secondary px-3 py-2",children:[e.jsx("div",{className:"text-[10px] text-text-muted uppercase tracking-wider",children:s}),e.jsx("div",{className:"text-sm font-mono text-text mt-0.5",children:h})]},s))}),b&&!g&&e.jsx("div",{className:"mt-3 rounded-lg border border-bg-tertiary bg-bg-secondary px-4 py-3 text-xs text-text-muted",children:"No runs yet — hyperparameters will appear after the first experiment"})]}),t.length===0&&e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-8 text-center",children:[e.jsx(A,{className:"h-8 w-8 text-text-muted mx-auto mb-3"}),e.jsx("p",{className:"text-sm text-text-secondary",children:"No autoresearch runs yet"}),e.jsx("p",{className:"text-xs text-text-muted mt-1",children:'Click "Run Experiment" to start fine-tuning qwen3.5:35b on the RTX 5090'})]})]})}export{ne as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,j as e,b as f,X as j}from"./index-CgHHe41p.js";import{F as N}from"./folder-7bWz46dM.js";import{F as y}from"./flask-conical-BKbKUYhz.js";import{S as v}from"./search-CHteSk-9.js";import{R as p}from"./refresh-cw-_C-4Cd_3.js";import{F as w}from"./file-text-CyC_OxlA.js";async function h(t){const a=await f(t);if(!a.ok)throw new Error(`HTTP ${a.status}`);return a.json()}function b(t){return t===void 0?"—":t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(1)}K`:`${(t/1024/1024).toFixed(1)}M`}function g(t){const a=Math.floor((Date.now()-new Date(t).getTime())/1e3);return a<60?`${a}s`:a<3600?`${Math.floor(a/60)}m`:a<86400?`${Math.floor(a/3600)}h`:`${Math.floor(a/86400)}d`}function k({path:t,onClose:a}){const[r,c]=i.useState(null);return i.useEffect(()=>{c(null),h(`/api/files/content?path=${encodeURIComponent(t)}`).then(l=>c(l)).catch(l=>c({error:String(l)}))},[t]),e.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 flex items-center justify-center p-4",onClick:a,children:e.jsxs("div",{className:"bg-bg-secondary border border-border rounded-xl w-full max-w-5xl max-h-[90vh] flex flex-col shadow-2xl",onClick:l=>l.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm font-medium text-text truncate",children:t}),r&&"sizeBytes"in r&&e.jsxs("div",{className:"text-xs text-text-muted",children:[b(r.sizeBytes)," · ",r.encoding,r.truncated?" · truncated at 1MB":""]})]}),e.jsx("button",{onClick:a,className:"p-1 rounded hover:bg-bg-tertiary text-text-muted",title:"Close",children:e.jsx(j,{size:18})})]}),e.jsxs("div",{className:"flex-1 overflow-auto p-4",children:[r===null&&e.jsx("div",{className:"text-center py-12 text-text-muted text-sm",children:"Loading…"}),r&&"error"in r&&e.jsx("div",{className:"text-error text-sm py-8 text-center",children:r.error}),r&&"content"in r&&e.jsx("pre",{className:"text-[12px] font-mono leading-snug whitespace-pre-wrap text-text-secondary",children:r.content})]})]})})}function C(){const[t,a]=i.useState([]),[r,c]=i.useState(!0),[l,m]=i.useState(""),[o,n]=i.useState(null),d=i.useCallback(async()=>{c(!0);try{const s=await h("/api/files/edited?limit=300");a(s.files||[])}catch{}c(!1)},[]);i.useEffect(()=>{d()},[d]);const x=l?t.filter(s=>s.path.toLowerCase().includes(l.toLowerCase())):t;return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded-lg border border-border bg-bg-secondary",children:[e.jsx(v,{size:14,className:"text-text-muted"}),e.jsx("input",{type:"text",placeholder:"Filter by path…",value:l,onChange:s=>m(s.target.value),className:"flex-1 bg-transparent text-sm outline-none"})]}),e.jsxs("button",{onClick:d,className:"px-3 py-1.5 rounded-lg border border-border bg-bg-secondary text-sm hover:bg-bg-tertiary flex items-center gap-1.5",title:"Refresh",children:[e.jsx(p,{size:14,className:r?"animate-spin":""}),r?"Loading":"Refresh"]}),e.jsxs("div",{className:"text-xs text-text-muted",children:[x.length," / ",t.length]})]}),r&&t.length===0&&e.jsx("div",{className:"text-center py-12 text-text-muted text-sm",children:"Loading…"}),!r&&x.length===0&&e.jsx("div",{className:"text-center py-12 text-text-muted text-sm",children:l?"No files match filter":"No file edits recorded yet"}),x.length>0&&e.jsx("div",{className:"divide-y divide-border rounded-xl border border-border bg-bg-secondary overflow-hidden",children:x.map(s=>e.jsxs("button",{onClick:()=>s.readable&&s.exists&&n(s.path),disabled:!s.readable||!s.exists,className:"w-full flex items-start gap-3 px-4 py-2.5 text-left hover:bg-bg-tertiary transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx(w,{size:14,className:s.isSelfMod?"text-accent mt-0.5 flex-shrink-0":"text-text-muted mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm font-mono text-text truncate",children:s.path}),e.jsxs("div",{className:"text-xs text-text-muted mt-0.5 flex items-center gap-2 flex-wrap",children:[s.isSelfMod&&e.jsx("span",{className:"px-1 rounded bg-accent/15 text-accent text-[10px]",children:"self-mod"}),e.jsxs("span",{children:["×",s.writeCount]}),s.tools.length>0&&e.jsx("span",{children:s.tools.join("+")}),s.channels.length>0&&e.jsxs("span",{children:["via ",s.channels.join(", ")]}),!s.exists&&e.jsx("span",{className:"text-warn",children:"deleted"}),e.jsx("span",{children:b(s.sizeBytes)})]})]}),e.jsx("div",{className:"text-xs text-text-muted flex-shrink-0",children:g(s.lastWrittenAt)})]},s.path))}),o&&e.jsx(k,{path:o,onClose:()=>n(null)})]})}function S(){const[t,a]=i.useState([]),[r,c]=i.useState(!0),[l,m]=i.useState(null),o=i.useCallback(async()=>{c(!0);try{const n=await h("/api/research/recent?limit=50");a(n.research||[])}catch{}c(!1)},[]);return i.useEffect(()=>{o()},[o]),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:o,className:"px-3 py-1.5 rounded-lg border border-border bg-bg-secondary text-sm hover:bg-bg-tertiary flex items-center gap-1.5",children:[e.jsx(p,{size:14,className:r?"animate-spin":""}),r?"Loading":"Refresh"]}),e.jsxs("div",{className:"text-xs text-text-muted",children:[t.length," items"]})]}),r&&t.length===0&&e.jsx("div",{className:"text-center py-12 text-text-muted text-sm",children:"Loading…"}),!r&&t.length===0&&e.jsx("div",{className:"text-center py-12 text-text-muted text-sm",children:"No research recorded yet. Complete a goal and results will appear here."}),e.jsx("div",{className:"space-y-2",children:t.map(n=>{var u;const d=l===n.id,x=n.content.slice(0,200),s=n.subtaskTitle?`${n.goalTitle} — ${n.subtaskTitle}`:((u=n.tags)==null?void 0:u.join(" · "))||n.kind;return e.jsxs("div",{className:"rounded-xl border border-border bg-bg-secondary overflow-hidden",children:[e.jsxs("button",{onClick:()=>m(d?null:n.id),className:"w-full text-left px-4 py-3 hover:bg-bg-tertiary transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-bg-tertiary text-text-muted uppercase tracking-wide font-medium",children:n.kind.replace(/_/g," ")}),e.jsx("span",{className:"text-xs text-text-muted",children:g(n.at)})]}),e.jsx("div",{className:"text-sm font-medium text-text truncate",children:s}),!d&&e.jsxs("div",{className:"text-xs text-text-secondary mt-1 line-clamp-2",children:[x,n.content.length>200?"…":""]})]}),d&&e.jsx("div",{className:"px-4 pb-4",children:e.jsx("pre",{className:"text-[12px] font-mono leading-snug whitespace-pre-wrap text-text-secondary",children:n.content})})]},n.id)})})]})}function M(){const[t,a]=i.useState("files");return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>a("files"),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm transition-colors ${t==="files"?"bg-accent/15 text-accent border border-accent/30":"text-text-secondary hover:text-text hover:bg-bg-tertiary border border-transparent"}`,children:[e.jsx(N,{size:14})," Files edited"]}),e.jsxs("button",{onClick:()=>a("research"),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm transition-colors ${t==="research"?"bg-accent/15 text-accent border border-accent/30":"text-text-secondary hover:text-text hover:bg-bg-tertiary border border-transparent"}`,children:[e.jsx(y,{size:14})," Research"]})]}),t==="files"?e.jsx(C,{}):e.jsx(S,{})]})}export{M as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CommandPostHub-DHTVn2_E.js","assets/index-CgHHe41p.js","assets/index-CtD9JOx2.css","assets/Input-BGGQDAyP.js","assets/clsx-B-dksMZM.js","assets/Modal-CNnSfYJm.js","assets/proxy-CaK_YXZW.js","assets/InlineEditableField-Car7F635.js","assets/check-BJMHM0tu.js","assets/pencil-C6SVDEUL.js","assets/Tooltip-Chg08x7x.js","assets/approvalHeadline-DB9SgR-9.js","assets/chevron-right-CA8HOEP4.js","assets/bot-C4CRICZX.js","assets/pause-CovS6Xwq.js","assets/dollar-sign-CBBudQd7.js","assets/git-branch-DGWdkudk.js","assets/chart-column-lnilxGq2.js","assets/clock-BFgCJnqQ.js","assets/message-square-WJp1dTaM.js","assets/file-text-CyC_OxlA.js","assets/terminal-BVErXh5C.js","assets/refresh-cw-_C-4Cd_3.js","assets/circle-stop-BlIwj_3n.js","assets/send-DkMQeZAz.js","assets/plus-CJKkM9fM.js","assets/trash-2-kiHv5iAF.js","assets/CPIssues-DsPZLTGm.js","assets/StatusBadge-C4dl4Z7r.js","assets/PageHeader-CwcMp_4A.js","assets/EmptyState-DSuZC-Tg.js","assets/Tabs-B3hK5PRj.js","assets/SkeletonLoader-C42HbL9c.js","assets/list-todo-DgAmn8ot.js","assets/CPIssueDetail-Dpuc_wTi.js","assets/arrow-left-xxx_FceU.js","assets/CPAgents-BZYynbga.js","assets/CPAgentDetail-DUi0ygHI.js","assets/circle-check-big-hiNdH5H3.js","assets/save-B02XWwgN.js","assets/CPApprovals-CwNTmqzq.js","assets/shield-check-DQeYCvwF.js","assets/CPActivity-7zS0dXGf.js","assets/CPGoals-CVSxXk1i.js","assets/CPRuns-BUdKn-uk.js","assets/play-D3Nbm1Cz.js","assets/CPCosts-5hylxGvH.js","assets/CPOrg-C121ZFWy.js","assets/network-C_MOo5My.js","assets/CPFiles-CR9Nn3_p.js","assets/folder-7bWz46dM.js","assets/flask-conical-BKbKUYhz.js","assets/search-CHteSk-9.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as t,r as s,q as _,v as e,N as l,_ as o}from"./index-CgHHe41p.js";const a=s.lazy(()=>o(()=>import("./CommandPostHub-DHTVn2_E.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]))),i=s.lazy(()=>o(()=>import("./CPIssues-DsPZLTGm.js"),__vite__mapDeps([27,1,2,3,4,28,29,12,30,31,5,6,32,25,33]))),r=s.lazy(()=>o(()=>import("./CPIssueDetail-Dpuc_wTi.js"),__vite__mapDeps([34,1,2,3,4,28,29,12,32,35,19,24]))),n=s.lazy(()=>o(()=>import("./CPAgents-BZYynbga.js"),__vite__mapDeps([36,1,2,3,4,28,29,12,30,32]))),x=s.lazy(()=>o(()=>import("./CPAgentDetail-DUi0ygHI.js"),__vite__mapDeps([37,1,2,3,4,28,29,12,30,31,32,35,38,15,18,39]))),m=s.lazy(()=>o(()=>import("./CPApprovals-CwNTmqzq.js"),__vite__mapDeps([40,1,2,3,4,28,29,12,30,31,32,11,41,8]))),j=s.lazy(()=>o(()=>import("./CPActivity-7zS0dXGf.js"),__vite__mapDeps([42,1,2,3,4,29,12,30,31,32,41,15,13]))),p=s.lazy(()=>o(()=>import("./CPGoals-CVSxXk1i.js"),__vite__mapDeps([43,1,2,3,4,28,29,12,30,5,6,32,25,26]))),u=s.lazy(()=>o(()=>import("./CPRuns-BUdKn-uk.js"),__vite__mapDeps([44,1,2,3,4,28,29,12,30,32,45]))),c=s.lazy(()=>o(()=>import("./CPCosts-5hylxGvH.js"),__vite__mapDeps([46,1,2,3,4,28,29,12,30,5,6,32,25,15,26]))),d=s.lazy(()=>o(()=>import("./CPOrg-C121ZFWy.js"),__vite__mapDeps([47,1,2,3,4,28,29,12,30,32,48,26]))),P=s.lazy(()=>o(()=>import("./CPFiles-CR9Nn3_p.js"),__vite__mapDeps([49,1,2,50,51,52,22,20])));function E(){return t.jsx("div",{className:"flex items-center justify-center h-full text-sm",style:{color:"#c4b49a"},children:"Loading..."})}function h(){return t.jsx("div",{className:"h-full overflow-hidden",children:t.jsx("div",{className:"h-full overflow-auto",children:t.jsx(s.Suspense,{fallback:t.jsx(E,{}),children:t.jsxs(_,{children:[t.jsx(e,{index:!0,element:t.jsx(a,{})}),t.jsx(e,{path:"dashboard",element:t.jsx(a,{})}),t.jsx(e,{path:"issues",element:t.jsx(i,{})}),t.jsx(e,{path:"issues/:id",element:t.jsx(r,{})}),t.jsx(e,{path:"agents",element:t.jsx(n,{})}),t.jsx(e,{path:"agents/:id",element:t.jsx(x,{})}),t.jsx(e,{path:"approvals",element:t.jsx(m,{})}),t.jsx(e,{path:"activity",element:t.jsx(j,{})}),t.jsx(e,{path:"goals",element:t.jsx(p,{})}),t.jsx(e,{path:"runs",element:t.jsx(u,{})}),t.jsx(e,{path:"costs",element:t.jsx(c,{})}),t.jsx(e,{path:"org",element:t.jsx(d,{})}),t.jsx(e,{path:"files",element:t.jsx(P,{})}),t.jsx(e,{path:"*",element:t.jsx(l,{to:"/command-post",replace:!0})})]})})})})}export{h as CPLayout,h as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomelabPanel-DigWCjaM.js","assets/index-CgHHe41p.js","assets/index-CtD9JOx2.css","assets/PageHeader-CwcMp_4A.js","assets/chevron-right-CA8HOEP4.js","assets/StatCard-vp0doZoE.js","assets/SkeletonLoader-C42HbL9c.js","assets/clsx-B-dksMZM.js","assets/refresh-cw-_C-4Cd_3.js","assets/clock-BFgCJnqQ.js","assets/message-square-WJp1dTaM.js","assets/server-CvEvPDpX.js","assets/chart-column-lnilxGq2.js","assets/network-C_MOo5My.js","assets/circle-check-big-hiNdH5H3.js","assets/wifi-off-DKKYhVWL.js","assets/dollar-sign-CBBudQd7.js","assets/NvidiaPanel-CLoX_gD2.js","assets/save-B02XWwgN.js","assets/external-link-CPAx2HBG.js","assets/search-CHteSk-9.js","assets/FilesPanel-DwUzP4Hv.js","assets/plus-CJKkM9fM.js","assets/arrow-left-xxx_FceU.js","assets/pencil-C6SVDEUL.js","assets/trash-2-kiHv5iAF.js","assets/download-C-DdF4cx.js","assets/check-BJMHM0tu.js","assets/TitanCanvas-Da6TxxdJ.js","assets/chevron-up-n_3KVmjQ.js","assets/file-text-CyC_OxlA.js","assets/terminal-BVErXh5C.js","assets/book-open-B00IpKZA.js","assets/rotate-ccw-DWyVAH19.js","assets/send-DkMQeZAz.js","assets/mic-DjXDp1Js.js","assets/flask-conical-BKbKUYhz.js","assets/archive-aaQ0bgj_.js","assets/radio-BTFO9FV9.js","assets/test-tube-JSgqEqJs.js","assets/VoiceOverlay-D_jfyVe9.js","assets/volume-2-CELMZXsT.js","assets/folder-7bWz46dM.js","assets/shield-check-DQeYCvwF.js","assets/bot-C4CRICZX.js","assets/link-CfLpUR24.js","assets/TitanCanvas-BfitWg9R.css","assets/LogsPanel-DZ_K2xOL.js","assets/TelemetryPanel-DexYjpd5.js","assets/git-branch-DGWdkudk.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as t,j as e,_ as a}from"./index-CgHHe41p.js";import{c as i}from"./clsx-B-dksMZM.js";const r=t.lazy(()=>a(()=>import("./HomelabPanel-DigWCjaM.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]))),d=t.lazy(()=>a(()=>import("./NvidiaPanel-CLoX_gD2.js"),__vite__mapDeps([17,1,2,8,18,14,19,20]))),n=t.lazy(()=>a(()=>import("./FilesPanel-DwUzP4Hv.js"),__vite__mapDeps([21,1,2,22,8,4,23,9,24,25,18,26,27,28,29,30,11,13,31,32,33,20,34,10,35,36,37,38,39,40,41,42,43,19,44,15,12,45,46]))),c=t.lazy(()=>a(()=>import("./LogsPanel-DZ_K2xOL.js"),__vite__mapDeps([47,1,2,8]))),m=t.lazy(()=>a(()=>import("./TelemetryPanel-DexYjpd5.js"),__vite__mapDeps([48,1,2,5,9,49,12,11]))),x=[{id:"homelab",label:"Homelab"},{id:"gpu",label:"GPU / NVIDIA"},{id:"files",label:"Files"},{id:"logs",label:"Logs"},{id:"telemetry",label:"Telemetry"}];function p(){const[l,o]=t.useState("homelab");return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"shrink-0 px-5 pt-4 pb-0",children:[e.jsx("h1",{className:"text-sm font-semibold text-text mb-3",children:"Infrastructure"}),e.jsx("div",{className:"flex items-center gap-0.5 border-b border-border/50",children:x.map(s=>e.jsxs("button",{onClick:()=>o(s.id),className:i("px-3 py-2 text-xs font-medium transition-colors relative",l===s.id?"text-accent":"text-text-muted hover:text-text-secondary"),children:[s.label,l===s.id&&e.jsx("div",{className:"absolute bottom-0 left-1 right-1 h-[2px] bg-accent rounded-full"})]},s.id))})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto p-5",children:e.jsxs(t.Suspense,{fallback:e.jsx("div",{className:"skeleton-shimmer h-40 rounded-lg"}),children:[l==="homelab"&&e.jsx(r,{}),l==="gpu"&&e.jsx(d,{}),l==="files"&&e.jsx(n,{}),l==="logs"&&e.jsx(c,{}),l==="telemetry"&&e.jsx(m,{})]})})]})}export{p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as l,j as e,i as F,an as T,E as I,a8 as S,b as C,V as U,a9 as K}from"./index-CgHHe41p.js";import{P as A}from"./plug-Dpu9RRBi.js";import{C as R}from"./circle-check-big-hiNdH5H3.js";import{S as O}from"./save-B02XWwgN.js";import{C as q}from"./chevron-right-CA8HOEP4.js";const k=[{id:"anthropic",label:"Anthropic",fieldKey:"anthropicKey",fieldType:"key",placeholder:"sk-ant-..."},{id:"openai",label:"OpenAI",fieldKey:"openaiKey",fieldType:"key",placeholder:"sk-..."},{id:"google",label:"Google AI",fieldKey:"googleKey",fieldType:"key",placeholder:"AIza..."},{id:"groq",label:"Groq",fieldKey:"groqKey",fieldType:"key",placeholder:"gsk_..."},{id:"mistral",label:"Mistral",fieldKey:"mistralKey",fieldType:"key",placeholder:"API key"},{id:"openrouter",label:"OpenRouter",fieldKey:"openrouterKey",fieldType:"key",placeholder:"sk-or-..."},{id:"fireworks",label:"Fireworks AI",fieldKey:"fireworksKey",fieldType:"key",placeholder:"API key"},{id:"xai",label:"xAI (Grok)",fieldKey:"xaiKey",fieldType:"key",placeholder:"xai-..."},{id:"together",label:"Together AI",fieldKey:"togetherKey",fieldType:"key",placeholder:"API key"},{id:"deepseek",label:"DeepSeek",fieldKey:"deepseekKey",fieldType:"key",placeholder:"sk-..."},{id:"perplexity",label:"Perplexity",fieldKey:"perplexityKey",fieldType:"key",placeholder:"pplx-..."},{id:"ollama",label:"Ollama",fieldKey:"ollamaUrl",fieldType:"url",placeholder:"http://localhost:11434"}];function P({configured:a}){return e.jsxs("span",{className:`inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium ${a?"bg-success/10 text-success":"bg-border-light/20 text-text-muted"}`,children:[e.jsx("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${a?"bg-success":"bg-border-light"}`}),a?"Configured":"Not configured"]})}function M({provider:a,configured:b,currentUrl:o,onSave:p,saving:v}){const[f,y]=l.useState(!1),[c,d]=l.useState(a.fieldType==="url"&&o||""),[x,u]=l.useState(!1),h=a.fieldType==="key",i=v===a.id;return e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary",children:[e.jsxs("button",{onClick:()=>y(!f),className:"flex w-full items-center justify-between px-4 py-3 text-left",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[f?e.jsx(U,{className:"h-4 w-4 text-text-muted"}):e.jsx(q,{className:"h-4 w-4 text-text-muted"}),e.jsx("span",{className:"text-sm font-medium text-text",children:a.label})]}),e.jsx(P,{configured:b})]}),f&&e.jsxs("div",{className:"border-t border-bg-tertiary px-4 py-4 space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-text-muted",children:h?"API Key":"Base URL"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:`integration-${a.id}`,name:`integration-${a.id}`,type:h&&!x?"password":"text",value:c,onChange:j=>d(j.target.value),placeholder:a.placeholder,className:"w-full rounded-lg border border-border bg-bg px-3 py-2 pr-10 text-sm text-text outline-none focus:border-accent"}),h&&e.jsx("button",{type:"button",onClick:()=>u(!x),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-secondary",children:x?e.jsx(T,{className:"h-4 w-4"}):e.jsx(I,{className:"h-4 w-4"})})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs("button",{onClick:()=>p(a.fieldKey,c),disabled:i||!c,className:"flex items-center gap-2 rounded-lg bg-accent px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-accent/80 disabled:opacity-50",children:[e.jsx(O,{className:"h-3.5 w-3.5"}),i?"Saving...":"Save"]})})]})]})}function J(){const[a,b]=l.useState({}),[o,p]=l.useState({clientIdSet:!1,clientSecretSet:!1}),[v,f]=l.useState(!0),[y,c]=l.useState(null),[d,x]=l.useState(null),[u,h]=l.useState(""),[i,j]=l.useState(""),[N,G]=l.useState(!1);l.useEffect(()=>{(async()=>{var t;try{const n=await S();if(n.providers&&b(n.providers),(t=n.oauth)!=null&&t.google){const g=n.oauth.google;try{const r=await(await C("/api/auth/google/status")).json();g.connected=r.connected,g.email=r.email}catch{}p(g)}}catch{}finally{f(!1)}})()},[]);const E=()=>{window.location.href="/api/auth/google/start"},D=async()=>{try{await C("/api/auth/google/disconnect",{method:"POST"}),p(s=>({...s,connected:!1,email:void 0})),m("success","Google account disconnected")}catch{m("error","Failed to disconnect")}},m=(s,t)=>{x({type:s,message:t}),setTimeout(()=>x(null),3e3)},$=async(s,t)=>{var g,w;const n=((g=k.find(r=>r.fieldKey===s))==null?void 0:g.id)||s;c(n);try{await K({[s]:t});const r=await S();r.providers&&b(r.providers),m("success",`${((w=k.find(B=>B.fieldKey===s))==null?void 0:w.label)||"Provider"} saved`)}catch(r){m("error",r instanceof Error?r.message:"Failed to save")}finally{c(null)}},L=async()=>{var s;c("oauth");try{const t={};u&&(t.googleOAuthClientId=u),i&&(t.googleOAuthClientSecret=i),await K(t);const n=await S();(s=n.oauth)!=null&&s.google&&p(n.oauth.google),m("success","Google OAuth settings saved"),h(""),j("")}catch(t){m("error",t instanceof Error?t.message:"Failed to save")}finally{c(null)}};return v?e.jsx("div",{className:"space-y-4",children:Array.from({length:4}).map((s,t)=>e.jsx("div",{className:"h-14 animate-pulse rounded-xl border border-border bg-bg-secondary"},t))}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-accent/10",children:e.jsx(A,{className:"h-4 w-4 text-accent-hover"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-lg font-semibold text-text",children:"Integrations"}),e.jsx("p",{className:"text-xs text-text-muted",children:"Configure LLM providers and external service connections"})]})]}),d&&e.jsxs("div",{className:`flex items-center gap-2 rounded-lg border px-4 py-2 text-sm ${d.type==="success"?"border-success/50 text-success":"border-error/50 text-error"}`,children:[d.type==="success"?e.jsx(R,{className:"h-4 w-4"}):e.jsx(F,{className:"h-4 w-4"}),d.message]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:"LLM Providers"}),e.jsx("div",{className:"space-y-2",children:k.map(s=>{const t=a[s.id],n=s.id==="ollama"?!!(t!=null&&t.baseUrl):!!(t!=null&&t.configured);return e.jsx(M,{provider:s,configured:n,currentUrl:s.fieldType==="url"?(t==null?void 0:t.baseUrl)||"":void 0,onSave:$,saving:y},s.id)})})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:"Google Services (OAuth)"}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-text",children:"Google OAuth 2.0"}),e.jsx("p",{className:"text-xs text-text-muted mt-0.5",children:o.connected&&o.email?`Connected as ${o.email}`:"Gmail, Drive, Calendar, Docs, Sheets, Tasks"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(P,{configured:!!o.connected}),o.clientIdSet&&!o.connected&&e.jsxs("button",{onClick:E,className:"flex items-center gap-1.5 rounded-lg bg-accent px-3 py-1.5 text-xs font-medium text-white hover:bg-accent/80 transition-colors",children:[e.jsx(A,{className:"h-3.5 w-3.5"}),"Connect Google"]}),o.connected&&e.jsx("button",{onClick:D,className:"flex items-center gap-1.5 rounded-lg border border-red-500/30 px-3 py-1.5 text-xs font-medium text-red-400 hover:bg-red-500/10 transition-colors",children:"Disconnect"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-text-muted",children:"Client ID"}),e.jsx("input",{id:"integration-google-client-id",name:"integration-google-client-id",type:"text",value:u,onChange:s=>h(s.target.value),placeholder:o.clientIdSet?"(configured)":"your-client-id.apps.googleusercontent.com",className:"w-full rounded-lg border border-border bg-bg px-3 py-2 text-sm text-text outline-none focus:border-accent"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-text-muted",children:"Client Secret"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:"integration-google-client-secret",name:"integration-google-client-secret",type:N?"text":"password",value:i,onChange:s=>j(s.target.value),placeholder:o.clientSecretSet?"(configured)":"GOCSPX-...",className:"w-full rounded-lg border border-border bg-bg px-3 py-2 pr-10 text-sm text-text outline-none focus:border-accent"}),e.jsx("button",{type:"button",onClick:()=>G(!N),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-secondary",children:N?e.jsx(T,{className:"h-4 w-4"}):e.jsx(I,{className:"h-4 w-4"})})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs("button",{onClick:L,disabled:y==="oauth"||!u&&!i,className:"flex items-center gap-2 rounded-lg bg-accent px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-accent/80 disabled:opacity-50",children:[e.jsx(O,{className:"h-3.5 w-3.5"}),y==="oauth"?"Saving...":"Save OAuth Settings"]})})]})]})]})}export{J as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AutopilotPanel-AhNEPP_2.js","assets/index-CgHHe41p.js","assets/index-CtD9JOx2.css","assets/PageHeader-CwcMp_4A.js","assets/chevron-right-CA8HOEP4.js","assets/WorkflowsPanel-BlB2iBik.js","assets/Input-BGGQDAyP.js","assets/clsx-B-dksMZM.js","assets/InlineEditableField-Car7F635.js","assets/check-BJMHM0tu.js","assets/pencil-C6SVDEUL.js","assets/refresh-cw-_C-4Cd_3.js","assets/plus-CJKkM9fM.js","assets/play-D3Nbm1Cz.js","assets/pause-CovS6Xwq.js","assets/trash-2-kiHv5iAF.js","assets/clock-BFgCJnqQ.js","assets/toggle-right-B3Qz7cQt.js","assets/book-open-B00IpKZA.js","assets/LearningPanel-CGENRFnq.js","assets/lightbulb-CPhcUxli.js","assets/TitanCanvas-Da6TxxdJ.js","assets/chevron-up-n_3KVmjQ.js","assets/file-text-CyC_OxlA.js","assets/server-CvEvPDpX.js","assets/network-C_MOo5My.js","assets/terminal-BVErXh5C.js","assets/save-B02XWwgN.js","assets/rotate-ccw-DWyVAH19.js","assets/search-CHteSk-9.js","assets/send-DkMQeZAz.js","assets/message-square-WJp1dTaM.js","assets/mic-DjXDp1Js.js","assets/flask-conical-BKbKUYhz.js","assets/archive-aaQ0bgj_.js","assets/radio-BTFO9FV9.js","assets/test-tube-JSgqEqJs.js","assets/VoiceOverlay-D_jfyVe9.js","assets/volume-2-CELMZXsT.js","assets/folder-7bWz46dM.js","assets/shield-check-DQeYCvwF.js","assets/external-link-CPAx2HBG.js","assets/bot-C4CRICZX.js","assets/wifi-off-DKKYhVWL.js","assets/chart-column-lnilxGq2.js","assets/link-CfLpUR24.js","assets/TitanCanvas-BfitWg9R.css","assets/trending-up-xhvUQXWt.js","assets/MemoryGraphPanel-FQxiv5x5.js","assets/SelfImprovePanel-D5s-1XCU.js","assets/circle-check-big-hiNdH5H3.js","assets/trophy-G3zNxlQS.js","assets/PersonasPanel-DSP0tTKz.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as o,j as e,_ as t}from"./index-CgHHe41p.js";import{c as a}from"./clsx-B-dksMZM.js";const i=o.lazy(()=>t(()=>import("./AutopilotPanel-AhNEPP_2.js"),__vite__mapDeps([0,1,2,3,4]))),n=o.lazy(()=>t(()=>import("./WorkflowsPanel-BlB2iBik.js"),__vite__mapDeps([5,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18]))),d=o.lazy(()=>t(()=>import("./LearningPanel-CGENRFnq.js"),__vite__mapDeps([19,1,2,3,4,11,18,20,21,22,12,23,24,25,26,27,10,28,29,30,31,32,33,16,34,35,36,37,38,39,9,40,41,42,43,44,45,15,46,47]))),c=o.lazy(()=>t(()=>import("./MemoryGraphPanel-FQxiv5x5.js"),__vite__mapDeps([48,1,2,25,11,15,29]))),m=o.lazy(()=>t(()=>import("./SelfImprovePanel-D5s-1XCU.js"),__vite__mapDeps([49,1,2,11,50,16,51,47,42,4,13,26,35,15]))),x=o.lazy(()=>t(()=>import("./PersonasPanel-DSP0tTKz.js"),__vite__mapDeps([52,1,2]))),p=[{id:"autopilot",label:"Autopilot"},{id:"workflows",label:"Workflows"},{id:"learning",label:"Learning"},{id:"memory",label:"Memory & Graph"},{id:"self-improve",label:"Self-Improve"},{id:"personas",label:"Personas"}];function f(){const[l,r]=o.useState("autopilot");return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"shrink-0 px-5 pt-4 pb-0",children:[e.jsx("h1",{className:"text-sm font-semibold text-text mb-3",children:"Intelligence"}),e.jsx("div",{className:"flex items-center gap-0.5 border-b border-border/50",children:p.map(s=>e.jsxs("button",{onClick:()=>r(s.id),className:a("px-3 py-2 text-xs font-medium transition-colors relative",l===s.id?"text-accent":"text-text-muted hover:text-text-secondary"),children:[s.label,l===s.id&&e.jsx("div",{className:"absolute bottom-0 left-1 right-1 h-[2px] bg-accent rounded-full"})]},s.id))})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto p-5",children:e.jsxs(o.Suspense,{fallback:e.jsx("div",{className:"skeleton-shimmer h-40 rounded-lg"}),children:[l==="autopilot"&&e.jsx(i,{}),l==="workflows"&&e.jsx(n,{}),l==="learning"&&e.jsx(d,{}),l==="memory"&&e.jsx(c,{}),l==="self-improve"&&e.jsx(m,{}),l==="personas"&&e.jsx(x,{})]})})]})}export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,aQ as v,j as e}from"./index-CgHHe41p.js";import{R as j}from"./refresh-cw-_C-4Cd_3.js";const x={debug:"bg-text-muted/20 text-text-secondary",info:"bg-info/20 text-info",warn:"bg-warning/20 text-warning",warning:"bg-warning/20 text-warning",error:"bg-error/20 text-error"};function w(){const[c,u]=r.useState([]),[g,m]=r.useState(!0),[i,d]=r.useState(null),[a,b]=r.useState(""),[o,h]=r.useState(100),[l,p]=r.useState(!1),s=r.useRef(null),n=r.useCallback(async()=>{try{const t=await v(a||void 0,o);u(t),d(null)}catch(t){d(t instanceof Error?t.message:"Failed to fetch logs")}finally{m(!1)}},[a,o]);return r.useEffect(()=>{n()},[n]),r.useEffect(()=>(l?s.current=setInterval(n,5e3):s.current&&(clearInterval(s.current),s.current=null),()=>{s.current&&clearInterval(s.current)}),[l,n]),g?e.jsx("div",{className:"h-96 animate-pulse rounded-xl border border-border bg-bg-secondary"}):e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-lg font-semibold text-text",children:"Logs"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("select",{value:a,onChange:t=>b(t.target.value),className:"rounded-lg border border-border bg-bg px-3 py-2 text-sm text-text outline-none focus:border-accent",children:[e.jsx("option",{value:"",children:"All levels"}),e.jsx("option",{value:"debug",children:"Debug"}),e.jsx("option",{value:"info",children:"Info"}),e.jsx("option",{value:"warn",children:"Warn"}),e.jsx("option",{value:"error",children:"Error"})]}),e.jsxs("select",{value:o,onChange:t=>h(Number(t.target.value)),className:"rounded-lg border border-border bg-bg px-3 py-2 text-sm text-text outline-none focus:border-accent",children:[e.jsx("option",{value:50,children:"50 entries"}),e.jsx("option",{value:100,children:"100 entries"}),e.jsx("option",{value:200,children:"200 entries"})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[e.jsx("input",{type:"checkbox",checked:l,onChange:t=>p(t.target.checked),className:"h-4 w-4 rounded border-border accent-accent"}),"Auto-refresh (5s)"]}),e.jsx("button",{onClick:n,className:"ml-auto rounded-lg p-2 text-text-secondary transition-colors hover:bg-bg-tertiary hover:text-text",title:"Refresh",children:e.jsx(j,{className:"h-4 w-4"})})]}),i&&e.jsx("div",{className:"rounded-lg border border-error/50 bg-bg-secondary px-4 py-2 text-sm text-error",children:i}),e.jsx("div",{className:"max-h-[600px] overflow-y-auto rounded-xl border border-border bg-bg-secondary",children:c.length===0?e.jsx("p",{className:"px-4 py-12 text-center text-text-muted",children:"No logs found"}):e.jsx("div",{className:"divide-y divide-border",children:c.map((t,f)=>e.jsxs("div",{className:"flex items-start gap-3 px-4 py-2.5",children:[e.jsx("span",{className:"shrink-0 font-mono text-xs text-text-muted",children:new Date(t.timestamp).toLocaleTimeString()}),e.jsx("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-xs font-medium uppercase ${x[t.level]??x.debug}`,children:t.level}),e.jsx("span",{className:"min-w-0 break-all text-sm text-text",children:t.message})]},f))})})]})}export{w as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as d,j as e,G as k,ah as z,ai as $,aj as b,ak as R,al as I,am as E}from"./index-CgHHe41p.js";import{P as h}from"./plug-Dpu9RRBi.js";import{R as D}from"./refresh-cw-_C-4Cd_3.js";import{P as L}from"./plus-CJKkM9fM.js";import{S as g}from"./server-CvEvPDpX.js";import{T as G,P as B}from"./test-tube-JSgqEqJs.js";import{T as F}from"./trash-2-kiHv5iAF.js";function O(){const[o,j]=d.useState([]),[N,y]=d.useState([]),[f,x]=d.useState(!0),[m,c]=d.useState(!1),[v,p]=d.useState(null),[l,i]=d.useState(null),[s,a]=d.useState({id:"",name:"",description:"",type:"stdio",command:"",args:"",url:""}),n=async()=>{x(!0);try{const[t,r]=await Promise.all([z(),$()]);j(t),y(r)}catch{}x(!1)};d.useEffect(()=>{n()},[]);const C=async()=>{try{await b({id:s.id,name:s.name,description:s.description,type:s.type,...s.type==="stdio"?{command:s.command,args:s.args.split(/\s+/).filter(Boolean)}:{url:s.url}}),c(!1),a({id:"",name:"",description:"",type:"stdio",command:"",args:"",url:""}),n()}catch(t){alert(t.message)}},P=async t=>{try{await b({presetId:t}),n()}catch(r){alert(r.message)}},w=async t=>{confirm(`Remove MCP server "${t}"?`)&&(await E(t),n())},M=async(t,r)=>{await I(t,r),n()},T=async t=>{p(t),i(null);try{const r=await R(t);i({id:t,...r})}catch(r){i({id:t,ok:!1,tools:0,error:r.message})}p(null)},S=t=>t==="connected"?"text-[var(--success)]":t==="error"?"text-[var(--error)]":"text-[var(--text-muted)]",A=t=>t==="connected"?"bg-[var(--success)]":t==="error"?"bg-[var(--error)]":"bg-[var(--text-muted)]",u=N.filter(t=>!o.some(r=>r.id===t.id));return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(h,{className:"w-6 h-6 text-[var(--accent)]"}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl font-bold text-[var(--text)]",children:"MCP Connections"}),e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Connect to external tools via Model Context Protocol"})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:n,className:"px-3 py-1.5 text-sm rounded-md border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors",children:e.jsx(D,{size:14})}),e.jsxs("button",{onClick:()=>c(!m),className:"flex items-center gap-2 px-3 py-1.5 text-sm rounded-md bg-[var(--accent)] text-white hover:bg-[var(--accent-hover)] transition-colors",children:[e.jsx(L,{size:14})," Add Server"]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Configured Servers"}),e.jsx("p",{className:"text-2xl font-bold text-[var(--text)]",children:o.length})]}),e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Connected"}),e.jsx("p",{className:"text-2xl font-bold text-[var(--success)]",children:o.filter(t=>t.status==="connected").length})]}),e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"External Tools"}),e.jsx("p",{className:"text-2xl font-bold text-[var(--accent)]",children:o.reduce((t,r)=>t+r.toolCount,0)})]})]}),m&&e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4 space-y-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text)]",children:"Add MCP Server"}),u.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)] mb-2",children:"Quick Add Presets"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:u.map(t=>e.jsxs("button",{onClick:()=>P(t.id),className:"flex items-center gap-2 px-3 py-1.5 text-xs rounded-md border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors",children:[e.jsx(g,{size:12})," ",t.name]},t.id))})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"ID"}),e.jsx("input",{id:"mcp-server-id",name:"mcp-server-id",value:s.id,onChange:t=>a({...s,id:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"my-server"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Name"}),e.jsx("input",{id:"mcp-server-name",name:"mcp-server-name",value:s.name,onChange:t=>a({...s,name:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"My MCP Server"})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Description"}),e.jsx("input",{id:"mcp-server-description",name:"mcp-server-description",value:s.description,onChange:t=>a({...s,description:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"What does this server do?"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Type"}),e.jsxs("select",{id:"mcp-server-type",name:"mcp-server-type",value:s.type,onChange:t=>a({...s,type:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",children:[e.jsx("option",{value:"stdio",children:"stdio (local process)"}),e.jsx("option",{value:"http",children:"HTTP (remote server)"})]})]}),s.type==="stdio"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Command"}),e.jsx("input",{id:"mcp-server-command",name:"mcp-server-command",value:s.command,onChange:t=>a({...s,command:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"npx @modelcontextprotocol/server-xxx"})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Arguments (space-separated)"}),e.jsx("input",{id:"mcp-server-args",name:"mcp-server-args",value:s.args,onChange:t=>a({...s,args:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"--port 3000"})]})]}):e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Server URL"}),e.jsx("input",{id:"mcp-server-url",name:"mcp-server-url",value:s.url,onChange:t=>a({...s,url:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"http://localhost:3000/mcp"})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:C,disabled:!s.id||!s.name,className:"px-4 py-1.5 text-sm rounded-md bg-[var(--accent)] text-white hover:bg-[var(--accent-hover)] disabled:opacity-40 transition-colors",children:"Add Server"}),e.jsx("button",{onClick:()=>c(!1),className:"px-4 py-1.5 text-sm rounded-md border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors",children:"Cancel"})]})]}),f?e.jsx("div",{className:"text-[var(--text-muted)] text-sm",children:"Loading MCP servers..."}):o.length===0?e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-8 text-center",children:[e.jsx(h,{className:"w-10 h-10 text-[var(--text-muted)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--text-secondary)] mb-1",children:"No MCP servers configured"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"Add an MCP server to connect TITAN to external tools like databases, APIs, and services."})]}):e.jsx("div",{className:"space-y-3",children:o.map(t=>e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-0.5",children:t.type==="stdio"?e.jsx(g,{size:18,className:"text-[var(--text-muted)]"}):e.jsx(k,{size:18,className:"text-[var(--text-muted)]"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-[var(--text)]",children:t.name}),e.jsxs("span",{className:"flex items-center gap-1.5 text-xs",children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${A(t.status)}`}),e.jsx("span",{className:S(t.status),children:t.status})]}),t.toolCount>0&&e.jsxs("span",{className:"text-xs px-1.5 py-0.5 rounded bg-[var(--accent)]/10 text-[var(--accent)]",children:[t.toolCount," tools"]})]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)] mt-0.5",children:t.description}),e.jsx("p",{className:"text-xs text-[var(--text-muted)] mt-1 font-mono",children:t.type==="stdio"?`${t.command} ${(t.args||[]).join(" ")}`:t.url})]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>T(t.id),disabled:v===t.id,title:"Test connection",className:"p-1.5 rounded-md text-[var(--text-muted)] hover:text-[var(--text)] hover:bg-[var(--bg-tertiary)] transition-colors disabled:opacity-40",children:e.jsx(G,{size:14,className:v===t.id?"animate-pulse":""})}),e.jsx("button",{onClick:()=>M(t.id,!t.enabled),title:t.enabled?"Disable":"Enable",className:`p-1.5 rounded-md transition-colors hover:bg-[var(--bg-tertiary)] ${t.enabled?"text-[var(--success)]":"text-[var(--text-muted)]"}`,children:e.jsx(B,{size:14})}),e.jsx("button",{onClick:()=>w(t.id),title:"Remove",className:"p-1.5 rounded-md text-[var(--text-muted)] hover:text-[var(--error)] hover:bg-[var(--bg-tertiary)] transition-colors",children:e.jsx(F,{size:14})})]})]}),(l==null?void 0:l.id)===t.id&&e.jsx("div",{className:`mt-3 px-3 py-2 rounded-md text-xs ${l.ok?"bg-emerald-500/10 text-emerald-400 border border-emerald-500/20":"bg-red-500/10 text-red-400 border border-red-500/20"}`,children:l.ok?`Connected successfully — ${l.tools} tools discovered`:`Connection failed: ${l.error}`})]},t.id))}),e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text)] mb-2",children:"About MCP"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)] leading-relaxed",children:["Model Context Protocol (MCP) is the universal standard for connecting AI agents to external tools. TITAN acts as both an MCP ",e.jsx("strong",{className:"text-[var(--text-secondary)]",children:"server"})," (exposing its tools to other agents) and an MCP ",e.jsx("strong",{className:"text-[var(--text-secondary)]",children:"client"})," (connecting to external MCP servers). Add any MCP-compatible server and its tools automatically become available in TITAN."]})]})]})}export{O as default};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{c as l,r as n,j as e,ar as y,as as j,at as N,au as f,av as k}from"./index-CgHHe41p.js";import{D as v}from"./DataTable-CrBYCT2O.js";import{R as w}from"./refresh-cw-_C-4Cd_3.js";import{S as P}from"./shield-check-DQeYCvwF.js";/**
|
|
2
|
-
* @license lucide-react v0.513.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const C=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]],R=l("shield-x",C);/**
|
|
7
|
-
* @license lucide-react v0.513.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const S=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],E=l("unplug",S);function _(){const[d,i]=n.useState([]),[o,x]=n.useState([]),[m,h]=n.useState(!0),[c,a]=n.useState(null),r=async()=>{try{const[s,t]=await Promise.all([y(),j()]);i(s),x(t),a(null)}catch(s){a(s instanceof Error?s.message:"Failed to fetch mesh data")}finally{h(!1)}};n.useEffect(()=>{r()},[]);const p=async s=>{try{await N(s),await r()}catch(t){a(t instanceof Error?t.message:"Failed to approve peer")}},g=async s=>{try{await f(s),await r()}catch(t){a(t instanceof Error?t.message:"Failed to reject peer")}},u=async s=>{try{await k(s),await r()}catch(t){a(t instanceof Error?t.message:"Failed to revoke peer")}},b=[{key:"nodeId",header:"Node ID",render:s=>e.jsx("span",{className:"font-mono text-xs",children:s.nodeId})},{key:"url",header:"URL"},{key:"status",header:"Status",render:s=>e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-success"}),e.jsx("span",{className:"capitalize",children:s.status})]})},{key:"connectedAt",header:"Connected At",render:s=>s.connectedAt?e.jsx("span",{children:new Date(s.connectedAt).toLocaleString()}):e.jsx("span",{className:"text-text-muted",children:"-"})},{key:"_actions",header:"",className:"w-16",render:s=>e.jsx("button",{onClick:t=>{t.stopPropagation(),u(s.id)},className:"rounded-md p-1.5 text-error transition-colors hover:bg-bg-tertiary",title:"Revoke peer",children:e.jsx(E,{className:"h-4 w-4"})})}];return m?e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"h-32 animate-pulse rounded-xl border border-border bg-bg-secondary"}),e.jsx("div",{className:"h-48 animate-pulse rounded-xl border border-border bg-bg-secondary"})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-lg font-semibold text-text",children:"Mesh Network"}),e.jsx("button",{onClick:r,className:"rounded-lg p-2 text-text-secondary transition-colors hover:bg-bg-tertiary hover:text-text",title:"Refresh",children:e.jsx(w,{className:"h-4 w-4"})})]}),c&&e.jsx("div",{className:"rounded-lg border border-error/50 bg-bg-secondary px-4 py-2 text-sm text-error",children:c}),e.jsxs("div",{children:[e.jsxs("h3",{className:"mb-3 text-sm font-medium text-text-secondary",children:["Pending Requests (",o.length,")"]}),o.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-bg-secondary p-6 text-center text-text-muted",children:"No pending requests"}):e.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:o.map(s=>e.jsxs("div",{className:"rounded-xl border border-border bg-bg-secondary p-4",children:[e.jsx("p",{className:"font-mono text-sm text-text",children:s.nodeId}),e.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:s.url}),s.name&&e.jsx("p",{className:"mt-1 text-xs text-text-muted",children:s.name}),e.jsxs("div",{className:"mt-3 flex gap-2",children:[e.jsxs("button",{onClick:()=>p(s.id),className:"flex items-center gap-1.5 rounded-lg bg-success px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-success/80",children:[e.jsx(P,{className:"h-3.5 w-3.5"}),"Approve"]}),e.jsxs("button",{onClick:()=>g(s.id),className:"flex items-center gap-1.5 rounded-lg bg-error px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-error/80",children:[e.jsx(R,{className:"h-3.5 w-3.5"}),"Reject"]})]})]},s.id))})]}),e.jsxs("div",{children:[e.jsxs("h3",{className:"mb-3 text-sm font-medium text-text-secondary",children:["Connected Peers (",d.length,")"]}),e.jsx(v,{columns:b,data:d,emptyMessage:"No connected peers"})]})]})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,b as y,j as e,C as U,i as K,Z as O,A as B,h as E,a8 as G,a9 as T,an as D,E as L}from"./index-CgHHe41p.js";import{R as V}from"./refresh-cw-_C-4Cd_3.js";import{S as $}from"./save-B02XWwgN.js";import{C as M}from"./circle-check-big-hiNdH5H3.js";import{E as F}from"./external-link-CPAx2HBG.js";import{S as H}from"./search-CHteSk-9.js";const _={enabled:!1,apiKey:"",cuopt:{enabled:!1,url:"http://localhost:5000"},asr:{enabled:!1,grpcUrl:"localhost:50051",healthUrl:"http://localhost:9000"},openshell:{enabled:!1,binaryPath:"openshell",policyPath:""}};function v({status:s}){const l={unknown:"bg-border-light",checking:"bg-[#eab308] animate-pulse",healthy:"bg-success",unhealthy:"bg-error"},d={unknown:"Not checked",checking:"Checking...",healthy:"Healthy",unhealthy:"Unreachable"};return e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-text-muted",children:[e.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${l[s]}`}),d[s]]})}function f({title:s,description:l,icon:d,enabled:r,onToggle:h,children:p}){return e.jsxs("div",{className:`rounded-xl border bg-bg-secondary transition-colors ${r?"border-[#76b900]/30":"border-bg-tertiary"}`,children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`flex h-9 w-9 items-center justify-center rounded-lg ${r?"bg-nvidia/15":"bg-bg-tertiary"}`,children:e.jsx(d,{className:`h-4.5 w-4.5 ${r?"text-nvidia":"text-text-muted"}`})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-text",children:s}),e.jsx("p",{className:"text-xs text-text-muted mt-0.5",children:l})]})]}),e.jsx("button",{onClick:h,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${r?"bg-nvidia":"bg-border"}`,children:e.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white transition-transform ${r?"translate-x-6":"translate-x-1"}`})})]}),r&&e.jsx("div",{className:"border-t border-bg-tertiary px-5 py-4 space-y-3",children:p})]})}function u({id:s,label:l,value:d,onChange:r,placeholder:h,type:p="text",secret:x=!1}){const[m,b]=o.useState(!1);return e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-text-muted",children:l}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:s,name:s,type:x&&!m?"password":p,value:d,onChange:n=>r(n.target.value),placeholder:h,className:"w-full rounded-lg border border-border bg-bg px-3 py-2 pr-10 text-sm text-text outline-none focus:border-[#76b900] transition-colors"}),x&&e.jsx("button",{type:"button",onClick:()=>b(!m),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-secondary",children:m?e.jsx(D,{className:"h-4 w-4"}):e.jsx(L,{className:"h-4 w-4"})})]})]})}function J(){const[s,l]=o.useState(_),[d,r]=o.useState(!0),[h,p]=o.useState(!1),[x,m]=o.useState(null),[b,n]=o.useState({cuopt:"unknown",asr:"unknown",nim:"unknown"}),[g,j]=o.useState(!1),N=o.useCallback((t,a)=>{m({type:t,message:a}),setTimeout(()=>m(null),3e3)},[]);o.useEffect(()=>{(async()=>{var a,c,w,S,k,A,I,C;try{const i=await G();i.nvidia&&(l({enabled:i.nvidia.enabled??!1,apiKey:"",cuopt:{enabled:((a=i.nvidia.cuopt)==null?void 0:a.enabled)??!1,url:((c=i.nvidia.cuopt)==null?void 0:c.url)??"http://localhost:5000"},asr:{enabled:((w=i.nvidia.asr)==null?void 0:w.enabled)??!1,grpcUrl:((S=i.nvidia.asr)==null?void 0:S.grpcUrl)??"localhost:50051",healthUrl:((k=i.nvidia.asr)==null?void 0:k.healthUrl)??"http://localhost:9000"},openshell:{enabled:((A=i.nvidia.openshell)==null?void 0:A.enabled)??!1,binaryPath:((I=i.nvidia.openshell)==null?void 0:I.binaryPath)??"openshell",policyPath:((C=i.nvidia.openshell)==null?void 0:C.policyPath)??""}}),j(i.nvidia.apiKeySet??!1))}catch{}finally{r(!1)}})()},[]);const P=o.useCallback(async()=>{if(s.cuopt.enabled){n(t=>({...t,cuopt:"checking"}));try{const a=await(await y("/api/nvidia/health/cuopt")).json();n(c=>({...c,cuopt:a.healthy?"healthy":"unhealthy"}))}catch{n(t=>({...t,cuopt:"unhealthy"}))}}if(s.asr.enabled){n(t=>({...t,asr:"checking"}));try{const a=await(await y("/api/nvidia/health/asr")).json();n(c=>({...c,asr:a.healthy?"healthy":"unhealthy"}))}catch{n(t=>({...t,asr:"unhealthy"}))}}if(g||s.apiKey){n(t=>({...t,nim:"checking"}));try{const a=await(await y("/api/nvidia/health/nim")).json();n(c=>({...c,nim:a.healthy?"healthy":"unhealthy"}))}catch{n(t=>({...t,nim:"unhealthy"}))}}},[s.cuopt.enabled,s.asr.enabled,g,s.apiKey]),R=async()=>{p(!0);try{const t={nvidia:{enabled:s.enabled,cuopt:s.cuopt,asr:s.asr,openshell:s.openshell}};s.apiKey&&(t.nvidia.apiKey=s.apiKey),await T(t),N("success","NVIDIA configuration saved"),s.apiKey&&(j(!0),l(a=>({...a,apiKey:""})))}catch(t){N("error",t instanceof Error?t.message:"Failed to save")}finally{p(!1)}};return d?e.jsx("div",{className:"space-y-4",children:Array.from({length:4}).map((t,a)=>e.jsx("div",{className:"h-20 animate-pulse rounded-xl border border-border bg-bg-secondary"},a))}):e.jsxs("div",{className:"space-y-6 max-w-3xl",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-nvidia/15",children:e.jsx(U,{className:"h-5 w-5 text-nvidia"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-lg font-semibold text-text",children:"NVIDIA"}),e.jsx("p",{className:"text-xs text-text-muted",children:"GPU-accelerated AI services — NIM, cuOpt, Nemotron-ASR, OpenShell"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:P,className:"flex items-center gap-1.5 rounded-lg border border-border px-3 py-1.5 text-xs text-text-secondary hover:bg-bg-tertiary transition-colors",children:[e.jsx(V,{className:"h-3.5 w-3.5"}),"Check Health"]}),e.jsxs("button",{onClick:R,disabled:h,className:"flex items-center gap-2 rounded-lg bg-nvidia px-4 py-1.5 text-xs font-medium text-black transition-colors hover:bg-nvidia/80 disabled:opacity-50",children:[e.jsx($,{className:"h-3.5 w-3.5"}),h?"Saving...":"Save"]})]})]}),x&&e.jsxs("div",{className:`flex items-center gap-2 rounded-lg border px-4 py-2 text-sm ${x.type==="success"?"border-success/50 text-success":"border-error/50 text-error"}`,children:[x.type==="success"?e.jsx(M,{className:"h-4 w-4"}):e.jsx(K,{className:"h-4 w-4"}),x.message]}),e.jsx("div",{className:`rounded-xl border p-5 transition-colors ${s.enabled?"border-[#76b900]/30 bg-nvidia/5":"border-bg-tertiary bg-bg-secondary"}`,children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-medium text-text",children:"Enable NVIDIA Skills"}),e.jsxs("p",{className:"text-xs text-text-muted mt-0.5",children:["Load NVIDIA GPU-accelerated skills (cuOpt, AI-Q Research, etc.) when TITAN starts. Equivalent to setting ",e.jsx("code",{className:"text-nvidia/70 bg-nvidia/10 px-1 rounded",children:"TITAN_NVIDIA=1"})]})]}),e.jsx("button",{onClick:()=>l(t=>({...t,enabled:!t.enabled})),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${s.enabled?"bg-nvidia":"bg-border"}`,children:e.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white transition-transform ${s.enabled?"translate-x-6":"translate-x-1"}`})})]})}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-5 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(O,{className:"h-4 w-4 text-nvidia"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-text",children:"NVIDIA NIM API"}),e.jsx("p",{className:"text-xs text-text-muted mt-0.5",children:"Cloud inference for Nemotron 3 Super and other NIM models"})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(v,{status:b.nim}),g&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-success/10 px-2.5 py-0.5 text-xs font-medium text-success",children:[e.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-success"}),"Key configured"]})]})]}),e.jsx(u,{id:"nvidia-api-key",label:"API Key",value:s.apiKey,onChange:t=>l(a=>({...a,apiKey:t})),placeholder:g?"(configured — enter new key to replace)":"nvapi-...",secret:!0}),e.jsxs("p",{className:"text-[10px] text-text-muted",children:["Get your key at"," ",e.jsxs("a",{href:"https://build.nvidia.com",target:"_blank",rel:"noopener noreferrer",className:"text-nvidia hover:underline inline-flex items-center gap-0.5",children:["build.nvidia.com ",e.jsx(F,{className:"h-2.5 w-2.5"})]})]})]}),e.jsxs(f,{title:"cuOpt Optimization",description:"GPU-accelerated routing, scheduling, and mathematical programming (MILP/LP/QP)",icon:B,enabled:s.cuopt.enabled,onToggle:()=>l(t=>({...t,cuopt:{...t.cuopt,enabled:!t.cuopt.enabled}})),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Service Status"}),e.jsx(v,{status:b.cuopt})]}),e.jsx(u,{id:"nvidia-cuopt-url",label:"cuOpt Server URL",value:s.cuopt.url,onChange:t=>l(a=>({...a,cuopt:{...a.cuopt,url:t}})),placeholder:"http://localhost:5000"}),e.jsxs("p",{className:"text-[10px] text-text-muted",children:["Start cuOpt: ",e.jsx("code",{className:"bg-bg-tertiary px-1.5 py-0.5 rounded text-text-secondary",children:"docker compose -f docker-compose.nvidia.yml --profile cuopt up -d"})]})]}),e.jsxs(f,{title:"Nemotron-ASR Streaming",description:"NVIDIA speech recognition with 24ms median finalization — replaces faster-whisper for voice chat",icon:H,enabled:s.asr.enabled,onToggle:()=>l(t=>({...t,asr:{...t.asr,enabled:!t.asr.enabled}})),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Service Status"}),e.jsx(v,{status:b.asr})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(u,{id:"nvidia-asr-grpc-url",label:"gRPC Address",value:s.asr.grpcUrl,onChange:t=>l(a=>({...a,asr:{...a.asr,grpcUrl:t}})),placeholder:"localhost:50051"}),e.jsx(u,{id:"nvidia-asr-health-url",label:"Health Check URL",value:s.asr.healthUrl,onChange:t=>l(a=>({...a,asr:{...a.asr,healthUrl:t}})),placeholder:"http://localhost:9000"})]}),e.jsxs("p",{className:"text-[10px] text-text-muted",children:["Start ASR: ",e.jsx("code",{className:"bg-bg-tertiary px-1.5 py-0.5 rounded text-text-secondary",children:"docker compose -f docker-compose.nvidia.yml --profile asr up -d"})]}),e.jsxs("p",{className:"text-[10px] text-text-muted",children:["VRAM: ~3-4 GB. Set ",e.jsx("code",{className:"bg-bg-tertiary px-1 rounded text-text-secondary",children:"STT_ENGINE=nemotron-asr"})," in voice agent env."]})]}),e.jsxs(f,{title:"OpenShell Sandbox",description:"NVIDIA secure sandbox runtime for code execution with declarative policy enforcement",icon:E,enabled:s.openshell.enabled,onToggle:()=>l(t=>({...t,openshell:{...t.openshell,enabled:!t.openshell.enabled}})),children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(u,{id:"nvidia-openshell-binary-path",label:"Binary Path",value:s.openshell.binaryPath,onChange:t=>l(a=>({...a,openshell:{...a.openshell,binaryPath:t}})),placeholder:"openshell"}),e.jsx(u,{id:"nvidia-openshell-policy-path",label:"Policy File Path (optional)",value:s.openshell.policyPath,onChange:t=>l(a=>({...a,openshell:{...a.openshell,policyPath:t}})),placeholder:"Auto-detected"})]}),e.jsxs("p",{className:"text-[10px] text-text-muted",children:["When enabled, code execution uses OpenShell instead of Docker. Set ",e.jsx("code",{className:"bg-bg-tertiary px-1 rounded text-text-secondary",children:'sandbox.engine: "openshell"'})," in config."]})]}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-5",children:[e.jsx("h3",{className:"text-sm font-medium text-text mb-3",children:"VRAM Budget (RTX 5090, 32 GB)"}),e.jsxs("div",{className:"space-y-2",children:[[{label:"Nemotron 3 Nano 30B",vram:"~24 GB",note:"Full local inference"},{label:"Nemotron 3 Nano 4B",vram:"~3 GB",note:"Lightweight variant"},{label:"Nemotron-ASR",vram:"~3-4 GB",note:"Speech recognition"},{label:"cuOpt",vram:"~2-4 GB",note:"Optimization solver"}].map(({label:t,vram:a,note:c})=>e.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-text",children:t}),e.jsx("span",{className:"text-[10px] text-text-muted ml-2",children:c})]}),e.jsx("span",{className:"text-xs font-mono text-nvidia",children:a})]},t)),e.jsx("div",{className:"border-t border-bg-tertiary pt-2 mt-2",children:e.jsx("p",{className:"text-[10px] text-text-muted",children:"Recommended: Nano 4B + ASR + cuOpt = ~10 GB, leaving room for other models. Or use NIM cloud API for LLM inference (0 GB local)."})})]})]}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-5",children:[e.jsx("h3",{className:"text-sm font-medium text-text mb-2",children:"Quick Start"}),e.jsxs("div",{className:"space-y-2 text-xs text-text-muted",children:[e.jsx("p",{children:"Start all NVIDIA services:"}),e.jsx("code",{className:"block bg-bg border border-bg-tertiary rounded-lg px-3 py-2 text-text-secondary font-mono text-xs",children:"docker compose -f docker-compose.nvidia.yml --profile all up -d"}),e.jsx("p",{className:"mt-2",children:"Or start individual services:"}),e.jsxs("div",{className:"space-y-1 font-mono text-[10px] text-text-muted",children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-nvidia",children:"cuopt:"})," --profile cuopt"]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-nvidia",children:"asr:"})," --profile asr (includes Riva bridge)"]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-nvidia",children:"voice:"})," --profile voice (ASR + bridge)"]})]})]})]})]})}export{J as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,a8 as Je,b as p,j as e,B as Ve,A as he,i as We,C as Ge,W as He,V as I,S as be,Z as ge,l as Pe,a9 as Ke}from"./index-CgHHe41p.js";import{R as k}from"./refresh-cw-_C-4Cd_3.js";import{C as je}from"./circle-check-big-hiNdH5H3.js";import{C as Ue}from"./clock-BFgCJnqQ.js";import{T as Ze}from"./trophy-G3zNxlQS.js";import{T as fe}from"./trending-up-xhvUQXWt.js";import{B as ze}from"./bot-C4CRICZX.js";import{C as Q}from"./chevron-right-CA8HOEP4.js";import{P as ye}from"./play-D3Nbm1Cz.js";import{T as Xe}from"./terminal-BVErXh5C.js";import{R as Ye}from"./radio-BTFO9FV9.js";import{T as et}from"./trash-2-kiHv5iAF.js";const D={prompts:"System Prompts","tool-selection":"Tool Selection","response-quality":"Response Quality","error-recovery":"Error Recovery"},J=[{label:"Once daily (2am)",value:["0 2 * * *"]},{label:"Twice daily (2am + 2pm)",value:["0 2 * * *","0 14 * * *"]},{label:"Three times (2am + 10am + 6pm)",value:["0 2 * * *","0 10 * * *","0 18 * * *"]}];function Ne({status:j}){const B={running:"bg-info/10 text-info",completed:"bg-success/10 text-success",failed:"bg-error/10 text-error",training:"bg-warning/10 text-warning",deployed:"bg-purple/10 text-purple"},f={running:"bg-info",completed:"bg-success",failed:"bg-error",training:"bg-warning",deployed:"bg-purple"};return e.jsxs("span",{className:`inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium ${B[j]||"bg-border-light/20 text-text-muted"}`,children:[e.jsx("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${f[j]||"bg-border-light"}`}),j]})}function ut(){var me,ue;const[j,B]=a.useState(null),[f,ve]=a.useState([]),[V,we]=a.useState([]),[h,Se]=a.useState([]),[r,ke]=a.useState(null),[Ce,Re]=a.useState(!0),[C,W]=a.useState(null),[R,G]=a.useState(null),[A,_e]=a.useState(!1),[N,Te]=a.useState(!0),[i,H]=a.useState("tool_router"),[E,Me]=a.useState(!1),[u,v]=a.useState({baseModel:"unsloth/Qwen2.5-32B-bnb-4bit",loraRank:32,learningRate:1e-4,epochs:2,timeBudgetMin:60,maxSeqLength:2048}),[b,$e]=a.useState([]),[x,De]=a.useState(null),[P,K]=a.useState(!1),[U,Z]=a.useState(!1),[z,X]=a.useState(!1),[g,Y]=a.useState([]),[S,Be]=a.useState(!0),[Ae,_]=a.useState(!1),L=a.useRef(null),O=a.useRef(null),ee=a.useRef(null),[F,te]=a.useState(1),[T,se]=a.useState(30),[q,ae]=a.useState(120),[M,re]=a.useState(!1),[$,ne]=a.useState(!1),[le,ie]=a.useState([]),[xe,ce]=a.useState(0),m=a.useCallback((t,s)=>{G({type:t,message:s}),setTimeout(()=>G(null),3e3)},[]),y=a.useCallback(async()=>{try{const s=(await Je()).selfImprove||{};B(s),te(s.runsPerDay||1),se(s.budgetMinutes||30),ae(s.maxDailyBudgetMinutes||120),re(s.autoApply||!1),ne(s.pauseOnWeekends||!1),ie(s.areas||["prompts","tool-selection","response-quality","error-recovery"]);const c=s.schedule||["0 2 * * *"],o=J.findIndex(n=>JSON.stringify(n.value)===JSON.stringify(c));ce(o>=0?o:0);try{const n=await p("/api/self-improve/history");if(n.ok){const d=await n.json();ve(d.sessions||[])}}catch{}try{const n=await p("/api/training/runs");if(n.ok){const d=await n.json();we(d.runs||[])}}catch{}try{const[n,d]=await Promise.all([p("/api/autoresearch/results"),p("/api/autoresearch/performance")]);if(n.ok){const l=await n.json();Se(l.runs||[])}if(d.ok){const l=await d.json();ke(l)}}catch{}try{const[n,d]=await Promise.all([p("/api/autoresearch/results?type=agent"),p("/api/autoresearch/performance?type=agent")]);if(n.ok){const l=await n.json();$e(l.runs||[])}if(d.ok){const l=await d.json();De(l)}}catch{}}catch{}finally{Re(!1)}},[]);a.useEffect(()=>{y()},[y]),a.useEffect(()=>(N&&(L.current=setInterval(y,1e4)),()=>{L.current&&clearInterval(L.current)}),[N,y]),a.useEffect(()=>{const t=new EventSource("/api/training/stream");return ee.current=t,t.onopen=()=>_(!0),t.onerror=()=>_(!1),t.onmessage=s=>{try{const c=JSON.parse(s.data);if(c.type==="connected"){_(!0);return}Y(o=>{const n=[...o,c];return n.length>200?n.slice(-200):n})}catch{}},()=>{t.close(),ee.current=null,_(!1)}},[]),a.useEffect(()=>{O.current&&S&&O.current.scrollIntoView({behavior:"smooth"})},[g,S]);const Ee=a.useCallback(async()=>{try{await p("/api/training/progress",{method:"DELETE"}),Y([])}catch{}},[]),Le=async()=>{var t;try{await Ke({selfImprove:{runsPerDay:F,budgetMinutes:T,maxDailyBudgetMinutes:q,autoApply:M,pauseOnWeekends:$,areas:le,schedule:((t=J[xe])==null?void 0:t.value)||["0 2 * * *"]}}),m("success","Self-improvement settings saved"),await y()}catch(s){m("error",s instanceof Error?s.message:"Failed to save")}},de=async t=>{W(t);try{(await p("/api/message",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:`Run a self-improvement experiment on ${t} using self_improve_start with area="${t}" and budgetMinutes=${T}`,sessionId:"self-improve"})})).ok?(m("success",`Self-improvement started for ${D[t]||t}`),setTimeout(y,2e3)):m("error","Failed to start self-improvement")}catch(s){m("error",s instanceof Error?s.message:"Failed to start")}finally{W(null)}},Oe=t=>{ie(s=>s.includes(t)?s.filter(c=>c!==t):[...s,t])},Fe=async()=>{K(!0);try{(await p("/api/autoresearch/generate-data",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:i})})).ok?m("success",`Training data generation started for ${i==="main_agent"?"Main Agent":"Tool Router"}`):m("error","Failed to start data generation")}catch(t){m("error",t instanceof Error?t.message:"Failed")}finally{K(!1)}},qe=async()=>{Z(!0);try{(await p("/api/autoresearch/trigger",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:i,config:u})})).ok?m("success",`Training started for ${i==="main_agent"?"Main Agent":"Tool Router"}`):m("error","Failed to start training")}catch(t){m("error",t instanceof Error?t.message:"Failed")}finally{Z(!1)}},Ie=async()=>{X(!0);try{(await p("/api/autoresearch/deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:i})})).ok?m("success",`Model deployed as ${i==="main_agent"?"titan-agent":"titan-qwen"}`):m("error","Failed to deploy model")}catch(t){m("error",t instanceof Error?t.message:"Failed")}finally{X(!1)}};if(Ce)return e.jsx("div",{className:"space-y-4",children:Array.from({length:3}).map((t,s)=>e.jsx("div",{className:"h-20 animate-pulse rounded-xl border border-border bg-bg-secondary"},s))});const w=f.length,oe=w>0?(f.reduce((t,s)=>t+(s.bestScore-s.baselineScore),0)/w).toFixed(1):"0",Qe=w>0?(f.filter(t=>t.bestScore>t.baselineScore).length/w*100).toFixed(0):"0";return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-purple/10",children:e.jsx(Ve,{className:"h-4 w-4 text-purple-light"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-lg font-semibold text-text",children:"Self-Improvement"}),e.jsx("p",{className:"text-xs text-text-muted",children:"Autonomous optimization of prompts, tool selection, and response quality"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>Te(!N),className:`flex items-center gap-1.5 rounded-lg border px-3 py-1.5 text-xs transition-colors ${N?"border-success/30 text-success bg-success/5":"border-border text-text-muted hover:bg-bg-tertiary"}`,children:[e.jsx(he,{className:`h-3.5 w-3.5 ${N?"animate-pulse":""}`}),N?"Live":"Paused"]}),e.jsxs("button",{onClick:y,className:"flex items-center gap-1.5 rounded-lg border border-border px-3 py-1.5 text-xs text-text-secondary transition-colors hover:bg-bg-tertiary",children:[e.jsx(k,{className:"h-3.5 w-3.5"}),"Refresh"]})]})]}),R&&e.jsxs("div",{className:`flex items-center gap-2 rounded-lg border px-4 py-2 text-sm ${R.type==="success"?"border-success/50 text-success":"border-error/50 text-error"}`,children:[R.type==="success"?e.jsx(je,{className:"h-4 w-4"}):e.jsx(We,{className:"h-4 w-4"}),R.message]}),e.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(Ue,{className:"h-3.5 w-3.5 text-text-muted"}),e.jsx("p",{className:"text-xs text-text-muted",children:"Total Sessions"})]}),e.jsx("p",{className:"text-2xl font-bold text-text",children:w+((r==null?void 0:r.totalRuns)||0)}),r&&r.totalRuns>0&&e.jsxs("p",{className:"text-[10px] text-text-muted mt-0.5",children:[w," self-improve + ",r.totalRuns," autoresearch"]})]}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(Ze,{className:"h-3.5 w-3.5 text-warning"}),e.jsx("p",{className:"text-xs text-text-muted",children:"Best Val Score"})]}),e.jsx("p",{className:"text-2xl font-bold text-warning",children:(r==null?void 0:r.bestScore)||"—"}),r&&r.baseline>0&&(()=>{const t=r.bestScore-r.baseline,s=t>=0?"+":"",c=t>=0?"text-success":"text-error";return e.jsxs("p",{className:`text-[10px] mt-0.5 ${c}`,children:[s,t.toFixed(1)," from ",r.baseline," baseline"]})})()]}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(fe,{className:"h-3.5 w-3.5 text-success"}),e.jsx("p",{className:"text-xs text-text-muted",children:"Success Rate"})]}),e.jsxs("p",{className:"text-2xl font-bold text-info",children:[Qe,"%"]}),e.jsxs("p",{className:"text-[10px] text-text-muted mt-0.5",children:["avg improvement: ",Number(oe)>=0?"+":"",oe]})]}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(Ge,{className:"h-3.5 w-3.5 text-purple"}),e.jsx("p",{className:"text-xs text-text-muted",children:"Deployed Model"})]}),e.jsx("p",{className:"text-lg font-bold text-purple",children:"titan-qwen"}),e.jsxs("p",{className:"text-[10px] text-text-muted mt-0.5",children:["Q4_K_M • 19GB • ",(j==null?void 0:j.enabled)!==!1?"🟢 Active":"⚫ Off"]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:"Model Training"}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[e.jsxs("button",{onClick:()=>H("tool_router"),className:`rounded-xl border p-4 text-left transition-all ${i==="tool_router"?"border-purple bg-purple/5 ring-1 ring-purple/20":"border-bg-tertiary bg-bg-secondary hover:border-border"}`,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:`flex h-7 w-7 items-center justify-center rounded-lg ${i==="tool_router"?"bg-purple/20":"bg-bg-tertiary"}`,children:e.jsx(He,{className:`h-3.5 w-3.5 ${i==="tool_router"?"text-purple-light":"text-text-muted"}`})}),e.jsx("span",{className:`text-sm font-medium ${i==="tool_router"?"text-text":"text-text-secondary"}`,children:"Tool Router"})]}),e.jsx("p",{className:"text-xs text-text-muted mb-1",children:"titan-qwen"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-xs text-success font-medium",children:["Score: ",(r==null?void 0:r.bestScore)||"—"]}),e.jsx("span",{className:"text-[10px] text-text-muted",children:"•"}),e.jsx("span",{className:"text-[10px] text-text-muted",children:h.length>0?`${((me=h[h.length-1])==null?void 0:me.num_examples)||0} examples`:"No data"})]}),e.jsx("p",{className:"text-[10px] text-text-muted mt-1",children:"Brain / Tool Selection"})]}),e.jsxs("button",{onClick:()=>H("main_agent"),className:`rounded-xl border p-4 text-left transition-all ${i==="main_agent"?"border-purple bg-purple/5 ring-1 ring-purple/20":"border-bg-tertiary bg-bg-secondary hover:border-border"}`,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:`flex h-7 w-7 items-center justify-center rounded-lg ${i==="main_agent"?"bg-purple/20":"bg-bg-tertiary"}`,children:e.jsx(ze,{className:`h-3.5 w-3.5 ${i==="main_agent"?"text-purple-light":"text-text-muted"}`})}),e.jsx("span",{className:`text-sm font-medium ${i==="main_agent"?"text-text":"text-text-secondary"}`,children:"Main Agent"})]}),e.jsx("p",{className:"text-xs text-text-muted mb-1",children:"titan-agent"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-xs text-warning font-medium",children:["Score: ",(x==null?void 0:x.bestScore)||"—"]}),e.jsx("span",{className:"text-[10px] text-text-muted",children:"•"}),e.jsx("span",{className:"text-[10px] text-text-muted",children:b.length>0?`${((ue=b[b.length-1])==null?void 0:ue.num_examples)||0} examples`:"No data"})]}),e.jsx("p",{className:"text-[10px] text-text-muted mt-1",children:"Primary LLM / Full Agent"})]})]}),e.jsxs("button",{onClick:()=>Me(!E),className:"flex w-full items-center gap-2 text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:[E?e.jsx(I,{className:"h-3.5 w-3.5"}):e.jsx(Q,{className:"h-3.5 w-3.5"}),e.jsx(be,{className:"h-3.5 w-3.5"}),"Training Configuration"]}),E&&e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-5 space-y-4 mb-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-text-muted",children:"Base Model"}),e.jsxs("select",{id:"train-base-model",name:"train-base-model",value:u.baseModel,onChange:t=>v(s=>({...s,baseModel:t.target.value})),className:"w-full rounded-lg border border-border bg-bg px-3 py-2 text-sm text-text outline-none",children:[e.jsx("option",{value:"unsloth/Qwen2.5-32B-bnb-4bit",children:"Qwen 2.5 32B (4-bit)"}),e.jsx("option",{value:"unsloth/Qwen2.5-14B-bnb-4bit",children:"Qwen 2.5 14B (4-bit)"}),e.jsx("option",{value:"unsloth/Qwen2.5-7B-bnb-4bit",children:"Qwen 2.5 7B (4-bit)"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"LoRA Rank"}),e.jsx("span",{className:"text-sm font-medium text-text",children:u.loraRank})]}),e.jsx("input",{id:"train-lora-rank",name:"train-lora-rank",type:"range",min:4,max:64,step:4,value:u.loraRank,onChange:t=>v(s=>({...s,loraRank:Number(t.target.value)})),className:"w-full accent-purple"}),e.jsxs("div",{className:"flex justify-between text-[10px] text-text-muted mt-1",children:[e.jsx("span",{children:"4"}),e.jsx("span",{children:"32"}),e.jsx("span",{children:"64"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Learning Rate"}),e.jsx("span",{className:"text-sm font-medium text-text font-mono",children:u.learningRate.toExponential(0)})]}),e.jsx("input",{id:"train-learning-rate",name:"train-learning-rate",type:"range",min:-5,max:-3,step:.5,value:Math.log10(u.learningRate),onChange:t=>v(s=>({...s,learningRate:Math.pow(10,Number(t.target.value))})),className:"w-full accent-purple"}),e.jsxs("div",{className:"flex justify-between text-[10px] text-text-muted mt-1",children:[e.jsx("span",{children:"1e-5"}),e.jsx("span",{children:"1e-4"}),e.jsx("span",{children:"1e-3"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Epochs"}),e.jsx("span",{className:"text-sm font-medium text-text",children:u.epochs})]}),e.jsx("input",{id:"train-epochs",name:"train-epochs",type:"range",min:1,max:10,value:u.epochs,onChange:t=>v(s=>({...s,epochs:Number(t.target.value)})),className:"w-full accent-purple"}),e.jsxs("div",{className:"flex justify-between text-[10px] text-text-muted mt-1",children:[e.jsx("span",{children:"1"}),e.jsx("span",{children:"5"}),e.jsx("span",{children:"10"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Time Budget"}),e.jsxs("span",{className:"text-sm font-medium text-text",children:[u.timeBudgetMin," min"]})]}),e.jsx("input",{id:"train-time-budget",name:"train-time-budget",type:"range",min:5,max:120,step:5,value:u.timeBudgetMin,onChange:t=>v(s=>({...s,timeBudgetMin:Number(t.target.value)})),className:"w-full accent-purple"}),e.jsxs("div",{className:"flex justify-between text-[10px] text-text-muted mt-1",children:[e.jsx("span",{children:"5 min"}),e.jsx("span",{children:"60 min"}),e.jsx("span",{children:"120 min"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Max Sequence Length"}),e.jsx("span",{className:"text-sm font-medium text-text",children:u.maxSeqLength})]}),e.jsx("input",{id:"train-max-seq-length",name:"train-max-seq-length",type:"range",min:512,max:4096,step:256,value:u.maxSeqLength,onChange:t=>v(s=>({...s,maxSeqLength:Number(t.target.value)})),className:"w-full accent-purple"}),e.jsxs("div",{className:"flex justify-between text-[10px] text-text-muted mt-1",children:[e.jsx("span",{children:"512"}),e.jsx("span",{children:"2048"}),e.jsx("span",{children:"4096"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("button",{onClick:Fe,disabled:P,className:"flex items-center justify-center gap-2 rounded-xl border border-bg-tertiary bg-bg-secondary px-4 py-3 text-xs font-medium text-text transition-colors hover:border-purple/50 hover:bg-bg-secondary disabled:opacity-50",children:[P?e.jsx(k,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(ge,{className:"h-3.5 w-3.5 text-warning"}),"Generate Training Data"]}),e.jsxs("button",{onClick:qe,disabled:U,className:"flex items-center justify-center gap-2 rounded-xl bg-purple px-4 py-3 text-xs font-medium text-white transition-colors hover:bg-purple/80 disabled:opacity-50",children:[U?e.jsx(k,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(ye,{className:"h-3.5 w-3.5"}),"Start Training"]}),e.jsxs("button",{onClick:Ie,disabled:z,className:"flex items-center justify-center gap-2 rounded-xl border border-bg-tertiary bg-bg-secondary px-4 py-3 text-xs font-medium text-text transition-colors hover:border-success/50 hover:bg-bg-secondary disabled:opacity-50",children:[z?e.jsx(k,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(je,{className:"h-3.5 w-3.5 text-success"}),"Deploy Best Model"]}),e.jsxs("button",{onClick:()=>de(i==="main_agent"?"agent-benchmark":"tool-benchmark"),disabled:C!==null,className:"flex items-center justify-center gap-2 rounded-xl border border-bg-tertiary bg-bg-secondary px-4 py-3 text-xs font-medium text-text transition-colors hover:border-[#3b82f6]/50 hover:bg-bg-secondary disabled:opacity-50",children:[e.jsx(fe,{className:"h-3.5 w-3.5 text-info"}),"Run Benchmark"]})]})]}),e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>Be(!S),className:"flex w-full items-center gap-2 text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:[S?e.jsx(I,{className:"h-3.5 w-3.5"}):e.jsx(Q,{className:"h-3.5 w-3.5"}),e.jsx(Xe,{className:"h-3.5 w-3.5"}),"Live Training Activity",e.jsxs("span",{className:"ml-auto flex items-center gap-1.5",children:[Ae?e.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-success",children:[e.jsx(Ye,{className:"h-3 w-3 animate-pulse"})," Connected"]}):e.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-error",children:[e.jsx(Pe,{className:"h-3 w-3"})," Disconnected"]}),g.length>0&&e.jsx("span",{className:"rounded-full bg-purple/20 px-1.5 py-0.5 text-[10px] text-purple-light",children:g.length})]})]}),S&&e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg overflow-hidden",children:[g.length>0&&(()=>{var c,o,n;const t=[...g].reverse().find(d=>{var l;return((l=d.detail)==null?void 0:l.pct)!==void 0});if(!t||t.type==="complete")return null;const s=((c=t.detail)==null?void 0:c.pct)||0;return e.jsxs("div",{className:"border-b border-bg-tertiary px-4 py-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx("span",{className:"text-xs text-text-secondary",children:t.message}),e.jsxs("span",{className:"text-xs font-medium text-purple",children:[s,"%"]})]}),e.jsx("div",{className:"h-1.5 w-full rounded-full bg-bg-tertiary overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-purple to-accent transition-all duration-500",style:{width:`${s}%`}})}),((o=t.detail)==null?void 0:o.current)!==void 0&&((n=t.detail)==null?void 0:n.total)!==void 0&&e.jsxs("div",{className:"flex items-center justify-between mt-1",children:[e.jsxs("span",{className:"text-[10px] text-text-muted",children:[t.detail.current," / ",t.detail.total," examples"]}),t.detail.category&&e.jsxs("span",{className:"text-[10px] text-text-muted",children:["Category: ",t.detail.category]})]})]})})(),e.jsxs("div",{className:"max-h-64 overflow-y-auto p-3 font-mono text-[11px] leading-5 scrollbar-thin",children:[g.length===0?e.jsxs("div",{className:"flex items-center justify-center py-8 text-text-muted",children:[e.jsx(he,{className:"h-4 w-4 mr-2"}),e.jsx("span",{children:"No training activity yet. Start training to see live progress."})]}):g.map((t,s)=>{var pe;const c={info:"text-info",progress:"text-purple",success:"text-success",error:"text-error",complete:"text-warning",connected:"text-success"},o={info:"●",progress:"◆",success:"✓",error:"✗",complete:"★",connected:"◉"},n=c[t.type]||"text-text-muted",d=o[t.type]||"·",l=t.timestamp?new Date(t.timestamp).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}):"";return e.jsxs("div",{className:"flex items-start gap-2 hover:bg-bg-secondary/50 rounded px-1",children:[e.jsx("span",{className:"text-border shrink-0 select-none",children:l}),e.jsx("span",{className:`shrink-0 ${n}`,children:d}),e.jsxs("span",{className:`${t.type==="error"?"text-error":"text-text-secondary"}`,children:[t.message,((pe=t.detail)==null?void 0:pe.category)&&t.type==="progress"&&e.jsxs("span",{className:"text-text-muted",children:[" [",t.detail.category,"]"]})]})]},s)}),e.jsx("div",{ref:O})]}),g.length>0&&e.jsxs("div",{className:"border-t border-bg-tertiary px-3 py-2 flex items-center justify-between",children:[e.jsxs("span",{className:"text-[10px] text-text-muted",children:[g.filter(t=>t.type==="success"||t.type==="progress").length," successes"," · ",g.filter(t=>t.type==="error").length," errors"]}),e.jsxs("button",{onClick:Ee,className:"flex items-center gap-1 text-[10px] text-text-muted hover:text-text-secondary transition-colors",children:[e.jsx(et,{className:"h-3 w-3"}),"Clear"]})]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:"Run Now"}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(D).map(([t,s])=>e.jsxs("button",{onClick:()=>de(t),disabled:C!==null,className:"flex items-center gap-3 rounded-xl border border-bg-tertiary bg-bg-secondary p-4 text-left transition-colors hover:border-purple/50 hover:bg-bg-secondary disabled:opacity-50",children:[e.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-purple/10",children:C===t?e.jsx(k,{className:"h-4 w-4 text-purple-light animate-spin"}):e.jsx(ye,{className:"h-4 w-4 text-purple-light"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-text",children:s}),e.jsx("p",{className:"text-xs text-text-muted",children:C===t?"Running...":"Start experiment"})]})]},t))})]}),e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>_e(!A),className:"flex w-full items-center gap-2 text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:[A?e.jsx(I,{className:"h-3.5 w-3.5"}):e.jsx(Q,{className:"h-3.5 w-3.5"}),e.jsx(be,{className:"h-3.5 w-3.5"}),"Schedule Settings"]}),A&&e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-6 space-y-5",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Runs per day"}),e.jsx("span",{className:"text-sm font-medium text-text",children:F})]}),e.jsx("input",{id:"schedule-runs-per-day",name:"schedule-runs-per-day",type:"range",min:1,max:12,value:F,onChange:t=>te(Number(t.target.value)),className:"w-full accent-purple"}),e.jsxs("div",{className:"flex justify-between text-[10px] text-text-muted mt-1",children:[e.jsx("span",{children:"1"}),e.jsx("span",{children:"6"}),e.jsx("span",{children:"12"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-text-muted",children:"Schedule"}),e.jsx("select",{id:"schedule-preset",name:"schedule-preset",value:xe,onChange:t=>ce(Number(t.target.value)),className:"w-full rounded-lg border border-border bg-bg px-3 py-2 text-sm text-text outline-none",children:J.map((t,s)=>e.jsx("option",{value:s,children:t.label},s))})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Budget per run (minutes)"}),e.jsxs("span",{className:"text-sm font-medium text-text",children:[T," min"]})]}),e.jsx("input",{id:"schedule-budget-minutes",name:"schedule-budget-minutes",type:"range",min:5,max:120,step:5,value:T,onChange:t=>se(Number(t.target.value)),className:"w-full accent-purple"}),e.jsxs("div",{className:"flex justify-between text-[10px] text-text-muted mt-1",children:[e.jsx("span",{children:"5 min"}),e.jsx("span",{children:"60 min"}),e.jsx("span",{children:"120 min"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Max daily budget (minutes)"}),e.jsxs("span",{className:"text-sm font-medium text-text",children:[q," min"]})]}),e.jsx("input",{id:"schedule-max-daily-budget",name:"schedule-max-daily-budget",type:"range",min:30,max:480,step:30,value:q,onChange:t=>ae(Number(t.target.value)),className:"w-full accent-purple"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-xs text-text-muted",children:"Improvement areas"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Object.entries(D).map(([t,s])=>e.jsx("button",{onClick:()=>Oe(t),className:`rounded-full px-3 py-1 text-xs font-medium transition-colors ${le.includes(t)?"bg-purple text-white":"bg-bg-tertiary text-text-muted hover:text-text-secondary"}`,children:s},t))})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("label",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Auto-apply improvements"}),e.jsx("button",{onClick:()=>re(!M),className:`relative h-5 w-9 rounded-full transition-colors ${M?"bg-purple":"bg-border"}`,children:e.jsx("span",{className:`absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-white transition-transform ${M?"translate-x-4":""}`})})]}),e.jsxs("label",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Pause on weekends"}),e.jsx("button",{onClick:()=>ne(!$),className:`relative h-5 w-9 rounded-full transition-colors ${$?"bg-purple":"bg-border"}`,children:e.jsx("span",{className:`absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-white transition-transform ${$?"translate-x-4":""}`})})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{onClick:Le,className:"flex items-center gap-2 rounded-lg bg-purple px-4 py-2 text-xs font-medium text-white transition-colors hover:bg-purple/80",children:"Save Settings"})})]})]}),f.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:"Session History"}),e.jsx("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary overflow-hidden",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-bg-tertiary",children:[e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Date"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Area"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Baseline"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Best"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"+Δ"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"K/D/C"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Status"})]})}),e.jsx("tbody",{children:f.slice().reverse().slice(0,10).map(t=>{const s=t.bestScore-t.baselineScore;return e.jsxs("tr",{className:"border-b border-bg-tertiary last:border-0",children:[e.jsx("td",{className:"px-4 py-2.5 text-xs text-text-secondary",children:t.startedAt.slice(0,10)}),e.jsx("td",{className:"px-4 py-2.5 text-xs text-text",children:D[t.area]||t.area}),e.jsx("td",{className:"px-4 py-2.5 text-xs text-text-muted",children:t.baselineScore}),e.jsx("td",{className:"px-4 py-2.5 text-xs text-text font-medium",children:t.bestScore}),e.jsxs("td",{className:`px-4 py-2.5 text-xs font-medium ${s>0?"text-success":"text-text-muted"}`,children:[s>0?"+":"",s]}),e.jsxs("td",{className:"px-4 py-2.5 text-xs text-text-muted",children:[t.keeps,"/",t.discards,"/",t.crashes]}),e.jsx("td",{className:"px-4 py-2.5",children:e.jsx(Ne,{status:t.applied?"deployed":t.status})})]},t.id)})})]})})]}),V.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:"Model Training"}),e.jsx("div",{className:"space-y-2",children:V.slice().reverse().slice(0,5).map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-bg-tertiary bg-bg-secondary px-4 py-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ge,{className:"h-4 w-4 text-warning"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-text",children:t.id}),e.jsxs("p",{className:"text-xs text-text-muted",children:[t.baseModel," • ",t.dataPoints," samples • ",t.method]})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[t.finalLoss!==void 0&&e.jsxs("span",{className:"text-xs text-text-muted",children:["loss: ",t.finalLoss.toFixed(4)]}),e.jsx(Ne,{status:t.status})]})]},t.id))})]}),h.length>0&&i==="tool_router"&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:"Autoresearch Experiments — Tool Router"}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b border-bg-tertiary",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Val Score Over Time"}),e.jsxs("span",{className:"text-xs text-success font-medium",children:["Best: ",(r==null?void 0:r.bestScore)||Math.max(...h.map(t=>t.val_score))]})]}),e.jsx("div",{className:"h-16 flex items-end gap-1",children:h.map((t,s)=>{const c=Math.max(...h.map(l=>l.val_score),100),o=Math.min(...h.map(l=>l.val_score),0),n=c-o||1,d=(t.val_score-o)/n*100;return e.jsx("div",{className:"flex-1 rounded-t transition-all hover:opacity-80",style:{height:`${Math.max(d,4)}%`,backgroundColor:(r==null?void 0:r.baseline)!=null?t.val_score>=r.baseline?"var(--color-success)":"var(--color-error)":"var(--color-purple)"},title:`Run ${s+1}: ${t.val_score} (${new Date(t.timestamp).toLocaleDateString()})`},s)})}),e.jsxs("div",{className:"relative mt-1",children:[e.jsx("div",{className:"border-t border-dashed border-border-light/50 absolute w-full"}),e.jsx("span",{className:"text-[9px] text-text-muted relative -top-2",children:(r==null?void 0:r.baseline)!=null?`baseline: ${r.baseline}`:"baseline: —"})]})]}),e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-bg-tertiary",children:[e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"#"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Date"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Score"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"LR"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Rank"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Epochs"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Examples"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Duration"})]})}),e.jsx("tbody",{children:h.slice().reverse().slice(0,20).map((t,s)=>e.jsxs("tr",{className:"border-b border-bg-tertiary last:border-0",children:[e.jsx("td",{className:"px-4 py-2.5 text-xs text-text-muted",children:h.length-s}),e.jsx("td",{className:"px-4 py-2.5 text-xs text-text-secondary",children:new Date(t.timestamp).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}),e.jsx("td",{className:`px-4 py-2.5 text-xs font-bold ${t.val_score>=((r==null?void 0:r.baseline)||78)?"text-success":"text-error"}`,children:t.val_score}),e.jsx("td",{className:"px-4 py-2.5 text-xs text-text-muted font-mono",children:t.hyperparams.lr}),e.jsx("td",{className:"px-4 py-2.5 text-xs text-text-muted",children:t.hyperparams.rank}),e.jsx("td",{className:"px-4 py-2.5 text-xs text-text-muted",children:t.hyperparams.epochs}),e.jsx("td",{className:"px-4 py-2.5 text-xs text-text-muted",children:t.num_examples}),e.jsxs("td",{className:"px-4 py-2.5 text-xs text-text-muted",children:[Math.round(t.training_time_s/60),"m ",Math.round(t.training_time_s%60),"s"]})]},s))})]})]})]}),b.length>0&&i==="main_agent"&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:"Autoresearch Experiments — Main Agent"}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b border-bg-tertiary",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Val Score Over Time"}),e.jsxs("span",{className:"text-xs text-warning font-medium",children:["Best: ",(x==null?void 0:x.bestScore)||Math.max(...b.map(t=>t.val_score))]})]}),e.jsx("div",{className:"h-16 flex items-end gap-1",children:b.map((t,s)=>{const c=Math.max(...b.map(l=>l.val_score),100),o=Math.min(...b.map(l=>l.val_score),0),n=c-o||1,d=(t.val_score-o)/n*100;return e.jsx("div",{className:"flex-1 rounded-t transition-all hover:opacity-80",style:{height:`${Math.max(d,4)}%`,backgroundColor:(x==null?void 0:x.baseline)!=null?t.val_score>=x.baseline?"var(--color-warning)":"var(--color-error)":"var(--color-purple)"},title:`Run ${s+1}: ${t.val_score} (${new Date(t.timestamp).toLocaleDateString()})`},s)})}),e.jsxs("div",{className:"relative mt-1",children:[e.jsx("div",{className:"border-t border-dashed border-border-light/50 absolute w-full"}),e.jsx("span",{className:"text-[9px] text-text-muted relative -top-2",children:(x==null?void 0:x.baseline)!=null?`baseline: ${x.baseline}`:"baseline: —"})]})]}),e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-bg-tertiary",children:[e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"#"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Date"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Score"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"LR"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Rank"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Epochs"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Examples"}),e.jsx("th",{className:"px-4 py-2.5 text-xs font-medium text-text-muted",children:"Duration"})]})}),e.jsx("tbody",{children:b.slice().reverse().slice(0,20).map((t,s)=>e.jsxs("tr",{className:"border-b border-bg-tertiary last:border-0",children:[e.jsx("td",{className:"px-4 py-2.5 text-xs text-text-muted",children:b.length-s}),e.jsx("td",{className:"px-4 py-2.5 text-xs text-text-secondary",children:new Date(t.timestamp).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}),e.jsx("td",{className:`px-4 py-2.5 text-xs font-bold ${t.val_score>=((x==null?void 0:x.baseline)||70)?"text-warning":"text-error"}`,children:t.val_score}),e.jsx("td",{className:"px-4 py-2.5 text-xs text-text-muted font-mono",children:t.hyperparams.lr}),e.jsx("td",{className:"px-4 py-2.5 text-xs text-text-muted",children:t.hyperparams.rank}),e.jsx("td",{className:"px-4 py-2.5 text-xs text-text-muted",children:t.hyperparams.epochs}),e.jsx("td",{className:"px-4 py-2.5 text-xs text-text-muted",children:t.num_examples}),e.jsxs("td",{className:"px-4 py-2.5 text-xs text-text-muted",children:[Math.round(t.training_time_s/60),"m ",Math.round(t.training_time_s%60),"s"]})]},s))})]})]})]})]})}export{ut as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,j as e,b as _,aA as ye,i as ee,m as we,L as te,a8 as se,aB as Ne,aC as Se,aD as ke,aE as Ce,t as Ve,aF as Ee,aG as ae,aH as Te,aI as Le,a9 as Ue}from"./index-CgHHe41p.js";import"./Input-BGGQDAyP.js";import{P as Ae}from"./PageHeader-CwcMp_4A.js";import{H as re}from"./Tooltip-Chg08x7x.js";import{C as Pe}from"./circle-check-big-hiNdH5H3.js";import{M as B}from"./mic-DjXDp1Js.js";import{R as Ie}from"./refresh-cw-_C-4Cd_3.js";import{W as Me}from"./wifi-off-DKKYhVWL.js";import{D as Fe}from"./download-C-DdF4cx.js";import{P as $e}from"./play-D3Nbm1Cz.js";import{S as Re}from"./save-B02XWwgN.js";import"./clsx-B-dksMZM.js";import"./chevron-right-CA8HOEP4.js";const ce=[{id:"oak",label:"Oak",swatch:"linear-gradient(135deg, #6e4724, #482a13)"},{id:"walnut",label:"Walnut",swatch:"linear-gradient(135deg, #4a2e18, #2a1808)"},{id:"mahogany",label:"Mahogany",swatch:"linear-gradient(135deg, #5e2a1a, #38160c)"},{id:"white",label:"White",swatch:"linear-gradient(135deg, #f4f1ea, #ddd9ce)"}],H="titan-desk-theme";function Oe(){try{const r=localStorage.getItem(H);if(r==="oak"||r==="walnut"||r==="mahogany"||r==="white")return r}catch{}return"oak"}function De(r){try{localStorage.setItem(H,r)}catch{}}function _e({className:r}){const[f,p]=a.useState(Oe);a.useEffect(()=>{const n=h=>{if(h.key===H&&h.newValue){const x=h.newValue;ce.some(j=>j.id===x)&&p(x)}};return window.addEventListener("storage",n),()=>window.removeEventListener("storage",n)},[]);const C=a.useCallback(n=>{p(n),De(n),window.dispatchEvent(new CustomEvent("desk-theme",{detail:n}))},[]);return e.jsxs("div",{className:`flex items-center gap-2 ${r??""}`,children:[e.jsx("span",{className:"text-[10px] uppercase tracking-widest text-[#a89070]",children:"Desk"}),ce.map(n=>e.jsx("button",{type:"button",onClick:()=>C(n.id),title:n.label,className:`w-5 h-5 rounded-full border-2 transition-transform hover:scale-110 ${f===n.id?"border-[#c4a35a] scale-110":"border-transparent"}`,style:{background:n.swatch}},n.id))]})}const F=["ollama","lmstudio","localai"];function Be({ok:r}){return r?e.jsx("div",{className:"h-2 w-2 rounded-full bg-success shadow-[0_0_6px_rgba(34,197,94,0.4)]"}):e.jsx("div",{className:"h-2 w-2 rounded-full bg-border-light"})}function He({models:r,selectedModel:f,onSelect:p,onSwitch:C,currentModel:n}){const h=n.includes("/")?n.split("/")[0]:"",[x,j]=a.useState(h);a.useEffect(()=>{j(h)},[h]);const b=a.useMemo(()=>[...new Set(r.map(i=>i.provider))].sort((i,m)=>{const l=F.includes(i.toLowerCase()),k=F.includes(m.toLowerCase());return l&&!k?-1:!l&&k?1:i.localeCompare(m)}),[r]),S=a.useMemo(()=>r.filter(o=>o.provider===x),[r,x]),U=o=>{j(o);const i=r.filter(l=>l.provider===o),m=i.find(l=>l.id===n);m?p(m.id):i.length>0&&p(i[0].id)},$=f!==n,y=F.includes(x.toLowerCase());return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[e.jsx("label",{className:"text-xs text-text-muted",children:"Provider"}),e.jsx(re,{title:"AI Provider",description:"The company or service that hosts the AI model. Local providers (Ollama, LM Studio) run on your machine. Cloud providers (Anthropic, OpenAI) run remotely and require an API key."})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[e.jsx("select",{value:x,onChange:o=>U(o.target.value),className:"w-full rounded-lg border border-border bg-bg px-3 py-2.5 text-sm text-text outline-none transition-colors focus:border-accent min-h-[44px]",children:b.map(o=>{const i=F.includes(o.toLowerCase()),m=r.filter(l=>l.provider===o).length;return e.jsxs("option",{value:o,children:[i?`💻 ${o} (local)`:o," — ",m," model",m!==1?"s":""]},o)})}),y&&e.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap rounded bg-success/15 px-2 py-1 text-xs font-medium text-success self-start mt-0.5 sm:self-auto sm:mt-0",children:[e.jsx(Se,{className:"h-3 w-3"})," Local"]}),!y&&x&&e.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap rounded bg-accent/15 px-2 py-1 text-xs font-medium text-accent-hover self-start mt-0.5 sm:self-auto sm:mt-0",children:[e.jsx(ke,{className:"h-3 w-3"})," Cloud"]})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[e.jsx("label",{className:"text-xs text-text-muted",children:"Model"}),e.jsx(re,{title:"Model Selection",description:"The specific AI model TITAN uses to think and respond. Larger models are smarter but slower and cost more. You can switch anytime without losing conversation history."})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end gap-2 md:gap-3",children:[e.jsxs("select",{value:f,onChange:o=>p(o.target.value),className:"w-full rounded-lg border border-border bg-bg px-3 py-2.5 text-sm text-text outline-none transition-colors focus:border-accent min-h-[44px]",children:[S.map(o=>e.jsxs("option",{value:o.id,disabled:!o.available,children:[o.name,o.id===n?" (active)":"",o.available?"":" — unavailable"]},o.id)),S.length===0&&e.jsx("option",{disabled:!0,children:"No models for this provider"})]}),e.jsx("button",{onClick:C,disabled:!$,className:"rounded-lg bg-accent px-4 py-2.5 text-sm font-medium text-white transition-colors hover:bg-accent/80 disabled:opacity-50 min-h-[44px] w-full sm:w-auto active:scale-[0.98]",children:"Switch"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-bg px-3 py-2.5",children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-success animate-pulse flex-shrink-0"}),e.jsx("span",{className:"text-xs text-text-muted",children:"Active:"}),e.jsx("span",{className:"text-xs text-text-secondary font-mono overflow-x-auto scrollbar-thin",children:n||"None"})]})]})}function mt(){var X,Y,J;const[r,f]=a.useState(null),[p,C]=a.useState([]),[n,h]=a.useState(!0),[x,j]=a.useState(!1),[b,S]=a.useState(""),[U,$]=a.useState(null),[y,o]=a.useState(null),[i,m]=a.useState(!1),[l,k]=a.useState(""),[V,E]=a.useState("andrew"),[w,W]=a.useState("f5-tts"),[oe,q]=a.useState("http://localhost:5006"),[ne,T]=a.useState(["andrew"]),[We,qe]=a.useState(null),[Ke,ze]=a.useState(!1),[Ge,Qe]=a.useState(""),A=[{id:"f5-tts",name:"F5-TTS",desc:"Voice cloning with MLX (Apple Silicon)",defaultUrl:"http://localhost:5006",defaultVoices:["andrew"]}],[Xe,ie]=a.useState(null),[le,Ye]=a.useState(!1),[de,Je]=a.useState(""),[K,R]=a.useState([]),[z,G]=a.useState(!1),[v,xe]=a.useState(null),[L,me]=a.useState(null),[O,Q]=a.useState(!1),P=t=>{var s;return((s=t==null?void 0:t.agent)==null?void 0:s.model)??(t==null?void 0:t.model)??""};a.useEffect(()=>{(async()=>{try{const[s,c]=await Promise.all([se(),Ne()]);f(s),C(c),S(P(s));const d=(s==null?void 0:s.voice)??{};m(d.enabled??!1),k(d.livekitUrl??""),E(d.ttsVoice??"andrew"),W(d.ttsEngine??"f5-tts"),q(d.ttsUrl??"http://localhost:5006")}catch(s){const c=s instanceof Error?s.message:"Failed to load config";$(c),u("error",c)}finally{h(!1)}})()},[]),a.useEffect(()=>{(async()=>{var t;try{const s=await _("/api/voice/voices");if(s.ok){const c=await s.json();(t=c.voices)!=null&&t.length&&T(c.voices)}}catch{}})()},[]);const D=async()=>{Q(!0);try{const[t,s]=await Promise.allSettled([_("/api/voice/health").then(c=>c.json()),_("/api/voice/status").then(c=>c.json())]);t.status==="fulfilled"&&xe(t.value),s.status==="fulfilled"&&(me(s.value),s.value.livekitUrl&&!l&&k(s.value.livekitUrl))}catch{}Q(!1)};a.useEffect(()=>{n||D()},[n]),a.useEffect(()=>{i&&ye().then(t=>{var s;ie({installed:t.installed,running:t.running,voices:t.voices}),R(t.voices.map(c=>({name:c,hasTranscript:!1,sizeBytes:0}))),(s=t.voices)!=null&&s.length&&T(["andrew",...t.voices])}).catch(()=>{})},[i]);const ue=async()=>{const t=document.createElement("input");t.type="file",t.accept="audio/wav,audio/mp3,audio/mpeg,audio/flac,.wav,.mp3,.flac",t.onchange=async()=>{var g;const s=(g=t.files)==null?void 0:g[0];if(!s)return;const c=prompt('Name this voice (e.g., "robin", "jarvis"):',s.name.replace(/\.[^.]+$/,""));if(!c)return;const d=prompt("(Optional) Transcript of the audio — improves cloning quality:","")||"";G(!0);try{const N=await s.arrayBuffer(),I=btoa(String.fromCharCode(...new Uint8Array(N))),M=await Ee(c,I,d),ve=M!=null&&M.duration?` Duration: ${M.duration}s,`:"";u("success",`Voice "${c}" uploaded!${ve} preprocessed and normalized.`);const Z=await ae();R(Z.voices||[]),T(["default",...Z.voices.map(je=>je.name)]),E(c)}catch(N){u("error",N instanceof Error?N.message:"Failed to upload voice")}finally{G(!1)}},t.click()},pe=async t=>{try{u("success",`Generating preview for "${t}"...`);const s=["Hello, how can I help you today?","I am ready to assist you with anything you need.","Good morning. It is a pleasure to be of service."],c=s[Math.floor(Math.random()*s.length)],d=await Te(t,c),g=new Blob([d],{type:"audio/wav"}),N=URL.createObjectURL(g),I=new Audio(N);I.onended=()=>URL.revokeObjectURL(N),I.play()}catch(s){u("error",s instanceof Error?s.message:"Failed to preview voice")}},he=async t=>{if(confirm(`Delete voice "${t}"?`))try{await Le(t);const s=await ae();R(s.voices||[]),T(["andrew",...s.voices.map(c=>c.name)]),V===t&&E("default"),u("success",`Voice "${t}" deleted`)}catch(s){u("error",s instanceof Error?s.message:"Failed to delete voice")}},u=(t,s)=>{o({type:t,message:s}),setTimeout(()=>o(null),3e3)},be=async()=>{if(!(!b||b===P(r??{})))try{const t=p.find(c=>c.id===b);await Ce(b,t==null?void 0:t.provider),Ve("model_switched",{model:b,provider:t==null?void 0:t.provider});const s=await se();f(s),S(P(s)),u("success",`Switched to ${b}`)}catch(t){u("error",t instanceof Error?t.message:"Failed to switch model")}},ge=async()=>{var t,s,c,d;j(!0);try{const g=await Ue({voice:{enabled:i,livekitUrl:l,ttsVoice:V,ttsEngine:w,ttsUrl:oe||"http://localhost:5005",sttUrl:((t=r==null?void 0:r.voice)==null?void 0:t.sttUrl)??"http://localhost:48421",livekitApiKey:((s=r==null?void 0:r.voice)==null?void 0:s.livekitApiKey)??"",livekitApiSecret:((c=r==null?void 0:r.voice)==null?void 0:c.livekitApiSecret)??"",agentUrl:((d=r==null?void 0:r.voice)==null?void 0:d.agentUrl)??""}});f(g),u("success","Settings saved"),i&&D()}catch(g){u("error",g instanceof Error?g.message:"Failed to save settings")}finally{j(!1)}};if(n)return e.jsx("div",{className:"space-y-4",children:Array.from({length:3}).map((t,s)=>e.jsx("div",{className:"h-32 animate-pulse rounded-xl border border-border bg-bg-secondary"},s))});if(U)return e.jsxs("div",{className:"space-y-4",children:[e.jsx(Ae,{title:"Settings",breadcrumbs:[{label:"Admin",href:"/overview"},{label:"Settings"},{label:"Settings"}]}),e.jsxs("div",{className:"rounded-xl border border-error/50 bg-bg-secondary p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 text-error",children:[e.jsx(ee,{className:"h-5 w-5"}),e.jsx("p",{className:"text-sm font-medium",children:"Failed to load settings"})]}),e.jsx("p",{className:"mt-2 text-sm text-text-secondary",children:U}),e.jsx("button",{onClick:()=>window.location.reload(),className:"mt-4 rounded-lg bg-bg-tertiary px-4 py-2 text-sm text-text hover:bg-border transition-colors",children:"Retry"})]})]});const fe=r?P(r):"";return e.jsxs("div",{className:"space-y-4 md:space-y-6",children:[e.jsx("h2",{className:"text-base md:text-lg font-semibold text-text",children:"Settings"}),e.jsx("div",{className:"rounded-lg border border-border bg-bg-secondary/50 px-3 py-2.5",children:e.jsx(_e,{})}),y&&e.jsxs("div",{className:`flex items-center gap-2 rounded-lg border px-3 md:px-4 py-2.5 md:py-2 text-[11px] md:text-sm ${y.type==="success"?"border-success/50 text-success":"border-error/50 text-error"}`,children:[y.type==="success"?e.jsx(Pe,{className:"h-4 w-4"}):e.jsx(ee,{className:"h-4 w-4"}),y.message]}),e.jsxs("div",{className:"rounded-xl border border-border bg-bg-secondary p-3 md:p-6",children:[e.jsx("h3",{className:"mb-3 md:mb-4 text-[11px] md:text-sm font-medium text-text-secondary",children:"Model"}),e.jsx(He,{models:p,selectedModel:b,onSelect:S,onSwitch:be,currentModel:fe})]}),e.jsxs("div",{className:"rounded-xl border border-border bg-bg-secondary p-3 md:p-6",children:[e.jsxs("div",{className:"mb-3 md:mb-4 flex items-center justify-between flex-wrap gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(B,{className:"h-4 w-4 text-accent-hover"}),e.jsx("h3",{className:"text-sm font-medium text-text-secondary",children:"Voice"}),e.jsx("span",{className:"rounded-full bg-accent/20 px-2 py-0.5 text-[9px] font-medium text-purple-light",children:((X=A.find(t=>t.id===w))==null?void 0:X.name)||w})]}),e.jsxs("button",{onClick:D,disabled:O,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-[10px] text-text-muted hover:bg-bg-tertiary hover:text-text-secondary transition-colors",children:[e.jsx(Ie,{className:`h-3 w-3 ${O?"animate-spin":""}`}),O?"Scanning...":"Scan Services"]})]}),e.jsxs("div",{className:"space-y-4",children:[v&&e.jsxs("div",{className:"rounded-lg border border-bg-tertiary bg-bg p-3",children:[e.jsx("p",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-text-muted",children:"Service Discovery"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:[{label:"LiveKit Server",ok:v.livekit},{label:"Voice Agent",ok:v.agent},{label:"STT",ok:v.stt},{label:`TTS (${((Y=A.find(t=>t.id===w))==null?void 0:Y.name)||"TTS"})`,ok:v.tts}].map(({label:t,ok:s})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Be,{ok:s}),e.jsx("span",{className:`text-xs ${s?"text-text-secondary":"text-text-muted"}`,children:t}),s&&e.jsx("span",{className:"text-[9px] text-success",children:"Online"})]},t))}),(L==null?void 0:L.available)!==void 0&&e.jsx("div",{className:"mt-2 flex items-center gap-2 border-t border-bg-tertiary pt-2",children:L.available?e.jsxs(e.Fragment,{children:[e.jsx(we,{className:"h-3.5 w-3.5 text-success"}),e.jsx("span",{className:"text-xs text-success",children:"Voice system ready"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Me,{className:"h-3.5 w-3.5 text-text-muted"}),e.jsx("span",{className:"text-xs text-text-muted",children:L.reason||"Voice not available"})]})})]}),e.jsxs("label",{className:"flex items-center gap-3",children:[e.jsx("input",{type:"checkbox",checked:i,onChange:t=>m(t.target.checked),className:"h-4 w-4 rounded border-border accent-accent"}),e.jsx("span",{className:"text-sm text-text",children:"Enable Voice Chat"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-xs text-text-muted",children:"TTS Engine"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:A.map(t=>e.jsxs("button",{type:"button",onClick:()=>{W(t.id),q(t.defaultUrl),E(t.defaultVoices[0]||"default"),T(t.defaultVoices)},className:`rounded-lg border p-3 text-left transition-all min-h-[64px] active:scale-[0.98] sm:min-h-[56px] ${w===t.id?"border-accent bg-accent/10":"border-border hover:border-border-light"}`,children:[e.jsx("div",{className:"text-xs font-medium text-text",children:t.name}),e.jsx("div",{className:"mt-0.5 text-[10px] text-text-muted",children:t.desc})]},t.id))}),e.jsx("div",{className:"mt-3 rounded-xl border border-border bg-bg-secondary p-4 space-y-4",children:le?e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(te,{className:"h-4 w-4 text-accent2 animate-spin"}),e.jsx("span",{className:"text-sm font-medium text-text",children:"Installing F5-TTS..."})]}),e.jsx("div",{className:"rounded-lg bg-bg border border-bg-tertiary p-3",children:e.jsx("p",{className:"text-xs text-text-secondary font-mono break-all",children:de})})]}):e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-success shadow-[0_0_6px_rgba(34,197,94,0.4)]"}),e.jsx("span",{className:"text-sm text-text",children:"F5-TTS Running"})]})}),e.jsxs("div",{className:"rounded-lg border border-bg-tertiary bg-bg p-3 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-xs font-medium text-text-secondary",children:"Cloned Voices"}),e.jsxs("button",{onClick:ue,disabled:z,className:"flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium text-accent2 border border-border hover:border-accent2/50 hover:bg-accent2/10 transition-colors disabled:opacity-50",children:[z?e.jsx(te,{className:"h-3 w-3 animate-spin"}):e.jsx(Fe,{className:"h-3 w-3 rotate-180"}),"Upload Voice"]})]}),e.jsx("p",{className:"text-[10px] text-text-muted leading-relaxed",children:"Upload 5-10 seconds of clear speech. No background noise or music. Adding a transcript significantly improves quality."}),K.length>0?e.jsx("div",{className:"space-y-1.5",children:K.map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-bg-tertiary px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(B,{className:"h-3.5 w-3.5 text-accent2"}),e.jsx("span",{className:"text-sm text-text capitalize",children:t.name}),e.jsxs("span",{className:"text-[9px] text-text-muted",children:[(t.sizeBytes/1024).toFixed(0),"KB"]}),t.hasTranscript&&e.jsx("span",{className:"rounded bg-success/15 px-1 py-0.5 text-[8px] text-success",children:"transcript"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>pe(t.name),className:"text-text-muted hover:text-accent2 transition-colors",title:"Preview voice",children:e.jsx($e,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:()=>he(t.name),className:"text-text-muted hover:text-error transition-colors",title:"Delete voice",children:e.jsx("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{d:"M3 6h18M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"})})})]})]},t.name))}):e.jsx("p",{className:"text-xs text-text-muted",children:"No cloned voices yet. Upload a 5-10 second WAV reference to clone any voice."})]})]})})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"mb-1 flex items-center gap-2 text-xs text-text-muted",children:["LiveKit URL",(v==null?void 0:v.livekit)&&e.jsx("span",{className:"rounded bg-success/15 px-1.5 py-0.5 text-[9px] font-medium text-success",children:"Connected"})]}),e.jsx("input",{value:l,onChange:t=>k(t.target.value),placeholder:"ws://localhost:7880",className:"w-full rounded-lg border border-border bg-bg px-3 py-2 text-sm text-text outline-none focus:border-accent"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-xs text-text-muted",children:"Voice"}),e.jsx("div",{className:"grid grid-cols-4 gap-2",children:ne.map(t=>e.jsx("button",{type:"button",onClick:()=>E(t),className:`rounded-lg border px-3 py-2 text-sm transition-all capitalize ${V===t?"border-accent bg-accent/10 text-text":"border-border text-text-secondary hover:border-border-light hover:text-text"}`,children:t},t))}),e.jsx("p",{className:"mt-2 text-xs text-text-muted",children:"F5-TTS voice cloning via MLX. Upload a 5-10 second reference audio to clone any voice."})]}),V&&e.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-bg px-3 py-2",children:[e.jsx(B,{className:"h-3.5 w-3.5 text-accent-hover"}),e.jsx("span",{className:"text-xs text-text-muted",children:"Selected:"}),e.jsx("span",{className:"text-xs font-mono text-text-secondary",children:V}),e.jsx("span",{className:"ml-auto rounded bg-accent/15 px-1.5 py-0.5 text-[9px] font-medium text-purple-light",children:((J=A.find(t=>t.id===w))==null?void 0:J.name)||w})]})]})]}),e.jsxs("button",{onClick:ge,disabled:x,className:"flex items-center gap-2 rounded-lg bg-accent px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-accent/80 disabled:opacity-50",children:[e.jsx(Re,{className:"h-4 w-4"}),x?"Saving...":"Save Settings"]})]})}export{mt as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SettingsPanel-B7jrFmeR.js","assets/index-CgHHe41p.js","assets/index-CtD9JOx2.css","assets/Input-BGGQDAyP.js","assets/clsx-B-dksMZM.js","assets/PageHeader-CwcMp_4A.js","assets/chevron-right-CA8HOEP4.js","assets/Tooltip-Chg08x7x.js","assets/circle-check-big-hiNdH5H3.js","assets/mic-DjXDp1Js.js","assets/refresh-cw-_C-4Cd_3.js","assets/wifi-off-DKKYhVWL.js","assets/download-C-DdF4cx.js","assets/play-D3Nbm1Cz.js","assets/save-B02XWwgN.js","assets/SecurityPanel-_Saqrvw7.js","assets/AuditPanel-CLc6IVvA.js","assets/clipboard-list-BnOtwHQm.js","assets/funnel-C_bR-Dz5.js","assets/AutonomyPanel-E6arcbAb.js","assets/rotate-ccw-DWyVAH19.js","assets/radio-BTFO9FV9.js","assets/bot-C4CRICZX.js","assets/server-CvEvPDpX.js","assets/network-C_MOo5My.js","assets/message-square-WJp1dTaM.js","assets/TitanCanvas-Da6TxxdJ.js","assets/chevron-up-n_3KVmjQ.js","assets/plus-CJKkM9fM.js","assets/file-text-CyC_OxlA.js","assets/terminal-BVErXh5C.js","assets/book-open-B00IpKZA.js","assets/pencil-C6SVDEUL.js","assets/search-CHteSk-9.js","assets/send-DkMQeZAz.js","assets/flask-conical-BKbKUYhz.js","assets/clock-BFgCJnqQ.js","assets/archive-aaQ0bgj_.js","assets/test-tube-JSgqEqJs.js","assets/VoiceOverlay-D_jfyVe9.js","assets/volume-2-CELMZXsT.js","assets/folder-7bWz46dM.js","assets/check-BJMHM0tu.js","assets/shield-check-DQeYCvwF.js","assets/external-link-CPAx2HBG.js","assets/chart-column-lnilxGq2.js","assets/link-CfLpUR24.js","assets/trash-2-kiHv5iAF.js","assets/TitanCanvas-BfitWg9R.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as s,j as e,_ as i}from"./index-CgHHe41p.js";import{c as o}from"./clsx-B-dksMZM.js";const r=s.lazy(()=>i(()=>import("./SettingsPanel-B7jrFmeR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),n=s.lazy(()=>i(()=>import("./SecurityPanel-_Saqrvw7.js"),__vite__mapDeps([15,1,2,5,6]))),d=s.lazy(()=>i(()=>import("./AuditPanel-CLc6IVvA.js"),__vite__mapDeps([16,1,2,17,10,18]))),c=s.lazy(()=>i(()=>import("./AutonomyPanel-E6arcbAb.js"),__vite__mapDeps([19,1,2,14,8,10,20,21,22,23,24,13,25,26,27,28,29,30,31,32,33,34,9,35,36,37,38,39,6,40,41,42,43,44,11,45,46,47,48]))),x=[{id:"general",label:"General"},{id:"autonomy",label:"Autonomy"},{id:"security",label:"Security"},{id:"audit",label:"Audit Log"}];function _(){const[t,a]=s.useState("general");return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"shrink-0 px-5 pt-4 pb-0",children:[e.jsx("h1",{className:"text-sm font-semibold text-text mb-3",children:"Settings"}),e.jsx("div",{className:"flex items-center gap-0.5 border-b border-border/50",children:x.map(l=>e.jsxs("button",{onClick:()=>a(l.id),className:o("px-3 py-2 text-xs font-medium transition-colors relative",t===l.id?"text-accent":"text-text-muted hover:text-text-secondary"),children:[l.label,t===l.id&&e.jsx("div",{className:"absolute bottom-0 left-1 right-1 h-[2px] bg-accent rounded-full"})]},l.id))})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto p-5",children:e.jsxs(s.Suspense,{fallback:e.jsx("div",{className:"skeleton-shimmer h-40 rounded-lg"}),children:[t==="general"&&e.jsx(r,{}),t==="autonomy"&&e.jsx(c,{}),t==="security"&&e.jsx(n,{}),t==="audit"&&e.jsx(d,{})]})})]})}export{_ as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SkillsPanel-DYG8avbV.js","assets/index-CgHHe41p.js","assets/index-CtD9JOx2.css","assets/PageHeader-CwcMp_4A.js","assets/chevron-right-CA8HOEP4.js","assets/search-CHteSk-9.js","assets/trash-2-kiHv5iAF.js","assets/download-C-DdF4cx.js","assets/McpPanel-CNB1BMz-.js","assets/plug-Dpu9RRBi.js","assets/refresh-cw-_C-4Cd_3.js","assets/plus-CJKkM9fM.js","assets/server-CvEvPDpX.js","assets/test-tube-JSgqEqJs.js","assets/IntegrationsPanel-BGEkU649.js","assets/circle-check-big-hiNdH5H3.js","assets/save-B02XWwgN.js","assets/ChannelsPanel-9SjAkSHg.js","assets/MeshPanel-DjYZh3P3.js","assets/DataTable-CrBYCT2O.js","assets/shield-check-DQeYCvwF.js","assets/EvalHarnessPanel-BykaelQd.js","assets/layers-3BMDaZuk.js","assets/trending-up-xhvUQXWt.js","assets/play-D3Nbm1Cz.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as l,j as e,_ as t}from"./index-CgHHe41p.js";import{c as o}from"./clsx-B-dksMZM.js";const n=l.lazy(()=>t(()=>import("./SkillsPanel-DYG8avbV.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),r=l.lazy(()=>t(()=>import("./McpPanel-CNB1BMz-.js"),__vite__mapDeps([8,1,2,9,10,11,12,13,6]))),c=l.lazy(()=>t(()=>import("./IntegrationsPanel-BGEkU649.js"),__vite__mapDeps([14,1,2,9,15,16,4]))),d=l.lazy(()=>t(()=>import("./ChannelsPanel-9SjAkSHg.js"),__vite__mapDeps([17,1,2,3,4,10,15,16]))),x=l.lazy(()=>t(()=>import("./MeshPanel-DjYZh3P3.js"),__vite__mapDeps([18,1,2,19,10,20]))),m=l.lazy(()=>t(()=>import("./EvalHarnessPanel-BykaelQd.js"),__vite__mapDeps([21,1,2,22,23,10,24,4,15]))),_=[{id:"skills",label:"Skills"},{id:"mcp",label:"MCP Servers"},{id:"integrations",label:"Integrations"},{id:"channels",label:"Channels"},{id:"mesh",label:"Mesh Network"},{id:"evals",label:"Eval Harness"}];function v(){const[s,i]=l.useState("skills");return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"shrink-0 px-5 pt-4 pb-0",children:[e.jsx("h1",{className:"text-sm font-semibold text-text mb-3",children:"Tools & Connections"}),e.jsx("div",{className:"flex items-center gap-0.5 border-b border-border/50",children:_.map(a=>e.jsxs("button",{onClick:()=>i(a.id),className:o("px-3 py-2 text-xs font-medium transition-colors relative",s===a.id?"text-accent":"text-text-muted hover:text-text-secondary"),children:[a.label,s===a.id&&e.jsx("div",{className:"absolute bottom-0 left-1 right-1 h-[2px] bg-accent rounded-full"})]},a.id))})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto p-5",children:e.jsxs(l.Suspense,{fallback:e.jsx("div",{className:"skeleton-shimmer h-40 rounded-lg"}),children:[s==="skills"&&e.jsx(n,{}),s==="mcp"&&e.jsx(r,{}),s==="integrations"&&e.jsx(c,{}),s==="channels"&&e.jsx(d,{}),s==="mesh"&&e.jsx(x,{}),s==="evals"&&e.jsx(m,{})]})})]})}export{v as default};
|