@ethosagent/cli 0.2.4 → 0.2.6
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/data/coordinator/ETHOS.md +28 -0
- package/data/coordinator/config.yaml +5 -0
- package/data/coordinator/toolset.yaml +8 -0
- package/dist/index.js +7522 -2961
- package/package.json +7 -6
- package/web/assets/{index-C71wjBh-.css → index-BlnRaxwq.css} +1 -1
- package/web/assets/{index-BwN-_Sop.js → index-P6QBFWq3.js} +2 -2
- package/web/index.html +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethosagent/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Ethos — TypeScript AI agent framework where personality is architecture. Curated toolsets, first-person identities, scoped memory.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -52,14 +52,15 @@
|
|
|
52
52
|
"react": "^18.3.0",
|
|
53
53
|
"ws": "^8.20.0",
|
|
54
54
|
"zod": "^4.3.6",
|
|
55
|
-
"@ethosagent/types": "0.2.
|
|
56
|
-
"@ethosagent/
|
|
55
|
+
"@ethosagent/types": "0.2.6",
|
|
56
|
+
"@ethosagent/team-supervisor": "0.0.0",
|
|
57
|
+
"@ethosagent/core": "0.2.6"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
|
-
"@ethosagent/cron": "0.0.0",
|
|
60
|
-
"@ethosagent/storage-fs": "0.0.0",
|
|
61
60
|
"@ethosagent/wiring": "0.0.0",
|
|
62
|
-
"@ethosagent/web-api": "0.0.0"
|
|
61
|
+
"@ethosagent/web-api": "0.0.0",
|
|
62
|
+
"@ethosagent/cron": "0.0.0",
|
|
63
|
+
"@ethosagent/storage-fs": "0.0.0"
|
|
63
64
|
},
|
|
64
65
|
"optionalDependencies": {
|
|
65
66
|
"@xenova/transformers": "^2.17.2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--ethos-bg: #0f0f0f;--ethos-bg-elevated: #1a1a1a;--ethos-border: #2a2a2a;--ethos-text: rgba(255, 255, 255, .9);--ethos-text-dim: rgba(255, 255, 255, .55);--sidebar-width: 220px;--sidebar-collapsed-width: 56px;--topbar-height: 48px;--drawer-width: 280px}html,body,#root{height:100%;margin:0;background:var(--ethos-bg);color:var(--ethos-text);font-family:Geist,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}.app-shell{display:grid;grid-template-columns:var(--sidebar-width) 1fr;grid-template-rows:var(--topbar-height) 1fr;grid-template-areas:"sidebar topbar" "sidebar main";height:100vh}.app-shell.collapsed{grid-template-columns:var(--sidebar-collapsed-width) 1fr}@media(min-width:1280px){.app-shell.drawer-open{grid-template-columns:var(--sidebar-width) 1fr var(--drawer-width);grid-template-areas:"sidebar topbar drawer" "sidebar main drawer"}.app-shell.drawer-open.collapsed{grid-template-columns:var(--sidebar-collapsed-width) 1fr var(--drawer-width)}}.topbar{grid-area:topbar;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--ethos-border);background:var(--ethos-bg-elevated)}.topbar-brand{font-weight:600;letter-spacing:.01em;color:var(--ethos-text)}.topbar-right{display:flex;align-items:center;gap:12px}.topbar-status{font-size:12px;color:var(--ethos-text-dim)}.topbar-drawer-toggle{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:transparent;border:1px solid transparent;border-radius:6px;color:var(--ethos-text-dim);cursor:pointer;transition:color 80ms cubic-bezier(.16,1,.3,1),background-color 80ms cubic-bezier(.16,1,.3,1),border-color 80ms cubic-bezier(.16,1,.3,1)}.topbar-drawer-toggle:hover{color:var(--ethos-text);background:#ffffff0a}.topbar-drawer-toggle.active{color:var(--ethos-text);border-color:var(--ethos-border);background:#ffffff0a}.topbar-drawer-toggle:focus-visible{outline:2px solid #4a9eff;outline-offset:2px}.sidebar{grid-area:sidebar;border-right:1px solid var(--ethos-border);background:var(--ethos-bg-elevated);display:flex;flex-direction:column;overflow:hidden}.sidebar-header{display:flex;align-items:center;height:var(--topbar-height);padding:0 16px;border-bottom:1px solid var(--ethos-border);cursor:pointer;-webkit-user-select:none;user-select:none}.sidebar-header-title{font-weight:600;margin-left:8px}.sidebar-nav{display:flex;flex-direction:column;padding:12px 8px;gap:2px}.sidebar-nav-section{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--ethos-text-dim);padding:12px 8px 4px}.sidebar-nav-item{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:6px;color:var(--ethos-text);text-decoration:none;font-size:13px;transition:background-color 80ms cubic-bezier(.16,1,.3,1)}.sidebar-nav-item:hover{background:#ffffff0a}.sidebar-nav-item.active{background:#4a9eff1f;color:#7fb6ff}.app-shell.collapsed .sidebar-nav-label,.app-shell.collapsed .sidebar-nav-section,.app-shell.collapsed .sidebar-header-title{display:none}.app-main{grid-area:main;overflow:auto;padding:24px}.empty-pane{color:var(--ethos-text-dim);font-size:14px}.onboarding{display:flex;flex-direction:column;align-items:center;gap:24px;max-width:520px;margin:48px auto;padding:0 24px}.onboarding-progress{display:flex;gap:8px}.onboarding-dot{width:6px;height:6px;border-radius:9999px;background:var(--ethos-border);transition:background-color .18s cubic-bezier(.16,1,.3,1)}.onboarding-dot.active{background:var(--ethos-text)}.onboarding-step{display:flex;flex-direction:column;gap:16px;width:100%}.onboarding-headline{font-size:24px;font-weight:600;color:var(--ethos-text);margin:0;letter-spacing:-.005em}.onboarding-supporting{font-size:14px;color:var(--ethos-text-dim);margin:0;line-height:1.55}.onboarding-trust{font-size:13px;color:var(--ethos-text-dim);margin:4px 0 0;line-height:1.55;padding:12px 14px;background:#4a9eff0f;border-left:2px solid #4a9eff;border-radius:0 4px 4px 0}.onboarding-actions{display:flex;justify-content:flex-end;margin-top:8px}.onboarding-providers{display:flex;flex-direction:column;gap:6px}.onboarding-provider{display:grid;grid-template-columns:16px 1fr;align-items:start;gap:4px 10px;padding:10px 12px;border-radius:4px;border:1px solid var(--ethos-border);cursor:pointer;transition:background-color 80ms cubic-bezier(.16,1,.3,1),border-color 80ms cubic-bezier(.16,1,.3,1)}.onboarding-provider:hover{background:#ffffff08}.onboarding-provider.active{border-color:#4a9eff;background:#4a9eff0f}.onboarding-provider input[type=radio]{margin-top:3px;accent-color:#4a9eff}.onboarding-provider-label{font-size:14px;font-weight:500;color:var(--ethos-text)}.onboarding-provider-hint{grid-column:2;font-size:12px;color:var(--ethos-text-dim);line-height:1.5}.onboarding-field{display:flex;flex-direction:column;gap:6px}.onboarding-field-label{font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:500;color:var(--ethos-text-dim)}.onboarding-error{padding:8px 10px;border-radius:4px;border:1px solid #f87171;background:#f8717114;color:#f87171;font-size:12px}.onboarding-personalities{display:flex;flex-direction:column;gap:8px}.onboarding-personality{display:flex;align-items:flex-start;gap:14px;padding:14px;border-radius:8px;border:1px solid var(--ethos-border);background:var(--ethos-bg-elevated);text-align:left;cursor:pointer;color:var(--ethos-text);transition:border-color .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.onboarding-personality:hover{border-color:var(--ethos-border-strong, #3a3a3a)}.onboarding-personality.active{border-width:2px;padding:13px}.onboarding-personality-text{display:flex;flex-direction:column;gap:6px;flex:1}.onboarding-personality-name{font-size:15px;font-weight:500;color:var(--ethos-text)}.onboarding-personality-description{font-size:13px;color:var(--ethos-text-dim);line-height:1.4}.onboarding-personality-sample{display:flex;flex-direction:column;gap:4px;margin-top:6px;padding:8px 10px;background:#0003;border-radius:4px}.onboarding-personality-sample-user{font-size:12px;color:var(--ethos-text-dim);font-style:italic}.onboarding-personality-sample-user:before{content:"> ";opacity:.5}.onboarding-personality-sample-reply{font-size:12px;color:var(--ethos-text);line-height:1.5}@media(prefers-reduced-motion:reduce){.onboarding-personality,.onboarding-dot,.onboarding-provider{transition:none}}.cron-tab{display:flex;flex-direction:column;gap:16px}.cron-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.cron-status-paused{color:var(--ethos-text-dim);font-weight:400;font-size:12px;margin-left:6px}.cron-muted{color:var(--ethos-text-dim);font-size:12px}.cron-history{display:flex;flex-direction:column;gap:8px;padding:4px 0}.cron-history-row{display:flex;flex-direction:column;gap:4px}.cron-history-when{color:var(--ethos-text-dim);font-size:11px}.cron-history-output{margin:0;padding:10px 12px;background:#00000040;border-radius:4px;font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.5;color:var(--ethos-text);max-height:300px;overflow:auto;white-space:pre-wrap}.sessions-tab{display:flex;flex-direction:column;gap:16px}.sessions-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.sessions-count{font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;font-variant-numeric:tabular-nums;color:var(--ethos-text-dim)}.sessions-mono{font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;font-variant-numeric:tabular-nums}.sessions-num{text-align:right;display:inline-block;width:100%}.sessions-row-actions{display:inline-flex}.sessions-row-trigger{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background:transparent;border:1px solid transparent;color:var(--ethos-text-dim);cursor:pointer;transition:background-color 80ms cubic-bezier(.16,1,.3,1)}.sessions-row-trigger:hover{background:#ffffff0f;color:var(--ethos-text)}.sessions-row-trigger:focus-visible{outline:2px solid var(--accent, #4a9eff);outline-offset:1px}.sessions-loadmore{display:flex;justify-content:center;padding:16px 0}.app-main:has(.chat-tab){padding:0;overflow:hidden}.chat-tab{display:grid;grid-template-rows:auto 1fr auto;height:100%;background:var(--ethos-bg)}.personality-bar{display:flex;flex-direction:column;border-bottom:1px solid var(--ethos-border);background:var(--ethos-bg-elevated)}.personality-bar-stripe{height:3px;width:100%;flex-shrink:0}.personality-bar-content{display:flex;align-items:center;gap:12px;padding:10px 16px}.personality-bar-text{display:flex;flex-direction:column;gap:2px;flex:1}.personality-bar-name{font-size:14px;font-weight:500;color:var(--ethos-text);letter-spacing:-.005em}.personality-bar-model{font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;color:var(--ethos-text-dim);font-variant-numeric:tabular-nums}.personality-bar-actions{display:flex;align-items:center;gap:4px;flex-shrink:0}.personality-switcher-trigger,.personality-bar-new{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:4px;background:transparent;border:1px solid transparent;color:var(--ethos-text-dim);cursor:pointer;transition:background-color 80ms cubic-bezier(.16,1,.3,1)}.personality-switcher-trigger:hover,.personality-bar-new:hover{background:#ffffff0f;color:var(--ethos-text)}.personality-switcher-trigger:focus-visible,.personality-bar-new:focus-visible{outline:2px solid var(--accent, #4a9eff);outline-offset:1px}.personality-menu-row{display:inline-flex;align-items:center;gap:10px;min-width:160px}.personality-menu-name{flex:1;font-size:13px}.personality-menu-active{color:var(--ethos-text-dim);font-size:12px}.message-list{overflow-y:auto;display:flex;flex-direction:column;gap:16px;padding:24px 0}.message-list-empty{display:grid;place-items:center;height:100%;color:var(--ethos-text-dim);font-size:14px;padding:24px}.message-row{display:flex;padding:0 24px;max-width:800px;width:100%;margin:0 auto}.message-row-user{justify-content:flex-end}.message-row-assistant{justify-content:flex-start}.message-user{background:var(--ethos-bg-overlay, #2a2a2a);color:var(--ethos-text);border-radius:4px;padding:10px 14px;max-width:75%;font-size:14px;line-height:1.5;white-space:pre-wrap}.message-assistant{color:var(--ethos-text);font-size:14px;line-height:1.55;max-width:100%}.message-thinking{display:inline-flex;align-items:center;gap:4px;padding:8px 0;opacity:.7}.thinking-dot{width:6px;height:6px;border-radius:9999px;background:var(--ethos-text-dim);animation:thinking-bounce 1.2s ease-in-out infinite}.thinking-dot:nth-child(2){animation-delay:.2s}.thinking-dot:nth-child(3){animation-delay:.4s}@keyframes thinking-bounce{0%,60%,to{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}@media(prefers-reduced-motion:reduce){.thinking-dot{animation:none;opacity:.6}}.streaming-cursor{display:inline-block;width:8px;height:1em;background:currentColor;margin-left:2px;vertical-align:text-bottom;animation:streaming-cursor-blink .9s step-end infinite}@keyframes streaming-cursor-blink{0%,50%{opacity:1}51%,to{opacity:0}}.composer{display:flex;gap:8px;padding:12px 24px 16px;border-top:1px solid var(--ethos-border);background:var(--ethos-bg);align-items:flex-end;max-width:800px;width:100%;margin:0 auto;box-sizing:border-box}.composer .ant-input{flex:1}.chat-error{margin:0 24px 8px;padding:10px 14px;border-radius:4px;border:1px solid #f87171;background:#f8717114;color:#f87171;font-size:13px}.chat-tab{position:relative}.approval-modal{position:absolute;top:51px;right:16px;z-index:10;width:min(420px,calc(100vw - 32px));background:var(--ethos-bg-elevated);border:1px solid var(--ethos-border);border-top:2px solid var(--accent, #4a9eff);border-radius:8px;box-shadow:0 12px 32px -8px #000000b3;padding:16px;display:flex;flex-direction:column;gap:12px;animation:approval-slide-down .18s cubic-bezier(.16,1,.3,1)}@keyframes approval-slide-down{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.approval-modal-header{display:flex;align-items:center;gap:8px;margin:0}.approval-modal-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:9999px;background:#f59e0b26;color:#f59e0b;font-size:13px;font-weight:600;flex-shrink:0}.approval-modal-title{font-size:14px;font-weight:500;color:var(--ethos-text);margin:0}.approval-modal-title code{font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;background:#ffffff0f;padding:1px 6px;border-radius:4px}.approval-modal-reason{margin:0;font-size:13px;color:var(--ethos-text-dim);line-height:1.5}.approval-modal-args{margin:0;padding:10px 12px;background:#00000040;border-radius:4px;font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.5;color:var(--ethos-text);max-height:180px;overflow:auto;white-space:pre-wrap;word-break:break-word}.approval-modal-scope{border:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.approval-modal-scope-legend{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--ethos-text-dim);font-weight:500;padding:0;margin-bottom:4px}.approval-modal-scope-option{display:grid;grid-template-columns:16px 1fr;align-items:start;gap:4px 8px;padding:6px 8px;border-radius:4px;cursor:pointer;transition:background-color 80ms cubic-bezier(.16,1,.3,1)}.approval-modal-scope-option:hover{background:#ffffff0a}.approval-modal-scope-option input[type=radio]{margin-top:3px;accent-color:var(--accent, #4a9eff)}.approval-modal-scope-label{font-size:13px;color:var(--ethos-text);font-weight:500}.approval-modal-scope-hint{grid-column:2;font-size:12px;color:var(--ethos-text-dim);line-height:1.4}.approval-modal-error{padding:8px 10px;border-radius:4px;border:1px solid #f87171;background:#f8717114;color:#f87171;font-size:12px}.approval-modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:4px}@media(prefers-reduced-motion:reduce){.approval-modal{animation:none}}.tool-chip-pending-approval .tool-chip-status{color:#f59e0b}.tool-chip-pending-approval{border-color:#f59e0b66;background:#f59e0b0f}.tool-chip-wrapper{display:block;margin:6px 0}.tool-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 8px;border-radius:4px;border:1px solid var(--ethos-border);background:var(--ethos-bg-elevated);color:var(--ethos-text);font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;font-variant-numeric:tabular-nums;cursor:pointer;max-width:100%;text-align:left;transition:background-color 80ms cubic-bezier(.16,1,.3,1)}.tool-chip:hover{background:#ffffff0d}.tool-chip:focus-visible{outline:2px solid var(--accent, #4a9eff);outline-offset:1px}.tool-chip-status{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;font-size:11px}.tool-chip-running .tool-chip-status{color:var(--ethos-text-dim)}.tool-chip-ok .tool-chip-status{color:#4ade80}.tool-chip-failed .tool-chip-status{color:#f87171}.tool-chip-name{color:var(--ethos-text);font-weight:500}.tool-chip-args{color:var(--ethos-text-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.tool-chip-duration{color:var(--ethos-text-dim);font-size:11px;margin-left:4px}.tool-chip-spinner{display:inline-block;width:10px;height:10px;border:1.5px solid var(--ethos-text-dim);border-top-color:transparent;border-radius:9999px;animation:tool-chip-spin .7s linear infinite}@keyframes tool-chip-spin{to{transform:rotate(360deg)}}.tool-chip-detail{margin-top:6px;margin-left:18px;padding:10px 12px;border-left:2px solid var(--ethos-border);background:#ffffff05;border-radius:0 4px 4px 0;font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;display:flex;flex-direction:column;gap:8px}.tool-chip-section{display:flex;flex-direction:column;gap:4px}.tool-chip-section-label{font-family:Geist,system-ui,sans-serif;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--ethos-text-dim);font-weight:500}.tool-chip-section pre{margin:0;padding:0;white-space:pre-wrap;word-break:break-word;color:var(--ethos-text);font-size:12px;line-height:1.5;max-height:320px;overflow:auto}.streaming-cursor-trailing{margin-left:4px}@media(prefers-reduced-motion:reduce){.streaming-cursor{animation:none;opacity:.6}.tool-chip-spinner{animation:none;border-top-color:var(--ethos-text-dim)}}.right-drawer{grid-area:drawer;border-left:1px solid var(--ethos-border);background:var(--ethos-bg-elevated);display:flex;flex-direction:column;overflow:hidden}.right-drawer-header{display:flex;align-items:center;justify-content:space-between;height:var(--topbar-height);padding:0 16px;border-bottom:1px solid var(--ethos-border)}.right-drawer-title{font-weight:600;font-size:13px;color:var(--ethos-text)}.right-drawer-close{width:24px;height:24px;border:none;background:transparent;color:var(--ethos-text-dim);font-size:18px;line-height:1;cursor:pointer;border-radius:4px}.right-drawer-close:hover{background:#ffffff0f;color:var(--ethos-text)}.right-drawer-section{padding:16px;border-bottom:1px solid var(--ethos-border);overflow-y:auto}.right-drawer-section:last-child{border-bottom:none}.right-drawer-section-title{margin:0 0 8px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--ethos-text-dim)}.right-drawer-empty{font-size:12px;color:var(--ethos-text-dim);line-height:1.5}.right-drawer-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.tool-stream-row{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--ethos-text)}.tool-stream-dot{flex-shrink:0;width:14px;text-align:center;font-size:10px;line-height:1}.tool-stream-dot--running{color:#4a9eff;animation:tool-stream-pulse 1.2s ease-in-out infinite}.tool-stream-dot--ok{color:#5fbf68}.tool-stream-dot--error{color:#d65454}.tool-stream-name{font-family:Geist Mono,ui-monospace,monospace;font-size:11.5px;flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool-stream-duration{font-size:11px;color:var(--ethos-text-dim);font-variant-numeric:tabular-nums}@keyframes tool-stream-pulse{0%,to{opacity:1}50%{opacity:.4}}@media(prefers-reduced-motion:reduce){.tool-stream-dot--running{animation:none;opacity:.8}}.notification-row{margin:0}.notification-button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;text-align:left;padding:8px 10px;background:transparent;border:1px solid transparent;border-radius:6px;color:var(--ethos-text);cursor:pointer;transition:background-color 80ms cubic-bezier(.16,1,.3,1),border-color 80ms cubic-bezier(.16,1,.3,1)}.notification-button:hover{background:#ffffff0a;border-color:var(--ethos-border)}.notification-button:focus-visible{outline:2px solid #4a9eff;outline-offset:2px}.notification-summary{font-size:12.5px;line-height:1.4}.notification-time{font-size:11px;color:var(--ethos-text-dim);font-variant-numeric:tabular-nums}.usage-block{margin:0;display:flex;flex-direction:column;gap:4px}.usage-row{display:flex;justify-content:space-between;font-size:12px}.usage-row dt{margin:0;color:var(--ethos-text-dim)}.usage-row dd{margin:0;color:var(--ethos-text);font-variant-numeric:tabular-nums}@media(max-width:1279.98px){.right-drawer{position:fixed;top:var(--topbar-height);right:0;bottom:0;width:var(--drawer-width);max-width:90vw;z-index:20;box-shadow:-8px 0 24px #00000059}}.palette-results{max-height:60vh;overflow-y:auto;padding:8px 0}.palette-empty{padding:24px 16px;text-align:center;color:var(--ethos-text-dim);font-size:13px}.palette-group{padding:4px 0}.palette-group+.palette-group{border-top:1px solid var(--ethos-border);margin-top:4px;padding-top:8px}.palette-group-title{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--ethos-text-dim);padding:4px 16px 6px}.palette-row{display:flex;align-items:center;justify-content:space-between;width:100%;padding:8px 16px;background:transparent;border:none;color:var(--ethos-text);text-align:left;cursor:pointer;font-size:13px;transition:background-color 80ms cubic-bezier(.16,1,.3,1)}.palette-row:hover{background:#ffffff0a}.palette-row--selected{background:#4a9eff1f;color:#7fb6ff}.palette-row--disabled{color:#ffffff59;cursor:not-allowed}.palette-row--disabled:hover{background:transparent}.palette-row-label{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:12px}.palette-row-hint{color:var(--ethos-text-dim);font-size:11px;font-family:Geist Mono,ui-monospace,monospace;font-variant-numeric:tabular-nums}.settings-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.settings-advanced-toggle{display:inline-flex;align-items:center;gap:8px}.settings-advanced-label{font-size:12px;color:var(--ethos-text-dim)}.skills-toolbar,.mesh-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.skills-count,.mesh-count{color:var(--ethos-text-dim);font-size:12px}.memory-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.memory-meta{display:inline-flex;align-items:center}.memory-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.mobile-tabbar{display:none}.mobile-more-list{list-style:none;margin:0;padding:0}.mobile-more-link{display:block;width:100%;text-align:left;padding:14px 4px;background:transparent;border:none;border-bottom:1px solid var(--ethos-border);color:var(--ethos-text);font-size:15px;cursor:pointer}.mobile-more-link:hover{background:#ffffff0a}@media(max-width:767.98px){.app-shell{grid-template-columns:1fr;grid-template-rows:var(--topbar-height) 1fr 60px;grid-template-areas:"topbar" "main" "tabbar"}.sidebar{display:none}.topbar{padding:0 12px}.app-main{padding:16px}.mobile-tabbar{grid-area:tabbar;display:flex;align-items:stretch;background:var(--ethos-bg-elevated);border-top:1px solid var(--ethos-border)}.mobile-tabbar-item{flex:1 1 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:6px 4px;background:transparent;border:none;color:var(--ethos-text-dim);font-size:10px;text-decoration:none;cursor:pointer;min-height:44px}.mobile-tabbar-item.active{color:#7fb6ff}.mobile-tabbar-icon{font-size:18px;line-height:1}.mobile-tabbar-label{font-size:10px;letter-spacing:.02em}.right-drawer{width:100vw;max-width:100vw;box-shadow:none}.chat-tab{padding-bottom:16px}}
|
|
1
|
+
:root{--ethos-bg: #0f0f0f;--ethos-bg-elevated: #1a1a1a;--ethos-border: #2a2a2a;--ethos-text: rgba(255, 255, 255, .9);--ethos-text-dim: rgba(255, 255, 255, .55);--sidebar-width: 220px;--sidebar-collapsed-width: 56px;--topbar-height: 48px;--drawer-width: 280px}html,body,#root{height:100%;margin:0;background:var(--ethos-bg);color:var(--ethos-text);font-family:Geist,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}.app-shell{display:grid;grid-template-columns:var(--sidebar-width) 1fr;grid-template-rows:var(--topbar-height) 1fr;grid-template-areas:"sidebar topbar" "sidebar main";height:100vh}.app-shell.collapsed{grid-template-columns:var(--sidebar-collapsed-width) 1fr}@media(min-width:1280px){.app-shell.drawer-open{grid-template-columns:var(--sidebar-width) 1fr var(--drawer-width);grid-template-areas:"sidebar topbar drawer" "sidebar main drawer"}.app-shell.drawer-open.collapsed{grid-template-columns:var(--sidebar-collapsed-width) 1fr var(--drawer-width)}}.topbar{grid-area:topbar;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--ethos-border);background:var(--ethos-bg-elevated)}.topbar-brand{font-weight:600;letter-spacing:.01em;color:var(--ethos-text)}.topbar-right{display:flex;align-items:center;gap:12px}.topbar-status{font-size:12px;color:var(--ethos-text-dim)}.topbar-drawer-toggle{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:transparent;border:1px solid transparent;border-radius:6px;color:var(--ethos-text-dim);cursor:pointer;transition:color 80ms cubic-bezier(.16,1,.3,1),background-color 80ms cubic-bezier(.16,1,.3,1),border-color 80ms cubic-bezier(.16,1,.3,1)}.topbar-drawer-toggle:hover{color:var(--ethos-text);background:#ffffff0a}.topbar-drawer-toggle.active{color:var(--ethos-text);border-color:var(--ethos-border);background:#ffffff0a}.topbar-drawer-toggle:focus-visible{outline:2px solid #4a9eff;outline-offset:2px}.sidebar{grid-area:sidebar;border-right:1px solid var(--ethos-border);background:var(--ethos-bg-elevated);display:flex;flex-direction:column;overflow:hidden}.sidebar-header{display:flex;align-items:center;height:var(--topbar-height);padding:0 16px;border-bottom:1px solid var(--ethos-border);cursor:pointer;-webkit-user-select:none;user-select:none}.sidebar-header-title{font-weight:600;margin-left:8px}.sidebar-nav{display:flex;flex-direction:column;padding:12px 8px;gap:2px}.sidebar-nav-section{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--ethos-text-dim);padding:12px 8px 4px}.sidebar-nav-item{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:6px;color:var(--ethos-text);text-decoration:none;font-size:13px;transition:background-color 80ms cubic-bezier(.16,1,.3,1)}.sidebar-nav-item:hover{background:#ffffff0a}.sidebar-nav-item.active{background:#4a9eff1f;color:#7fb6ff}.app-shell.collapsed .sidebar-nav-label,.app-shell.collapsed .sidebar-nav-section,.app-shell.collapsed .sidebar-header-title{display:none}.app-main{grid-area:main;overflow:auto;padding:24px}.empty-pane{color:var(--ethos-text-dim);font-size:14px}.onboarding{display:flex;flex-direction:column;align-items:center;gap:24px;max-width:520px;margin:48px auto;padding:0 24px}.onboarding-progress{display:flex;gap:8px}.onboarding-dot{width:6px;height:6px;border-radius:9999px;background:var(--ethos-border);transition:background-color .18s cubic-bezier(.16,1,.3,1)}.onboarding-dot.active{background:var(--ethos-text)}.onboarding-step{display:flex;flex-direction:column;gap:16px;width:100%}.onboarding-headline{font-size:24px;font-weight:600;color:var(--ethos-text);margin:0;letter-spacing:-.005em}.onboarding-supporting{font-size:14px;color:var(--ethos-text-dim);margin:0;line-height:1.55}.onboarding-trust{font-size:13px;color:var(--ethos-text-dim);margin:4px 0 0;line-height:1.55;padding:12px 14px;background:#4a9eff0f;border-left:2px solid #4a9eff;border-radius:0 4px 4px 0}.onboarding-actions{display:flex;justify-content:flex-end;margin-top:8px}.onboarding-providers{display:flex;flex-direction:column;gap:6px}.onboarding-provider{display:grid;grid-template-columns:16px 1fr;align-items:start;gap:4px 10px;padding:10px 12px;border-radius:4px;border:1px solid var(--ethos-border);cursor:pointer;transition:background-color 80ms cubic-bezier(.16,1,.3,1),border-color 80ms cubic-bezier(.16,1,.3,1)}.onboarding-provider:hover{background:#ffffff08}.onboarding-provider.active{border-color:#4a9eff;background:#4a9eff0f}.onboarding-provider input[type=radio]{margin-top:3px;accent-color:#4a9eff}.onboarding-provider-label{font-size:14px;font-weight:500;color:var(--ethos-text)}.onboarding-provider-hint{grid-column:2;font-size:12px;color:var(--ethos-text-dim);line-height:1.5}.onboarding-field{display:flex;flex-direction:column;gap:6px}.onboarding-field-label{font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:500;color:var(--ethos-text-dim)}.onboarding-error{padding:8px 10px;border-radius:4px;border:1px solid #f87171;background:#f8717114;color:#f87171;font-size:12px}.onboarding-personalities{display:flex;flex-direction:column;gap:8px}.onboarding-personality{display:flex;align-items:flex-start;gap:14px;padding:14px;border-radius:8px;border:1px solid var(--ethos-border);background:var(--ethos-bg-elevated);text-align:left;cursor:pointer;color:var(--ethos-text);transition:border-color .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.onboarding-personality:hover{border-color:var(--ethos-border-strong, #3a3a3a)}.onboarding-personality.active{border-width:2px;padding:13px}.onboarding-personality-text{display:flex;flex-direction:column;gap:6px;flex:1}.onboarding-personality-name{font-size:15px;font-weight:500;color:var(--ethos-text)}.onboarding-personality-description{font-size:13px;color:var(--ethos-text-dim);line-height:1.4}.onboarding-personality-sample{display:flex;flex-direction:column;gap:4px;margin-top:6px;padding:8px 10px;background:#0003;border-radius:4px}.onboarding-personality-sample-user{font-size:12px;color:var(--ethos-text-dim);font-style:italic}.onboarding-personality-sample-user:before{content:"> ";opacity:.5}.onboarding-personality-sample-reply{font-size:12px;color:var(--ethos-text);line-height:1.5}@media(prefers-reduced-motion:reduce){.onboarding-personality,.onboarding-dot,.onboarding-provider{transition:none}}.cron-tab{display:flex;flex-direction:column;gap:16px}.cron-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.cron-status-paused{color:var(--ethos-text-dim);font-weight:400;font-size:12px;margin-left:6px}.cron-muted{color:var(--ethos-text-dim);font-size:12px}.cron-history{display:flex;flex-direction:column;gap:8px;padding:4px 0}.cron-history-row{display:flex;flex-direction:column;gap:4px}.cron-history-when{color:var(--ethos-text-dim);font-size:11px}.cron-history-output{margin:0;padding:10px 12px;background:#00000040;border-radius:4px;font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.5;color:var(--ethos-text);max-height:300px;overflow:auto;white-space:pre-wrap}.sessions-tab{display:flex;flex-direction:column;gap:16px}.sessions-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.sessions-count{font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;font-variant-numeric:tabular-nums;color:var(--ethos-text-dim)}.sessions-mono{font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;font-variant-numeric:tabular-nums}.sessions-num{text-align:right;display:inline-block;width:100%}.sessions-row-actions{display:inline-flex}.sessions-row-trigger{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background:transparent;border:1px solid transparent;color:var(--ethos-text-dim);cursor:pointer;transition:background-color 80ms cubic-bezier(.16,1,.3,1)}.sessions-row-trigger:hover{background:#ffffff0f;color:var(--ethos-text)}.sessions-row-trigger:focus-visible{outline:2px solid var(--accent, #4a9eff);outline-offset:1px}.sessions-loadmore{display:flex;justify-content:center;padding:16px 0}.app-main:has(.chat-tab){padding:0;overflow:hidden}.chat-tab{display:grid;grid-template-rows:auto 1fr auto;height:100%;background:var(--ethos-bg)}.personality-bar{display:flex;flex-direction:column;border-bottom:1px solid var(--ethos-border);background:var(--ethos-bg-elevated)}.personality-bar-stripe{height:3px;width:100%;flex-shrink:0}.personality-bar-content{display:flex;align-items:center;gap:12px;padding:10px 16px}.personality-bar-text{display:flex;flex-direction:column;gap:2px;flex:1}.personality-bar-name{font-size:14px;font-weight:500;color:var(--ethos-text);letter-spacing:-.005em}.personality-bar-model{font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;color:var(--ethos-text-dim);font-variant-numeric:tabular-nums}.personality-bar-actions{display:flex;align-items:center;gap:4px;flex-shrink:0}.personality-switcher-trigger,.personality-bar-new{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:4px;background:transparent;border:1px solid transparent;color:var(--ethos-text-dim);cursor:pointer;transition:background-color 80ms cubic-bezier(.16,1,.3,1)}.personality-switcher-trigger:hover,.personality-bar-new:hover{background:#ffffff0f;color:var(--ethos-text)}.personality-switcher-trigger:focus-visible,.personality-bar-new:focus-visible{outline:2px solid var(--accent, #4a9eff);outline-offset:1px}.personality-menu-row{display:inline-flex;align-items:center;gap:10px;min-width:160px}.personality-menu-name{flex:1;font-size:13px}.personality-menu-active{color:var(--ethos-text-dim);font-size:12px}.message-list{overflow-y:auto;display:flex;flex-direction:column;gap:16px;padding:24px 0}.message-list-empty{display:grid;place-items:center;height:100%;color:var(--ethos-text-dim);font-size:14px;padding:24px}.message-row{display:flex;padding:0 24px;max-width:800px;width:100%;margin:0 auto}.message-row-user{justify-content:flex-end}.message-row-assistant{justify-content:flex-start}.message-user{background:var(--ethos-bg-overlay, #2a2a2a);color:var(--ethos-text);border-radius:4px;padding:10px 14px;max-width:75%;font-size:14px;line-height:1.5;white-space:pre-wrap}.message-assistant{color:var(--ethos-text);font-size:14px;line-height:1.55;max-width:100%}.message-thinking{display:inline-flex;align-items:center;gap:4px;padding:8px 0;opacity:.7}.thinking-dot{width:6px;height:6px;border-radius:9999px;background:var(--ethos-text-dim);animation:thinking-bounce 1.2s ease-in-out infinite}.thinking-dot:nth-child(2){animation-delay:.2s}.thinking-dot:nth-child(3){animation-delay:.4s}@keyframes thinking-bounce{0%,60%,to{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}@media(prefers-reduced-motion:reduce){.thinking-dot{animation:none;opacity:.6}}.streaming-cursor{display:inline-block;width:8px;height:1em;background:currentColor;margin-left:2px;vertical-align:text-bottom;animation:streaming-cursor-blink .9s step-end infinite}@keyframes streaming-cursor-blink{0%,50%{opacity:1}51%,to{opacity:0}}.composer{display:flex;gap:8px;padding:12px 24px 16px;border-top:1px solid var(--ethos-border);background:var(--ethos-bg);align-items:flex-end;max-width:800px;width:100%;margin:0 auto;box-sizing:border-box}.composer .ant-input{flex:1}.chat-error{margin:0 24px 8px;padding:10px 14px;border-radius:4px;border:1px solid #f87171;background:#f8717114;color:#f87171;font-size:13px}.chat-tab{position:relative}.approval-modal{position:absolute;top:51px;right:16px;z-index:10;width:min(420px,calc(100vw - 32px));background:var(--ethos-bg-elevated);border:1px solid var(--ethos-border);border-top:2px solid var(--accent, #4a9eff);border-radius:8px;box-shadow:0 12px 32px -8px #000000b3;padding:16px;display:flex;flex-direction:column;gap:12px;animation:approval-slide-down .18s cubic-bezier(.16,1,.3,1)}@keyframes approval-slide-down{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.approval-modal-header{display:flex;align-items:center;gap:8px;margin:0}.approval-modal-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:9999px;background:#f59e0b26;color:#f59e0b;font-size:13px;font-weight:600;flex-shrink:0}.approval-modal-title{font-size:14px;font-weight:500;color:var(--ethos-text);margin:0}.approval-modal-title code{font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;background:#ffffff0f;padding:1px 6px;border-radius:4px}.approval-modal-reason{margin:0;font-size:13px;color:var(--ethos-text-dim);line-height:1.5}.approval-modal-args{margin:0;padding:10px 12px;background:#00000040;border-radius:4px;font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.5;color:var(--ethos-text);max-height:180px;overflow:auto;white-space:pre-wrap;word-break:break-word}.approval-modal-scope{border:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.approval-modal-scope-legend{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--ethos-text-dim);font-weight:500;padding:0;margin-bottom:4px}.approval-modal-scope-option{display:grid;grid-template-columns:16px 1fr;align-items:start;gap:4px 8px;padding:6px 8px;border-radius:4px;cursor:pointer;transition:background-color 80ms cubic-bezier(.16,1,.3,1)}.approval-modal-scope-option:hover{background:#ffffff0a}.approval-modal-scope-option input[type=radio]{margin-top:3px;accent-color:var(--accent, #4a9eff)}.approval-modal-scope-label{font-size:13px;color:var(--ethos-text);font-weight:500}.approval-modal-scope-hint{grid-column:2;font-size:12px;color:var(--ethos-text-dim);line-height:1.4}.approval-modal-error{padding:8px 10px;border-radius:4px;border:1px solid #f87171;background:#f8717114;color:#f87171;font-size:12px}.approval-modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:4px}@media(prefers-reduced-motion:reduce){.approval-modal{animation:none}}.tool-chip-pending-approval{border-color:#f59e0b66;background:#f59e0b0f}.tool-chip-wrapper{display:block;margin:6px 0}.tool-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 8px;border-radius:4px;border:1px solid var(--ethos-border);background:var(--ethos-bg-elevated);color:var(--ethos-text);font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;font-variant-numeric:tabular-nums;cursor:pointer;max-width:100%;text-align:left;transition:background-color 80ms cubic-bezier(.16,1,.3,1)}.tool-chip:hover{background:#ffffff0d}.tool-chip:focus-visible{outline:2px solid var(--accent, #4a9eff);outline-offset:1px}.tool-chip-status{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;font-size:11px}.tool-chip-running .tool-chip-status{color:var(--ethos-text-dim)}.tool-chip-ok .tool-chip-status{color:#4ade80}.tool-chip-failed .tool-chip-status{color:#f87171}.tool-chip-pending-approval .tool-chip-status{color:#f59e0b}.tool-chip-name{color:var(--ethos-text);font-weight:500}.tool-chip-args{color:var(--ethos-text-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.tool-chip-duration{color:var(--ethos-text-dim);font-size:11px;margin-left:4px}.tool-chip-spinner{display:inline-block;width:10px;height:10px;border:1.5px solid var(--ethos-text-dim);border-top-color:transparent;border-radius:9999px;animation:tool-chip-spin .7s linear infinite}@keyframes tool-chip-spin{to{transform:rotate(360deg)}}.tool-chip-detail{margin-top:6px;margin-left:18px;padding:10px 12px;border-left:2px solid var(--ethos-border);background:#ffffff05;border-radius:0 4px 4px 0;font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;display:flex;flex-direction:column;gap:8px}.tool-chip-section{display:flex;flex-direction:column;gap:4px}.tool-chip-section-label{font-family:Geist,system-ui,sans-serif;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--ethos-text-dim);font-weight:500}.tool-chip-section pre{margin:0;padding:0;white-space:pre-wrap;word-break:break-word;color:var(--ethos-text);font-size:12px;line-height:1.5;max-height:320px;overflow:auto}.streaming-cursor-trailing{margin-left:4px}@media(prefers-reduced-motion:reduce){.streaming-cursor{animation:none;opacity:.6}.tool-chip-spinner{animation:none;border-top-color:var(--ethos-text-dim)}}.right-drawer{grid-area:drawer;border-left:1px solid var(--ethos-border);background:var(--ethos-bg-elevated);display:flex;flex-direction:column;overflow:hidden}.right-drawer-header{display:flex;align-items:center;justify-content:space-between;height:var(--topbar-height);padding:0 16px;border-bottom:1px solid var(--ethos-border)}.right-drawer-title{font-weight:600;font-size:13px;color:var(--ethos-text)}.right-drawer-close{width:24px;height:24px;border:none;background:transparent;color:var(--ethos-text-dim);font-size:18px;line-height:1;cursor:pointer;border-radius:4px}.right-drawer-close:hover{background:#ffffff0f;color:var(--ethos-text)}.right-drawer-section{padding:16px;border-bottom:1px solid var(--ethos-border);overflow-y:auto}.right-drawer-section:last-child{border-bottom:none}.right-drawer-section-title{margin:0 0 8px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--ethos-text-dim)}.right-drawer-empty{font-size:12px;color:var(--ethos-text-dim);line-height:1.5}.right-drawer-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.tool-stream-row{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--ethos-text)}.tool-stream-dot{flex-shrink:0;width:14px;text-align:center;font-size:10px;line-height:1}.tool-stream-dot--running{color:#4a9eff;animation:tool-stream-pulse 1.2s ease-in-out infinite}.tool-stream-dot--ok{color:#5fbf68}.tool-stream-dot--error{color:#d65454}.tool-stream-name{font-family:Geist Mono,ui-monospace,monospace;font-size:11.5px;flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool-stream-duration{font-size:11px;color:var(--ethos-text-dim);font-variant-numeric:tabular-nums}@keyframes tool-stream-pulse{0%,to{opacity:1}50%{opacity:.4}}@media(prefers-reduced-motion:reduce){.tool-stream-dot--running{animation:none;opacity:.8}}.notification-row{margin:0}.notification-button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;text-align:left;padding:8px 10px;background:transparent;border:1px solid transparent;border-radius:6px;color:var(--ethos-text);cursor:pointer;transition:background-color 80ms cubic-bezier(.16,1,.3,1),border-color 80ms cubic-bezier(.16,1,.3,1)}.notification-button:hover{background:#ffffff0a;border-color:var(--ethos-border)}.notification-button:focus-visible{outline:2px solid #4a9eff;outline-offset:2px}.notification-summary{font-size:12.5px;line-height:1.4}.notification-time{font-size:11px;color:var(--ethos-text-dim);font-variant-numeric:tabular-nums}.usage-block{margin:0;display:flex;flex-direction:column;gap:4px}.usage-row{display:flex;justify-content:space-between;font-size:12px}.usage-row dt{margin:0;color:var(--ethos-text-dim)}.usage-row dd{margin:0;color:var(--ethos-text);font-variant-numeric:tabular-nums}@media(max-width:1279.98px){.right-drawer{position:fixed;top:var(--topbar-height);right:0;bottom:0;width:var(--drawer-width);max-width:90vw;z-index:20;box-shadow:-8px 0 24px #00000059}}.palette-results{max-height:60vh;overflow-y:auto;padding:8px 0}.palette-empty{padding:24px 16px;text-align:center;color:var(--ethos-text-dim);font-size:13px}.palette-group{padding:4px 0}.palette-group+.palette-group{border-top:1px solid var(--ethos-border);margin-top:4px;padding-top:8px}.palette-group-title{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--ethos-text-dim);padding:4px 16px 6px}.palette-row{display:flex;align-items:center;justify-content:space-between;width:100%;padding:8px 16px;background:transparent;border:none;color:var(--ethos-text);text-align:left;cursor:pointer;font-size:13px;transition:background-color 80ms cubic-bezier(.16,1,.3,1)}.palette-row:hover{background:#ffffff0a}.palette-row--selected{background:#4a9eff1f;color:#7fb6ff}.palette-row--disabled{color:#ffffff59;cursor:not-allowed}.palette-row--disabled:hover{background:transparent}.palette-row-label{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:12px}.palette-row-hint{color:var(--ethos-text-dim);font-size:11px;font-family:Geist Mono,ui-monospace,monospace;font-variant-numeric:tabular-nums}.settings-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.settings-advanced-toggle{display:inline-flex;align-items:center;gap:8px}.settings-advanced-label{font-size:12px;color:var(--ethos-text-dim)}.skills-toolbar,.mesh-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.skills-count,.mesh-count{color:var(--ethos-text-dim);font-size:12px}.memory-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.memory-meta{display:inline-flex;align-items:center}.memory-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.mobile-tabbar{display:none}.mobile-more-list{list-style:none;margin:0;padding:0}.mobile-more-link{display:block;width:100%;text-align:left;padding:14px 4px;background:transparent;border:none;border-bottom:1px solid var(--ethos-border);color:var(--ethos-text);font-size:15px;cursor:pointer}.mobile-more-link:hover{background:#ffffff0a}@media(max-width:767.98px){.app-shell{grid-template-columns:1fr;grid-template-rows:var(--topbar-height) 1fr 60px;grid-template-areas:"topbar" "main" "tabbar"}.sidebar{display:none}.topbar{padding:0 12px}.app-main{padding:16px}.mobile-tabbar{grid-area:tabbar;display:flex;align-items:stretch;background:var(--ethos-bg-elevated);border-top:1px solid var(--ethos-border)}.mobile-tabbar-item{flex:1 1 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:6px 4px;background:transparent;border:none;color:var(--ethos-text-dim);font-size:10px;text-decoration:none;cursor:pointer;min-height:44px}.mobile-tabbar-item.active{color:#7fb6ff}.mobile-tabbar-icon{font-size:18px;line-height:1}.mobile-tabbar-label{font-size:10px;letter-spacing:.02em}.right-drawer{width:100vw;max-width:100vw;box-shadow:none}.chat-tab{padding-bottom:16px}}
|
|
@@ -534,7 +534,7 @@ description: One-line summary
|
|
|
534
534
|
---
|
|
535
535
|
|
|
536
536
|
Write the skill body here.
|
|
537
|
-
`},children:[I.jsx(Ct.Item,{label:"ID",name:"skillId",rules:[{required:!0,message:"Required"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Letters, digits, dash, underscore only."}],children:I.jsx(vn,{autoFocus:!0})}),I.jsx(Ct.Item,{label:"Body",name:"body",rules:[{required:!0}],children:I.jsx(vn.TextArea,{rows:14,style:{fontFamily:"Geist Mono, monospace"}})})]})})}function bue({personalityId:e,skill:t,onClose:n}){const r=Un(),{notification:o}=Mn.useApp(),[i,a]=c.useState(t.body),s=Rn({mutationFn:()=>It.personalities.skillsUpdate({personalityId:e,skillId:t.id,body:i}),onSuccess:()=>{r.invalidateQueries({queryKey:["personalities","skills",e]}),o.success({message:"Saved",placement:"topRight"}),n()},onError:u=>o.error({message:"Save failed",description:u.message})});return I.jsx($r,{open:!0,title:`Edit ${t.name}`,onCancel:n,onOk:()=>s.mutate(),okText:"Save",okButtonProps:{loading:s.isPending,disabled:i===t.body},destroyOnClose:!0,width:680,children:I.jsx(vn.TextArea,{value:i,autoSize:{minRows:14,maxRows:24},style:{fontFamily:"Geist Mono, monospace",fontSize:12.5},onChange:u=>a(u.target.value)})})}function Sue({personalityId:e,existingIds:t,onClose:n}){const r=Un(),{notification:o}=Mn.useApp(),[i,a]=c.useState([]),s=Ln({queryKey:["skills","list"],queryFn:()=>It.skills.list()}),u=Rn({mutationFn:()=>It.personalities.skillsImportGlobal({personalityId:e,skillIds:i}),onSuccess:m=>{r.invalidateQueries({queryKey:["personalities","skills",e]}),o.success({message:`Imported ${m.imported.length} skill${m.imported.length===1?"":"s"}`,placement:"topRight"}),n()},onError:m=>o.error({message:"Import failed",description:m.message})}),f=c.useMemo(()=>{var m;return(((m=s.data)==null?void 0:m.skills)??[]).filter(p=>!t.has(p.id))},[s.data,t]);return I.jsx($r,{open:!0,title:"Import skills from global library",onCancel:n,onOk:()=>u.mutate(),okText:"Import",okButtonProps:{loading:u.isPending,disabled:i.length===0},destroyOnClose:!0,width:620,children:s.isLoading?I.jsx(dr,{}):f.length===0?I.jsx(Tn,{description:"Every global skill is already imported (or the global library is empty)."}):I.jsxs(I.Fragment,{children:[I.jsx(Nt.Paragraph,{type:"secondary",style:{marginTop:0},children:"Skills already in this personality are excluded. Imported skills become independent copies; later edits to the global file don't propagate."}),I.jsx(Vo,{mode:"multiple",value:i,onChange:a,style:{width:"100%"},placeholder:"Pick skills to copy in",options:f.map(m=>({label:`${m.name} — ${m.id}`,value:m.id}))})]})})}function Cue({source:e,existingIds:t,onClose:n,onDone:r}){const o=Un(),{notification:i}=Mn.useApp(),[a,s]=c.useState(`${e.id}-copy`),u=Rn({mutationFn:()=>It.personalities.duplicate({id:e.id,newId:a}),onSuccess:()=>{o.invalidateQueries({queryKey:["personalities","list"]}),o.invalidateQueries({queryKey:["palette","personalities"]}),i.success({message:`Duplicated → ${a}`,placement:"topRight"}),r(a)},onError:p=>i.error({message:"Duplicate failed",description:p.message})}),f=/^[a-z0-9_-]+$/.test(a),m=t.has(a);return I.jsx($r,{open:!0,title:`Duplicate ${e.name}`,onCancel:n,onOk:()=>u.mutate(),okText:"Duplicate",okButtonProps:{loading:u.isPending,disabled:!f||m},destroyOnClose:!0,children:I.jsxs(Ct,{layout:"vertical",children:[I.jsxs(Nt.Paragraph,{type:"secondary",style:{marginTop:0},children:["Copies all four files (ETHOS.md, toolset.yaml, config.yaml, skills/) into"," ",I.jsx(Nt.Text,{code:!0,children:"~/.ethos/personalities/<new-id>/"}),". The editor opens on the copy when this completes."]}),I.jsx(Ct.Item,{label:"New ID",required:!0,validateStatus:m||!f&&a?"error":void 0,help:m?"Already taken.":f?void 0:"Lowercase, dash/underscore-separated.",children:I.jsx(vn,{autoFocus:!0,value:a,onChange:p=>s(p.target.value.toLowerCase())})})]})})}function xue({id:e,initialMcpServers:t}){var p;const n=Un(),{notification:r}=Mn.useApp(),[o,i]=c.useState(new Set(t)),[a,s]=c.useState(!1),u=Ln({queryKey:["plugins","list"],queryFn:()=>It.plugins.list()}),f=Rn({mutationFn:()=>It.personalities.update({id:e,mcp_servers:[...o]}),onSuccess:()=>{n.invalidateQueries({queryKey:["personalities","get",e]}),n.invalidateQueries({queryKey:["personalities","list"]}),s(!1),r.success({message:"MCP servers saved",placement:"topRight"})},onError:g=>r.error({message:"Save failed",description:g.message})}),m=((p=u.data)==null?void 0:p.mcpServers)??[];return u.isLoading?I.jsx("div",{style:{display:"grid",placeItems:"center",height:120},children:I.jsx(dr,{})}):m.length===0?I.jsx(Tn,{image:Tn.PRESENTED_IMAGE_SIMPLE,description:I.jsxs("span",{children:["No MCP servers configured. Edit"," ",I.jsx(Nt.Text,{code:!0,children:"~/.ethos/mcp.json"}),"."]})}):I.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[I.jsx(Nt.Text,{type:"secondary",style:{fontSize:13},children:"Check each MCP server this personality can reach. Unchecked servers are invisible to this role."}),I.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:m.map(g=>I.jsxs(bl,{checked:o.has(g.name),onChange:h=>{const b=new Set(o);h.target.checked?b.add(g.name):b.delete(g.name),i(b),s(!0)},"aria-label":`Enable MCP server ${g.name} for ${e}`,children:[I.jsx("span",{style:{fontWeight:500},children:g.name})," ",I.jsx(Ai,{bordered:!1,style:{fontSize:11},children:g.transport}),g.command?I.jsx(Nt.Text,{type:"secondary",style:{fontFamily:"Geist Mono, monospace",fontSize:11},children:g.command}):g.url?I.jsx(Nt.Text,{type:"secondary",style:{fontFamily:"Geist Mono, monospace",fontSize:11},children:g.url}):null]},g.name))}),I.jsx(Qt,{type:"primary",disabled:!a,loading:f.isPending,onClick:()=>f.mutate(),style:{alignSelf:"flex-start"},children:"Save"})]})}function wue({id:e,initialPlugins:t}){var m;const n=Un(),{notification:r}=Mn.useApp(),[o,i]=c.useState(new Set(t)),a=Ln({queryKey:["plugins","list"],queryFn:()=>It.plugins.list()}),s=Rn({mutationFn:p=>It.personalities.update({id:e,plugins:p}),onMutate:()=>({prev:new Set(o)}),onSuccess:()=>{n.invalidateQueries({queryKey:["personalities","get",e]}),n.invalidateQueries({queryKey:["personalities","list"]})},onError:(p,g,h)=>{h&&i(h.prev),r.error({message:"Save failed",description:p.message})}}),u=((m=a.data)==null?void 0:m.plugins)??[];if(a.isLoading)return I.jsx("div",{style:{display:"grid",placeItems:"center",height:120},children:I.jsx(dr,{})});if(u.length===0)return I.jsx(Tn,{image:Tn.PRESENTED_IMAGE_SIMPLE,description:I.jsxs("span",{children:["No plugins installed."," ",I.jsx(Nt.Text,{code:!0,children:"ethos plugin install <path>"})]})});function f(p,g){const h=new Set(o);g?h.add(p):h.delete(p),i(h),s.mutate([...h])}return I.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[o.size===0?I.jsx(Wb,{type:"info",showIcon:!0,message:"0 plugins attached",description:"Toggle a plugin below to enable it for this personality.",style:{marginBottom:4}}):null,u.map(p=>I.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10},children:[I.jsx(kS,{size:"small",checked:o.has(p.id),loading:s.isPending,onChange:g=>f(p.id,g),"aria-label":`Attach ${p.name} to ${e}`,style:{marginTop:2,flexShrink:0}}),I.jsxs("div",{children:[I.jsx("div",{style:{fontWeight:500},children:p.name}),I.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[I.jsx(Nt.Text,{style:{fontFamily:"Geist Mono, monospace",fontSize:12},type:"secondary",children:p.id}),I.jsx(Ai,{bordered:!1,style:{fontSize:11},children:p.source}),p.pluginContractMajor!==null?I.jsxs(Nt.Text,{type:"secondary",style:{fontSize:11},children:["v",p.pluginContractMajor]}):null]}),p.description?I.jsx(Nt.Text,{type:"secondary",style:{fontSize:12},children:p.description}):null]})]},p.id))]})}function $ue(){const{data:e,isLoading:t,error:n}=Ln({queryKey:["plugins","list"],queryFn:()=>It.plugins.list()}),{data:r,isLoading:o}=Ln({queryKey:["personalities","list"],queryFn:()=>It.personalities.list()}),i=t||o;if(n)return I.jsxs(Nt.Text,{type:"danger",children:["Failed to load plugins: ",n.message]});const a=(e==null?void 0:e.plugins)??[],s=(e==null?void 0:e.mcpServers)??[],u=(r==null?void 0:r.personalities)??[];return I.jsx("div",{className:"plugins-tab",children:I.jsx(Il,{defaultActiveKey:"matrix",items:[{key:"matrix",label:`Plugins (${a.length})`,children:I.jsx(Eue,{plugins:a,personalities:u,loading:i})},{key:"mcp",label:`MCP Servers (${s.length})`,children:I.jsx(Pue,{servers:s})}]})})}function Eue({plugins:e,personalities:t,loading:n}){const[r,o]=c.useState(()=>window.innerWidth<900);if(typeof window<"u"){const a=window.matchMedia("(max-width: 899px)");a.onchange=s=>o(s.matches)}if(n)return I.jsx(Pa,{active:!0,paragraph:{rows:5}});if(e.length===0)return I.jsx(Tn,{image:Tn.PRESENTED_IMAGE_SIMPLE,description:I.jsxs("span",{children:["No plugins installed."," ",I.jsx(Nt.Text,{code:!0,children:"ethos plugin install <path>"})," drops one into ~/.ethos/plugins/."]})});const i=e.filter(a=>t.every(s=>!(s.plugins??[]).includes(a.id)));return I.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[i.length>0?I.jsx(Wb,{type:"warning",showIcon:!0,message:`${i.length} ${i.length===1?"plugin is":"plugins are"} installed but not attached to any personality — they're inert until attached.`,closable:!0}):null,r?I.jsx(Oue,{plugins:e,personalities:t}):I.jsx(Iue,{plugins:e,personalities:t})]})}function Iue({plugins:e,personalities:t}){const n=t.map(r=>({title:I.jsx("span",{style:{fontSize:12},children:r.name}),key:r.id,width:120,align:"center",render:(o,i)=>I.jsx(_T,{plugin:i,personality:r})}));return I.jsx("div",{role:"grid","aria-label":"Plugin attachment matrix",children:I.jsx(Br,{rowKey:"id",dataSource:e,pagination:!1,size:"small",columns:[{title:"Plugin",key:"plugin",render:(r,o)=>I.jsxs("div",{children:[I.jsx("div",{style:{fontWeight:500},children:o.name}),I.jsx(Nt.Text,{style:{fontFamily:"Geist Mono, monospace",fontSize:12},type:"secondary",children:o.id})]})},...n]})})}function Oue({plugins:e,personalities:t}){return I.jsx(C4,{accordion:!1,items:e.map(n=>({key:n.id,label:I.jsxs("span",{children:[I.jsx("span",{style:{fontWeight:500},children:n.name})," ",I.jsx(Nt.Text,{style:{fontFamily:"Geist Mono, monospace",fontSize:12},type:"secondary",children:n.id})]}),children:I.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:t.map(r=>I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[I.jsx(_T,{plugin:n,personality:r}),I.jsx("span",{children:r.name})]},r.id))})}))})}function _T({plugin:e,personality:t}){const n=Un(),{notification:r}=Mn.useApp(),o=t.plugins??[],i=o.includes(e.id),a=Rn({mutationFn:u=>It.personalities.update({id:t.id,plugins:u}),onMutate:async u=>{await n.cancelQueries({queryKey:["personalities","list"]});const f=n.getQueryData(["personalities","list"]);return n.setQueryData(["personalities","list"],m=>m&&{...m,personalities:m.personalities.map(p=>p.id===t.id?{...p,plugins:u}:p)}),{prev:f}},onError:(u,f,m)=>{m!=null&&m.prev&&n.setQueryData(["personalities","list"],m.prev),r.error({message:"Attach failed",description:`Could not update ${t.name}`})},onSettled:()=>{n.invalidateQueries({queryKey:["personalities","list"]})}});function s(u){const f=u?[...o,e.id]:o.filter(m=>m!==e.id);a.mutate(f)}return I.jsx(bl,{checked:i,disabled:a.isPending,onChange:u=>s(u.target.checked),"aria-label":`Attach ${e.name} to ${t.name}`})}function Pue({servers:e}){return e.length===0?I.jsx(Tn,{image:Tn.PRESENTED_IMAGE_SIMPLE,description:I.jsxs("span",{children:["No MCP servers configured. Edit"," ",I.jsx(Nt.Text,{code:!0,children:"~/.ethos/mcp.json"})," or run"," ",I.jsx(Nt.Text,{code:!0,children:"ethos plugin add-mcp"}),"."]})}):I.jsx(Br,{rowKey:"name",dataSource:e,pagination:!1,size:"small",columns:[{title:"Name",dataIndex:"name",key:"name",render:t=>I.jsx("strong",{children:t})},{title:"Transport",dataIndex:"transport",key:"transport",width:120,render:t=>I.jsx(Ai,{bordered:!1,children:t})},{title:"Endpoint",key:"endpoint",render:(t,n)=>n.transport==="stdio"?n.command?I.jsx(Nt.Text,{code:!0,style:{fontSize:11},children:n.command}):I.jsx(Nt.Text,{type:"secondary",children:"missing command"}):n.url?I.jsx(Nt.Text,{code:!0,style:{fontSize:11},children:n.url}):I.jsx(Nt.Text,{type:"secondary",children:"missing url"})},{title:"Attached to",key:"attached",render:(t,n)=>I.jsx(Rue,{serverName:n.name})}]})}function Rue({serverName:e}){const{data:t}=Ln({queryKey:["personalities","list"],queryFn:()=>It.personalities.list()}),n=((t==null?void 0:t.personalities)??[]).filter(r=>(r.mcp_servers??[]).includes(e));return n.length===0?I.jsx(Nt.Text,{type:"secondary",children:"none"}):I.jsx(oi,{title:n.map(r=>r.id).join(", "),children:I.jsxs("span",{children:[n.slice(0,3).map(r=>r.name).join(", "),n.length>3?` +${n.length-3}`:""]})})}const Nue=50,_ue=400;function jue(){const e=aa(),t=Un(),{notification:n}=Mn.useApp(),[r,o]=c.useState(""),[i,a]=c.useState("");c.useEffect(()=>{const w=setTimeout(()=>a(r.trim()),_ue);return()=>clearTimeout(w)},[r]);const s=c.useMemo(()=>["sessions","list",{q:i}],[i]),{data:u,error:f,isLoading:m,isFetching:p,hasNextPage:g,fetchNextPage:h,isFetchingNextPage:b}=Yk({queryKey:s,queryFn:({pageParam:w})=>It.sessions.list({limit:Nue,...i?{q:i}:{},...w?{cursor:w}:{}}),initialPageParam:null,getNextPageParam:w=>w.nextCursor}),S=c.useMemo(()=>(u==null?void 0:u.pages.flatMap(w=>w.sessions))??[],[u]),y=Rn({mutationFn:w=>It.sessions.delete({id:w}),onSuccess:()=>{t.invalidateQueries({queryKey:["sessions","list"]})},onError:w=>{n.error({message:"Could not delete session",description:w instanceof Error?w.message:String(w),placement:"topRight"})}}),C=Rn({mutationFn:w=>It.sessions.fork({id:w}),onSuccess:w=>{t.invalidateQueries({queryKey:["sessions","list"]}),e(`/chat?session=${w.session.id}`)},onError:w=>{n.error({message:"Could not fork session",description:w instanceof Error?w.message:String(w),placement:"topRight"})}});return f?I.jsx("div",{style:{padding:24},children:I.jsxs("span",{style:{color:"#f87171"},children:["Failed to load sessions: ",f.message]})}):I.jsxs("div",{className:"sessions-tab",children:[I.jsxs("header",{className:"sessions-toolbar",children:[I.jsx(vn.Search,{placeholder:"Search sessions (FTS5 over message content)…",value:r,onChange:w=>o(w.target.value),allowClear:!0,loading:p&&!b,style:{maxWidth:480}}),I.jsxs("span",{className:"sessions-count",children:[S.length," ",S.length===1?"session":"sessions",g?"+":""]})]}),m?I.jsx("div",{style:{display:"grid",placeItems:"center",height:200},children:I.jsx(dr,{})}):I.jsxs(I.Fragment,{children:[I.jsx(Br,{rowKey:"id",dataSource:S,pagination:!1,size:"small",locale:{emptyText:i?`No sessions match "${i}".`:"No sessions yet. Start a chat to create one."},onRow:w=>({onClick:$=>{$.target.closest(".sessions-row-actions")||e(`/chat?session=${w.id}`)},style:{cursor:"pointer"}}),columns:[{title:"ID",dataIndex:"id",width:120,render:w=>I.jsxs("span",{className:"sessions-mono",children:[w.slice(0,8),"…"]})},{title:"Personality",dataIndex:"personalityId",width:140,render:w=>w??"—"},{title:"Model",dataIndex:"model",ellipsis:!0,render:w=>I.jsx("span",{className:"sessions-mono",children:w})},{title:"Tokens",width:140,render:(w,$)=>I.jsx("span",{className:"sessions-mono sessions-num",children:kue($.usage.inputTokens+$.usage.outputTokens)})},{title:"Cost",width:90,render:(w,$)=>I.jsx("span",{className:"sessions-mono sessions-num",children:zue($.usage.estimatedCostUsd)})},{title:"Updated",dataIndex:"updatedAt",width:180,render:w=>I.jsx("span",{className:"sessions-mono",children:Due(w)})},{title:"",width:56,align:"right",render:(w,$)=>I.jsx(Tue,{id:$.id,onOpen:()=>e(`/chat?session=${$.id}`),onFork:()=>C.mutate($.id),onDelete:()=>y.mutate($.id),deleting:y.isPending&&y.variables===$.id})}]}),g?I.jsx("div",{className:"sessions-loadmore",children:I.jsx(Qt,{onClick:()=>h(),loading:b,disabled:b,children:"Load more"})}):null]})]})}function Tue({id:e,onOpen:t,onFork:n,onDelete:r,deleting:o}){const i=[{key:"open",label:"Open"},{key:"fork",label:"Fork"},{key:"delete",label:I.jsx(Ol,{title:"Delete this session?",description:"The conversation history is permanently removed.",okText:"Delete",okButtonProps:{danger:!0,loading:o},cancelText:"Cancel",onConfirm:a=>{a==null||a.stopPropagation(),r()},children:I.jsx("span",{style:{color:"#f87171"},children:"Delete"})})}];return I.jsx("div",{role:"toolbar","aria-label":`Actions for ${e}`,className:"sessions-row-actions",onClick:a=>a.stopPropagation(),onKeyDown:a=>a.stopPropagation(),children:I.jsx(cu,{menu:{items:i,onClick:({key:a,domEvent:s})=>{s.stopPropagation(),a==="open"?t():a==="fork"&&n()}},trigger:["click"],placement:"bottomRight",children:I.jsx("button",{type:"button",className:"sessions-row-trigger","aria-label":"Row actions",children:I.jsx(Mue,{})})})})}function Mue(){return I.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"currentColor","aria-hidden":"true",children:[I.jsx("circle",{cx:"3",cy:"7",r:"1.3"}),I.jsx("circle",{cx:"7",cy:"7",r:"1.3"}),I.jsx("circle",{cx:"11",cy:"7",r:"1.3"})]})}function kue(e){return e<1e3?String(e):e<1e6?`${(e/1e3).toFixed(e<1e4?1:0)}k`:`${(e/1e6).toFixed(1)}M`}function zue(e){return e===0?"—":e<.01?"<$0.01":`$${e.toFixed(2)}`}function Due(e){const t=new Date(e).getTime(),n=Date.now(),r=Math.max(0,n-t),o=Math.floor(r/6e4);if(o<1)return"just now";if(o<60)return`${o}m ago`;const i=Math.floor(o/60);if(i<24)return`${i}h ago`;const a=Math.floor(i/24);return a<7?`${a}d ago`:new Date(e).toLocaleDateString()}function Aue(){var m,p,g;const e=Un(),{notification:t}=Mn.useApp(),[n,r]=c.useState(!1),[o]=Ct.useForm(),i=Ln({queryKey:["config"],queryFn:()=>It.config.get()}),a=Ln({queryKey:["personalities","list"],queryFn:()=>It.personalities.list()});c.useEffect(()=>{i.data&&o.setFieldsValue({provider:i.data.provider,model:i.data.model,baseUrl:i.data.baseUrl??"",personality:i.data.personality,memory:i.data.memory})},[i.data,o]);const s=Rn({mutationFn:h=>It.config.update(h),onSuccess:()=>{e.invalidateQueries({queryKey:["config"]}),t.success({message:"Settings saved",placement:"topRight"}),o.setFieldValue("apiKey","")},onError:h=>t.error({message:"Save failed",description:h.message})});if(i.isLoading)return I.jsx("div",{style:{display:"grid",placeItems:"center",height:200},children:I.jsx(dr,{})});if(i.error)return I.jsxs(Nt.Text,{type:"danger",children:["Failed to load config: ",i.error.message]});const u=((m=a.data)==null?void 0:m.personalities)??[],f=h=>{const b={provider:h.provider,model:h.model,personality:h.personality,memory:h.memory};h.apiKey&&h.apiKey.length>0&&(b.apiKey=h.apiKey),h.baseUrl!==void 0&&(b.baseUrl=h.baseUrl),s.mutate(b)};return I.jsxs("div",{className:"settings-tab",children:[I.jsxs("header",{className:"settings-toolbar",children:[I.jsx(Nt.Title,{level:4,style:{margin:0},children:"Settings"}),I.jsxs("span",{className:"settings-advanced-toggle",children:[I.jsx("span",{className:"settings-advanced-label",children:"Show advanced"}),I.jsx(kS,{checked:n,onChange:r})]})]}),I.jsxs(Ct,{form:o,layout:"vertical",onFinish:f,style:{maxWidth:640},children:[I.jsxs(Yl,{title:"Provider",size:"small",style:{marginBottom:16},children:[I.jsx(Ct.Item,{label:"Provider",name:"provider",rules:[{required:!0,message:"Required"}],children:I.jsx(vn,{placeholder:"anthropic | openrouter | openai-compat | ollama"})}),I.jsx(Ct.Item,{label:"Model",name:"model",rules:[{required:!0,message:"Required"}],children:I.jsx(vn,{placeholder:"e.g. claude-opus-4-7"})}),I.jsx(Ct.Item,{label:"API key",name:"apiKey",extra:`Active key: ${((p=i.data)==null?void 0:p.apiKeyPreview)??"<unset>"}. Leave blank to keep.`,children:I.jsx(vn.Password,{autoComplete:"off",placeholder:"paste new key to rotate"})}),n?I.jsx(Ct.Item,{label:"Base URL",name:"baseUrl",extra:"Override only when self-hosting (e.g. a private OpenAI-compat gateway).",children:I.jsx(vn,{placeholder:"https://openrouter.ai/api/v1"})}):null]}),I.jsx(Yl,{title:"Default personality",size:"small",style:{marginBottom:16},children:I.jsx(Ct.Item,{label:"Personality",name:"personality",rules:[{required:!0,message:"Required"}],extra:"Used when chat doesn't override per-session.",children:I.jsx(Vo,{loading:a.isLoading,options:u.map(h=>({label:`${h.name}${h.builtin?" (built-in)":""}`,value:h.id})),showSearch:!0,optionFilterProp:"label"})})}),I.jsx(Yl,{title:"Memory",size:"small",style:{marginBottom:16},children:I.jsx(Ct.Item,{label:"Memory mode",name:"memory",extra:"Markdown is human-editable in ~/.ethos/MEMORY.md. Vector uses local embeddings.",children:I.jsxs(ml.Group,{children:[I.jsx(ml.Button,{value:"markdown",children:"Markdown"}),I.jsx(ml.Button,{value:"vector",children:"Vector"})]})})}),n?I.jsxs(Yl,{title:"Model routing",size:"small",style:{marginBottom:16},children:[I.jsx(Nt.Paragraph,{type:"secondary",style:{marginTop:0},children:"Per-personality model overrides. Edit ~/.ethos/config.yaml directly to add entries — this surface lists the current overrides; full editing lands later."}),I.jsx(Lue,{routing:((g=i.data)==null?void 0:g.modelRouting)??{}})]}):null,I.jsx(Ct.Item,{children:I.jsx(Qt,{type:"primary",htmlType:"submit",loading:s.isPending,children:"Save"})})]})]})}function Lue({routing:e}){const t=Object.entries(e);return t.length===0?I.jsx(Nt.Text,{type:"secondary",children:"No per-personality overrides set."}):I.jsx("ul",{style:{margin:0,paddingLeft:16},children:t.map(([n,r])=>I.jsxs("li",{style:{fontSize:13,color:"var(--ethos-text)"},children:[I.jsx(Nt.Text,{code:!0,children:n})," → ",I.jsx(Nt.Text,{code:!0,children:r})]},n))})}function Fue(){return I.jsxs("div",{style:{display:"grid",placeItems:"center",height:"100%",gap:12},children:[I.jsx(dr,{}),I.jsx("span",{className:"empty-pane",children:"Signing in…"})]})}function Bue(){var o;const[e,t]=c.useState("library"),n=Ln({queryKey:["skills","list"],queryFn:()=>It.skills.list()}),r=((o=n.data)==null?void 0:o.pendingCount)??0;return I.jsx("div",{className:"skills-tab",children:I.jsx(Il,{activeKey:e,onChange:i=>t(i),items:[{key:"library",label:"Library",children:I.jsx(Hue,{skillsQuery:n})},{key:"evolver",label:I.jsxs("span",{children:["Evolver"," ",r>0?I.jsx(gS,{count:r,style:{marginLeft:6}}):null]}),children:I.jsx(Gue,{})}]})})}function Hue({skillsQuery:e}){var a;const[t,n]=c.useState(null),[r,o]=c.useState(!1);if(e.isLoading)return I.jsx("div",{style:{display:"grid",placeItems:"center",height:200},children:I.jsx(dr,{})});if(e.error)return I.jsxs(Nt.Text,{type:"danger",children:["Failed to load skills: ",e.error.message]});const i=((a=e.data)==null?void 0:a.skills)??[];return I.jsxs(I.Fragment,{children:[I.jsxs("header",{className:"skills-toolbar",children:[I.jsxs("span",{className:"skills-count",children:[i.length," ",i.length===1?"skill":"skills"]}),I.jsx(Qt,{type:"primary",onClick:()=>o(!0),children:"New skill"})]}),I.jsx(Br,{rowKey:"id",dataSource:i,pagination:!1,size:"small",locale:{emptyText:I.jsx(Tn,{image:Tn.PRESENTED_IMAGE_SIMPLE,description:"No skills installed yet. Create one to teach this agent how you work."})},columns:[{title:"Name",dataIndex:"name",key:"name",render:(s,u)=>I.jsxs("div",{children:[I.jsx("div",{style:{fontWeight:500},children:s}),I.jsxs("div",{style:{color:"rgba(255,255,255,0.45)",fontSize:11},children:[u.id,".md"]})]})},{title:"Description",dataIndex:"description",key:"description",render:s=>s||I.jsx(Nt.Text,{type:"secondary",children:"—"})},{title:"Modified",dataIndex:"modifiedAt",key:"modifiedAt",width:140,render:s=>CC(s)},{title:"",key:"actions",width:160,render:(s,u)=>I.jsx(Wue,{skill:u,onEdit:()=>n(u)})}]}),r?I.jsx(Vue,{open:r,onClose:()=>o(!1)}):null,t?I.jsx(Kue,{skill:t,onClose:()=>n(null)},t.id):null]})}function Wue({skill:e,onEdit:t}){const n=Un(),{notification:r}=Mn.useApp(),o=Rn({mutationFn:i=>It.skills.delete({id:i}),onSuccess:()=>{n.invalidateQueries({queryKey:["skills","list"]}),r.success({message:`Deleted ${e.name}`,placement:"topRight"})},onError:i=>r.error({message:"Delete failed",description:i.message})});return I.jsxs("div",{style:{display:"flex",gap:8},children:[I.jsx(Qt,{size:"small",onClick:t,children:"Edit"}),I.jsx(Ol,{title:"Delete this skill?",description:"The file is removed from disk.",onConfirm:()=>o.mutate(e.id),okText:"Delete",okButtonProps:{danger:!0},children:I.jsx(Qt,{size:"small",danger:!0,children:"Delete"})})]})}function Vue({open:e,onClose:t}){const n=Un(),{notification:r}=Mn.useApp(),[o]=Ct.useForm(),i=Rn({mutationFn:a=>It.skills.create(a),onSuccess:()=>{n.invalidateQueries({queryKey:["skills","list"]}),r.success({message:"Skill created",placement:"topRight"}),t()},onError:a=>r.error({message:"Create failed",description:a.message})});return I.jsx($r,{open:e,title:"New skill",onCancel:t,onOk:()=>o.submit(),okText:"Create",okButtonProps:{loading:i.isPending},destroyOnClose:!0,width:680,children:I.jsxs(Ct,{form:o,layout:"vertical",onFinish:a=>i.mutate(a),initialValues:{body:`---
|
|
537
|
+
`},children:[I.jsx(Ct.Item,{label:"ID",name:"skillId",rules:[{required:!0,message:"Required"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Letters, digits, dash, underscore only."}],children:I.jsx(vn,{autoFocus:!0})}),I.jsx(Ct.Item,{label:"Body",name:"body",rules:[{required:!0}],children:I.jsx(vn.TextArea,{rows:14,style:{fontFamily:"Geist Mono, monospace"}})})]})})}function bue({personalityId:e,skill:t,onClose:n}){const r=Un(),{notification:o}=Mn.useApp(),[i,a]=c.useState(t.body),s=Rn({mutationFn:()=>It.personalities.skillsUpdate({personalityId:e,skillId:t.id,body:i}),onSuccess:()=>{r.invalidateQueries({queryKey:["personalities","skills",e]}),o.success({message:"Saved",placement:"topRight"}),n()},onError:u=>o.error({message:"Save failed",description:u.message})});return I.jsx($r,{open:!0,title:`Edit ${t.name}`,onCancel:n,onOk:()=>s.mutate(),okText:"Save",okButtonProps:{loading:s.isPending,disabled:i===t.body},destroyOnClose:!0,width:680,children:I.jsx(vn.TextArea,{value:i,autoSize:{minRows:14,maxRows:24},style:{fontFamily:"Geist Mono, monospace",fontSize:12.5},onChange:u=>a(u.target.value)})})}function Sue({personalityId:e,existingIds:t,onClose:n}){const r=Un(),{notification:o}=Mn.useApp(),[i,a]=c.useState([]),s=Ln({queryKey:["skills","list"],queryFn:()=>It.skills.list()}),u=Rn({mutationFn:()=>It.personalities.skillsImportGlobal({personalityId:e,skillIds:i}),onSuccess:m=>{r.invalidateQueries({queryKey:["personalities","skills",e]}),o.success({message:`Imported ${m.imported.length} skill${m.imported.length===1?"":"s"}`,placement:"topRight"}),n()},onError:m=>o.error({message:"Import failed",description:m.message})}),f=c.useMemo(()=>{var m;return(((m=s.data)==null?void 0:m.skills)??[]).filter(p=>!t.has(p.id))},[s.data,t]);return I.jsx($r,{open:!0,title:"Import skills from global library",onCancel:n,onOk:()=>u.mutate(),okText:"Import",okButtonProps:{loading:u.isPending,disabled:i.length===0},destroyOnClose:!0,width:620,children:s.isLoading?I.jsx(dr,{}):f.length===0?I.jsx(Tn,{description:"Every global skill is already imported (or the global library is empty)."}):I.jsxs(I.Fragment,{children:[I.jsx(Nt.Paragraph,{type:"secondary",style:{marginTop:0},children:"Skills already in this personality are excluded. Imported skills become independent copies; later edits to the global file don't propagate."}),I.jsx(Vo,{mode:"multiple",value:i,onChange:a,style:{width:"100%"},placeholder:"Pick skills to copy in",options:f.map(m=>({label:`${m.name} — ${m.id}`,value:m.id}))})]})})}function Cue({source:e,existingIds:t,onClose:n,onDone:r}){const o=Un(),{notification:i}=Mn.useApp(),[a,s]=c.useState(`${e.id}-copy`),u=Rn({mutationFn:()=>It.personalities.duplicate({id:e.id,newId:a}),onSuccess:()=>{o.invalidateQueries({queryKey:["personalities","list"]}),o.invalidateQueries({queryKey:["palette","personalities"]}),i.success({message:`Duplicated → ${a}`,placement:"topRight"}),r(a)},onError:p=>i.error({message:"Duplicate failed",description:p.message})}),f=/^[a-z0-9_-]+$/.test(a),m=t.has(a);return I.jsx($r,{open:!0,title:`Duplicate ${e.name}`,onCancel:n,onOk:()=>u.mutate(),okText:"Duplicate",okButtonProps:{loading:u.isPending,disabled:!f||m},destroyOnClose:!0,children:I.jsxs(Ct,{layout:"vertical",children:[I.jsxs(Nt.Paragraph,{type:"secondary",style:{marginTop:0},children:["Copies all four files (ETHOS.md, toolset.yaml, config.yaml, skills/) into"," ",I.jsx(Nt.Text,{code:!0,children:"~/.ethos/personalities/<new-id>/"}),". The editor opens on the copy when this completes."]}),I.jsx(Ct.Item,{label:"New ID",required:!0,validateStatus:m||!f&&a?"error":void 0,help:m?"Already taken.":f?void 0:"Lowercase, dash/underscore-separated.",children:I.jsx(vn,{autoFocus:!0,value:a,onChange:p=>s(p.target.value.toLowerCase())})})]})})}function xue({id:e,initialMcpServers:t}){var p;const n=Un(),{notification:r}=Mn.useApp(),[o,i]=c.useState(new Set(t)),[a,s]=c.useState(!1),u=Ln({queryKey:["plugins","list"],queryFn:()=>It.plugins.list()}),f=Rn({mutationFn:()=>It.personalities.update({id:e,mcp_servers:[...o]}),onSuccess:()=>{n.invalidateQueries({queryKey:["personalities","get",e]}),n.invalidateQueries({queryKey:["personalities","list"]}),s(!1),r.success({message:"MCP servers saved",placement:"topRight"})},onError:g=>r.error({message:"Save failed",description:g.message})}),m=((p=u.data)==null?void 0:p.mcpServers)??[];return u.isLoading?I.jsx("div",{style:{display:"grid",placeItems:"center",height:120},children:I.jsx(dr,{})}):m.length===0?I.jsx(Tn,{image:Tn.PRESENTED_IMAGE_SIMPLE,description:I.jsxs("span",{children:["No MCP servers configured. Edit"," ",I.jsx(Nt.Text,{code:!0,children:"~/.ethos/mcp.json"}),"."]})}):I.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[I.jsx(Nt.Text,{type:"secondary",style:{fontSize:13},children:"Check each MCP server this personality can reach. Unchecked servers are invisible to this role."}),I.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:m.map(g=>I.jsxs(bl,{checked:o.has(g.name),onChange:h=>{const b=new Set(o);h.target.checked?b.add(g.name):b.delete(g.name),i(b),s(!0)},"aria-label":`Enable MCP server ${g.name} for ${e}`,children:[I.jsx("span",{style:{fontWeight:500},children:g.name})," ",I.jsx(Ai,{bordered:!1,style:{fontSize:11},children:g.transport}),g.command?I.jsx(Nt.Text,{type:"secondary",style:{fontFamily:"Geist Mono, monospace",fontSize:11},children:g.command}):g.url?I.jsx(Nt.Text,{type:"secondary",style:{fontFamily:"Geist Mono, monospace",fontSize:11},children:g.url}):null]},g.name))}),I.jsx(Qt,{type:"primary",disabled:!a,loading:f.isPending,onClick:()=>f.mutate(),style:{alignSelf:"flex-start"},children:"Save"})]})}function wue({id:e,initialPlugins:t}){var m;const n=Un(),{notification:r}=Mn.useApp(),[o,i]=c.useState(new Set(t)),a=Ln({queryKey:["plugins","list"],queryFn:()=>It.plugins.list()}),s=Rn({mutationFn:p=>It.personalities.update({id:e,plugins:p}),onMutate:()=>({prev:new Set(o)}),onSuccess:()=>{n.invalidateQueries({queryKey:["personalities","get",e]}),n.invalidateQueries({queryKey:["personalities","list"]})},onError:(p,g,h)=>{h&&i(h.prev),r.error({message:"Save failed",description:p.message})}}),u=((m=a.data)==null?void 0:m.plugins)??[];if(a.isLoading)return I.jsx("div",{style:{display:"grid",placeItems:"center",height:120},children:I.jsx(dr,{})});if(u.length===0)return I.jsx(Tn,{image:Tn.PRESENTED_IMAGE_SIMPLE,description:I.jsxs("span",{children:["No plugins installed."," ",I.jsx(Nt.Text,{code:!0,children:"ethos plugin install <path>"})]})});function f(p,g){const h=new Set(o);g?h.add(p):h.delete(p),i(h),s.mutate([...h])}return I.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[o.size===0?I.jsx(Wb,{type:"info",showIcon:!0,message:"0 plugins attached",description:"Toggle a plugin below to enable it for this personality.",style:{marginBottom:4}}):null,u.map(p=>I.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10},children:[I.jsx(kS,{size:"small",checked:o.has(p.id),loading:s.isPending,onChange:g=>f(p.id,g),"aria-label":`Attach ${p.name} to ${e}`,style:{marginTop:2,flexShrink:0}}),I.jsxs("div",{children:[I.jsx("div",{style:{fontWeight:500},children:p.name}),I.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[I.jsx(Nt.Text,{style:{fontFamily:"Geist Mono, monospace",fontSize:12},type:"secondary",children:p.id}),I.jsx(Ai,{bordered:!1,style:{fontSize:11},children:p.source}),p.pluginContractMajor!==null?I.jsxs(Nt.Text,{type:"secondary",style:{fontSize:11},children:["v",p.pluginContractMajor]}):null]}),p.description?I.jsx(Nt.Text,{type:"secondary",style:{fontSize:12},children:p.description}):null]})]},p.id))]})}function $ue(){const{data:e,isLoading:t,error:n}=Ln({queryKey:["plugins","list"],queryFn:()=>It.plugins.list()}),{data:r,isLoading:o}=Ln({queryKey:["personalities","list"],queryFn:()=>It.personalities.list()}),i=t||o;if(n)return I.jsxs(Nt.Text,{type:"danger",children:["Failed to load plugins: ",n.message]});const a=(e==null?void 0:e.plugins)??[],s=(e==null?void 0:e.mcpServers)??[],u=(r==null?void 0:r.personalities)??[];return I.jsx("div",{className:"plugins-tab",children:I.jsx(Il,{defaultActiveKey:"matrix",items:[{key:"matrix",label:`Plugins (${a.length})`,children:I.jsx(Eue,{plugins:a,personalities:u,loading:i})},{key:"mcp",label:`MCP Servers (${s.length})`,children:I.jsx(Pue,{servers:s})}]})})}function Eue({plugins:e,personalities:t,loading:n}){const[r,o]=c.useState(()=>window.innerWidth<900);if(typeof window<"u"){const a=window.matchMedia("(max-width: 899px)");a.onchange=s=>o(s.matches)}if(n)return I.jsx(Pa,{active:!0,paragraph:{rows:5}});if(e.length===0)return I.jsx(Tn,{image:Tn.PRESENTED_IMAGE_SIMPLE,description:I.jsxs("span",{children:["No plugins installed."," ",I.jsx(Nt.Text,{code:!0,children:"ethos plugin install <path>"})," drops one into ~/.ethos/plugins/."]})});const i=e.filter(a=>t.every(s=>!(s.plugins??[]).includes(a.id)));return I.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[i.length>0?I.jsx(Wb,{type:"warning",showIcon:!0,message:`${i.length} ${i.length===1?"plugin is":"plugins are"} installed but not attached to any personality — they're inert until attached.`,closable:!0}):null,r?I.jsx(Oue,{plugins:e,personalities:t}):I.jsx(Iue,{plugins:e,personalities:t})]})}function Iue({plugins:e,personalities:t}){const n=t.map(r=>({title:I.jsx("span",{style:{fontSize:12},children:r.name}),key:r.id,width:120,align:"center",render:(o,i)=>I.jsx(_T,{plugin:i,personality:r})}));return I.jsx(Br,{"aria-label":"Plugin attachment matrix",rowKey:"id",dataSource:e,pagination:!1,size:"small",columns:[{title:"Plugin",key:"plugin",render:(r,o)=>I.jsxs("div",{children:[I.jsx("div",{style:{fontWeight:500},children:o.name}),I.jsx(Nt.Text,{style:{fontFamily:"Geist Mono, monospace",fontSize:12},type:"secondary",children:o.id})]})},...n]})}function Oue({plugins:e,personalities:t}){return I.jsx(C4,{accordion:!1,items:e.map(n=>({key:n.id,label:I.jsxs("span",{children:[I.jsx("span",{style:{fontWeight:500},children:n.name})," ",I.jsx(Nt.Text,{style:{fontFamily:"Geist Mono, monospace",fontSize:12},type:"secondary",children:n.id})]}),children:I.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:t.map(r=>I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[I.jsx(_T,{plugin:n,personality:r}),I.jsx("span",{children:r.name})]},r.id))})}))})}function _T({plugin:e,personality:t}){const n=Un(),{notification:r}=Mn.useApp(),o=t.plugins??[],i=o.includes(e.id),a=Rn({mutationFn:u=>It.personalities.update({id:t.id,plugins:u}),onMutate:async u=>{await n.cancelQueries({queryKey:["personalities","list"]});const f=n.getQueryData(["personalities","list"]);return n.setQueryData(["personalities","list"],m=>m&&{...m,personalities:m.personalities.map(p=>p.id===t.id?{...p,plugins:u}:p)}),{prev:f}},onError:(u,f,m)=>{m!=null&&m.prev&&n.setQueryData(["personalities","list"],m.prev),r.error({message:"Attach failed",description:`Could not update ${t.name}`})},onSettled:()=>{n.invalidateQueries({queryKey:["personalities","list"]})}});function s(u){const f=u?[...o,e.id]:o.filter(m=>m!==e.id);a.mutate(f)}return I.jsx(bl,{checked:i,disabled:a.isPending,onChange:u=>s(u.target.checked),"aria-label":`Attach ${e.name} to ${t.name}`})}function Pue({servers:e}){return e.length===0?I.jsx(Tn,{image:Tn.PRESENTED_IMAGE_SIMPLE,description:I.jsxs("span",{children:["No MCP servers configured. Edit"," ",I.jsx(Nt.Text,{code:!0,children:"~/.ethos/mcp.json"})," or run"," ",I.jsx(Nt.Text,{code:!0,children:"ethos plugin add-mcp"}),"."]})}):I.jsx(Br,{rowKey:"name",dataSource:e,pagination:!1,size:"small",columns:[{title:"Name",dataIndex:"name",key:"name",render:t=>I.jsx("strong",{children:t})},{title:"Transport",dataIndex:"transport",key:"transport",width:120,render:t=>I.jsx(Ai,{bordered:!1,children:t})},{title:"Endpoint",key:"endpoint",render:(t,n)=>n.transport==="stdio"?n.command?I.jsx(Nt.Text,{code:!0,style:{fontSize:11},children:n.command}):I.jsx(Nt.Text,{type:"secondary",children:"missing command"}):n.url?I.jsx(Nt.Text,{code:!0,style:{fontSize:11},children:n.url}):I.jsx(Nt.Text,{type:"secondary",children:"missing url"})},{title:"Attached to",key:"attached",render:(t,n)=>I.jsx(Rue,{serverName:n.name})}]})}function Rue({serverName:e}){const{data:t}=Ln({queryKey:["personalities","list"],queryFn:()=>It.personalities.list()}),n=((t==null?void 0:t.personalities)??[]).filter(r=>(r.mcp_servers??[]).includes(e));return n.length===0?I.jsx(Nt.Text,{type:"secondary",children:"none"}):I.jsx(oi,{title:n.map(r=>r.id).join(", "),children:I.jsxs("span",{children:[n.slice(0,3).map(r=>r.name).join(", "),n.length>3?` +${n.length-3}`:""]})})}const Nue=50,_ue=400;function jue(){const e=aa(),t=Un(),{notification:n}=Mn.useApp(),[r,o]=c.useState(""),[i,a]=c.useState("");c.useEffect(()=>{const w=setTimeout(()=>a(r.trim()),_ue);return()=>clearTimeout(w)},[r]);const s=c.useMemo(()=>["sessions","list",{q:i}],[i]),{data:u,error:f,isLoading:m,isFetching:p,hasNextPage:g,fetchNextPage:h,isFetchingNextPage:b}=Yk({queryKey:s,queryFn:({pageParam:w})=>It.sessions.list({limit:Nue,...i?{q:i}:{},...w?{cursor:w}:{}}),initialPageParam:null,getNextPageParam:w=>w.nextCursor}),S=c.useMemo(()=>(u==null?void 0:u.pages.flatMap(w=>w.sessions))??[],[u]),y=Rn({mutationFn:w=>It.sessions.delete({id:w}),onSuccess:()=>{t.invalidateQueries({queryKey:["sessions","list"]})},onError:w=>{n.error({message:"Could not delete session",description:w instanceof Error?w.message:String(w),placement:"topRight"})}}),C=Rn({mutationFn:w=>It.sessions.fork({id:w}),onSuccess:w=>{t.invalidateQueries({queryKey:["sessions","list"]}),e(`/chat?session=${w.session.id}`)},onError:w=>{n.error({message:"Could not fork session",description:w instanceof Error?w.message:String(w),placement:"topRight"})}});return f?I.jsx("div",{style:{padding:24},children:I.jsxs("span",{style:{color:"#f87171"},children:["Failed to load sessions: ",f.message]})}):I.jsxs("div",{className:"sessions-tab",children:[I.jsxs("header",{className:"sessions-toolbar",children:[I.jsx(vn.Search,{placeholder:"Search sessions (FTS5 over message content)…",value:r,onChange:w=>o(w.target.value),allowClear:!0,loading:p&&!b,style:{maxWidth:480}}),I.jsxs("span",{className:"sessions-count",children:[S.length," ",S.length===1?"session":"sessions",g?"+":""]})]}),m?I.jsx("div",{style:{display:"grid",placeItems:"center",height:200},children:I.jsx(dr,{})}):I.jsxs(I.Fragment,{children:[I.jsx(Br,{rowKey:"id",dataSource:S,pagination:!1,size:"small",locale:{emptyText:i?`No sessions match "${i}".`:"No sessions yet. Start a chat to create one."},onRow:w=>({onClick:$=>{$.target.closest(".sessions-row-actions")||e(`/chat?session=${w.id}`)},style:{cursor:"pointer"}}),columns:[{title:"ID",dataIndex:"id",width:120,render:w=>I.jsxs("span",{className:"sessions-mono",children:[w.slice(0,8),"…"]})},{title:"Personality",dataIndex:"personalityId",width:140,render:w=>w??"—"},{title:"Model",dataIndex:"model",ellipsis:!0,render:w=>I.jsx("span",{className:"sessions-mono",children:w})},{title:"Tokens",width:140,render:(w,$)=>I.jsx("span",{className:"sessions-mono sessions-num",children:kue($.usage.inputTokens+$.usage.outputTokens)})},{title:"Cost",width:90,render:(w,$)=>I.jsx("span",{className:"sessions-mono sessions-num",children:zue($.usage.estimatedCostUsd)})},{title:"Updated",dataIndex:"updatedAt",width:180,render:w=>I.jsx("span",{className:"sessions-mono",children:Due(w)})},{title:"",width:56,align:"right",render:(w,$)=>I.jsx(Tue,{id:$.id,onOpen:()=>e(`/chat?session=${$.id}`),onFork:()=>C.mutate($.id),onDelete:()=>y.mutate($.id),deleting:y.isPending&&y.variables===$.id})}]}),g?I.jsx("div",{className:"sessions-loadmore",children:I.jsx(Qt,{onClick:()=>h(),loading:b,disabled:b,children:"Load more"})}):null]})]})}function Tue({id:e,onOpen:t,onFork:n,onDelete:r,deleting:o}){const i=[{key:"open",label:"Open"},{key:"fork",label:"Fork"},{key:"delete",label:I.jsx(Ol,{title:"Delete this session?",description:"The conversation history is permanently removed.",okText:"Delete",okButtonProps:{danger:!0,loading:o},cancelText:"Cancel",onConfirm:a=>{a==null||a.stopPropagation(),r()},children:I.jsx("span",{style:{color:"#f87171"},children:"Delete"})})}];return I.jsx("div",{role:"toolbar","aria-label":`Actions for ${e}`,className:"sessions-row-actions",onClick:a=>a.stopPropagation(),onKeyDown:a=>a.stopPropagation(),children:I.jsx(cu,{menu:{items:i,onClick:({key:a,domEvent:s})=>{s.stopPropagation(),a==="open"?t():a==="fork"&&n()}},trigger:["click"],placement:"bottomRight",children:I.jsx("button",{type:"button",className:"sessions-row-trigger","aria-label":"Row actions",children:I.jsx(Mue,{})})})})}function Mue(){return I.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"currentColor","aria-hidden":"true",children:[I.jsx("circle",{cx:"3",cy:"7",r:"1.3"}),I.jsx("circle",{cx:"7",cy:"7",r:"1.3"}),I.jsx("circle",{cx:"11",cy:"7",r:"1.3"})]})}function kue(e){return e<1e3?String(e):e<1e6?`${(e/1e3).toFixed(e<1e4?1:0)}k`:`${(e/1e6).toFixed(1)}M`}function zue(e){return e===0?"—":e<.01?"<$0.01":`$${e.toFixed(2)}`}function Due(e){const t=new Date(e).getTime(),n=Date.now(),r=Math.max(0,n-t),o=Math.floor(r/6e4);if(o<1)return"just now";if(o<60)return`${o}m ago`;const i=Math.floor(o/60);if(i<24)return`${i}h ago`;const a=Math.floor(i/24);return a<7?`${a}d ago`:new Date(e).toLocaleDateString()}function Aue(){var m,p,g;const e=Un(),{notification:t}=Mn.useApp(),[n,r]=c.useState(!1),[o]=Ct.useForm(),i=Ln({queryKey:["config"],queryFn:()=>It.config.get()}),a=Ln({queryKey:["personalities","list"],queryFn:()=>It.personalities.list()});c.useEffect(()=>{i.data&&o.setFieldsValue({provider:i.data.provider,model:i.data.model,baseUrl:i.data.baseUrl??"",personality:i.data.personality,memory:i.data.memory})},[i.data,o]);const s=Rn({mutationFn:h=>It.config.update(h),onSuccess:()=>{e.invalidateQueries({queryKey:["config"]}),t.success({message:"Settings saved",placement:"topRight"}),o.setFieldValue("apiKey","")},onError:h=>t.error({message:"Save failed",description:h.message})});if(i.isLoading)return I.jsx("div",{style:{display:"grid",placeItems:"center",height:200},children:I.jsx(dr,{})});if(i.error)return I.jsxs(Nt.Text,{type:"danger",children:["Failed to load config: ",i.error.message]});const u=((m=a.data)==null?void 0:m.personalities)??[],f=h=>{const b={provider:h.provider,model:h.model,personality:h.personality,memory:h.memory};h.apiKey&&h.apiKey.length>0&&(b.apiKey=h.apiKey),h.baseUrl!==void 0&&(b.baseUrl=h.baseUrl),s.mutate(b)};return I.jsxs("div",{className:"settings-tab",children:[I.jsxs("header",{className:"settings-toolbar",children:[I.jsx(Nt.Title,{level:4,style:{margin:0},children:"Settings"}),I.jsxs("span",{className:"settings-advanced-toggle",children:[I.jsx("span",{className:"settings-advanced-label",children:"Show advanced"}),I.jsx(kS,{checked:n,onChange:r})]})]}),I.jsxs(Ct,{form:o,layout:"vertical",onFinish:f,style:{maxWidth:640},children:[I.jsxs(Yl,{title:"Provider",size:"small",style:{marginBottom:16},children:[I.jsx(Ct.Item,{label:"Provider",name:"provider",rules:[{required:!0,message:"Required"}],children:I.jsx(vn,{placeholder:"anthropic | openrouter | openai-compat | ollama"})}),I.jsx(Ct.Item,{label:"Model",name:"model",rules:[{required:!0,message:"Required"}],children:I.jsx(vn,{placeholder:"e.g. claude-opus-4-7"})}),I.jsx(Ct.Item,{label:"API key",name:"apiKey",extra:`Active key: ${((p=i.data)==null?void 0:p.apiKeyPreview)??"<unset>"}. Leave blank to keep.`,children:I.jsx(vn.Password,{autoComplete:"off",placeholder:"paste new key to rotate"})}),n?I.jsx(Ct.Item,{label:"Base URL",name:"baseUrl",extra:"Override only when self-hosting (e.g. a private OpenAI-compat gateway).",children:I.jsx(vn,{placeholder:"https://openrouter.ai/api/v1"})}):null]}),I.jsx(Yl,{title:"Default personality",size:"small",style:{marginBottom:16},children:I.jsx(Ct.Item,{label:"Personality",name:"personality",rules:[{required:!0,message:"Required"}],extra:"Used when chat doesn't override per-session.",children:I.jsx(Vo,{loading:a.isLoading,options:u.map(h=>({label:`${h.name}${h.builtin?" (built-in)":""}`,value:h.id})),showSearch:!0,optionFilterProp:"label"})})}),I.jsx(Yl,{title:"Memory",size:"small",style:{marginBottom:16},children:I.jsx(Ct.Item,{label:"Memory mode",name:"memory",extra:"Markdown is human-editable in ~/.ethos/MEMORY.md. Vector uses local embeddings.",children:I.jsxs(ml.Group,{children:[I.jsx(ml.Button,{value:"markdown",children:"Markdown"}),I.jsx(ml.Button,{value:"vector",children:"Vector"})]})})}),n?I.jsxs(Yl,{title:"Model routing",size:"small",style:{marginBottom:16},children:[I.jsx(Nt.Paragraph,{type:"secondary",style:{marginTop:0},children:"Per-personality model overrides. Edit ~/.ethos/config.yaml directly to add entries — this surface lists the current overrides; full editing lands later."}),I.jsx(Lue,{routing:((g=i.data)==null?void 0:g.modelRouting)??{}})]}):null,I.jsx(Ct.Item,{children:I.jsx(Qt,{type:"primary",htmlType:"submit",loading:s.isPending,children:"Save"})})]})]})}function Lue({routing:e}){const t=Object.entries(e);return t.length===0?I.jsx(Nt.Text,{type:"secondary",children:"No per-personality overrides set."}):I.jsx("ul",{style:{margin:0,paddingLeft:16},children:t.map(([n,r])=>I.jsxs("li",{style:{fontSize:13,color:"var(--ethos-text)"},children:[I.jsx(Nt.Text,{code:!0,children:n})," → ",I.jsx(Nt.Text,{code:!0,children:r})]},n))})}function Fue(){return I.jsxs("div",{style:{display:"grid",placeItems:"center",height:"100%",gap:12},children:[I.jsx(dr,{}),I.jsx("span",{className:"empty-pane",children:"Signing in…"})]})}function Bue(){var o;const[e,t]=c.useState("library"),n=Ln({queryKey:["skills","list"],queryFn:()=>It.skills.list()}),r=((o=n.data)==null?void 0:o.pendingCount)??0;return I.jsx("div",{className:"skills-tab",children:I.jsx(Il,{activeKey:e,onChange:i=>t(i),items:[{key:"library",label:"Library",children:I.jsx(Hue,{skillsQuery:n})},{key:"evolver",label:I.jsxs("span",{children:["Evolver"," ",r>0?I.jsx(gS,{count:r,style:{marginLeft:6}}):null]}),children:I.jsx(Gue,{})}]})})}function Hue({skillsQuery:e}){var a;const[t,n]=c.useState(null),[r,o]=c.useState(!1);if(e.isLoading)return I.jsx("div",{style:{display:"grid",placeItems:"center",height:200},children:I.jsx(dr,{})});if(e.error)return I.jsxs(Nt.Text,{type:"danger",children:["Failed to load skills: ",e.error.message]});const i=((a=e.data)==null?void 0:a.skills)??[];return I.jsxs(I.Fragment,{children:[I.jsxs("header",{className:"skills-toolbar",children:[I.jsxs("span",{className:"skills-count",children:[i.length," ",i.length===1?"skill":"skills"]}),I.jsx(Qt,{type:"primary",onClick:()=>o(!0),children:"New skill"})]}),I.jsx(Br,{rowKey:"id",dataSource:i,pagination:!1,size:"small",locale:{emptyText:I.jsx(Tn,{image:Tn.PRESENTED_IMAGE_SIMPLE,description:"No skills installed yet. Create one to teach this agent how you work."})},columns:[{title:"Name",dataIndex:"name",key:"name",render:(s,u)=>I.jsxs("div",{children:[I.jsx("div",{style:{fontWeight:500},children:s}),I.jsxs("div",{style:{color:"rgba(255,255,255,0.45)",fontSize:11},children:[u.id,".md"]})]})},{title:"Description",dataIndex:"description",key:"description",render:s=>s||I.jsx(Nt.Text,{type:"secondary",children:"—"})},{title:"Modified",dataIndex:"modifiedAt",key:"modifiedAt",width:140,render:s=>CC(s)},{title:"",key:"actions",width:160,render:(s,u)=>I.jsx(Wue,{skill:u,onEdit:()=>n(u)})}]}),r?I.jsx(Vue,{open:r,onClose:()=>o(!1)}):null,t?I.jsx(Kue,{skill:t,onClose:()=>n(null)},t.id):null]})}function Wue({skill:e,onEdit:t}){const n=Un(),{notification:r}=Mn.useApp(),o=Rn({mutationFn:i=>It.skills.delete({id:i}),onSuccess:()=>{n.invalidateQueries({queryKey:["skills","list"]}),r.success({message:`Deleted ${e.name}`,placement:"topRight"})},onError:i=>r.error({message:"Delete failed",description:i.message})});return I.jsxs("div",{style:{display:"flex",gap:8},children:[I.jsx(Qt,{size:"small",onClick:t,children:"Edit"}),I.jsx(Ol,{title:"Delete this skill?",description:"The file is removed from disk.",onConfirm:()=>o.mutate(e.id),okText:"Delete",okButtonProps:{danger:!0},children:I.jsx(Qt,{size:"small",danger:!0,children:"Delete"})})]})}function Vue({open:e,onClose:t}){const n=Un(),{notification:r}=Mn.useApp(),[o]=Ct.useForm(),i=Rn({mutationFn:a=>It.skills.create(a),onSuccess:()=>{n.invalidateQueries({queryKey:["skills","list"]}),r.success({message:"Skill created",placement:"topRight"}),t()},onError:a=>r.error({message:"Create failed",description:a.message})});return I.jsx($r,{open:e,title:"New skill",onCancel:t,onOk:()=>o.submit(),okText:"Create",okButtonProps:{loading:i.isPending},destroyOnClose:!0,width:680,children:I.jsxs(Ct,{form:o,layout:"vertical",onFinish:a=>i.mutate(a),initialValues:{body:`---
|
|
538
538
|
name: my-skill
|
|
539
539
|
description: One-line summary
|
|
540
540
|
---
|
|
@@ -546,4 +546,4 @@ ${t.map(r=>`${r}: ${que(e.frontmatter[r])}`).join(`
|
|
|
546
546
|
---
|
|
547
547
|
|
|
548
548
|
${e.body}`}function que(e){return e==null?"":typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):JSON.stringify(e)}function Gue(){return I.jsx("div",{className:"evolver-panel",children:I.jsx(Il,{defaultActiveKey:"config",items:[{key:"config",label:"Config",children:I.jsx(Xue,{})},{key:"pending",label:"Approval queue",children:I.jsx(Zue,{})},{key:"history",label:"Run history",children:I.jsx(Yue,{})}]})})}function Xue(){const e=Un(),{notification:t}=Mn.useApp(),[n]=Ct.useForm(),{data:r,isLoading:o,error:i}=Ln({queryKey:["evolver","config"],queryFn:()=>It.evolver.configGet()});c.useEffect(()=>{r!=null&&r.config&&n.setFieldsValue(r.config)},[r,n]);const a=Rn({mutationFn:s=>It.evolver.configUpdate(s),onSuccess:()=>{e.invalidateQueries({queryKey:["evolver","config"]}),t.success({message:"Saved",placement:"topRight"})},onError:s=>t.error({message:"Save failed",description:s.message})});return o?I.jsx("div",{style:{display:"grid",placeItems:"center",height:200},children:I.jsx(dr,{})}):i?I.jsxs(Nt.Text,{type:"danger",children:["Failed to load config: ",i.message]}):I.jsxs(Ct,{form:n,layout:"vertical",style:{maxWidth:480},onFinish:s=>a.mutate(s),children:[I.jsx(Ct.Item,{label:"Rewrite threshold",name:"rewriteThreshold",extra:"Skills with avg score below this are rewrite candidates. 0–1.",children:I.jsx(Jl,{min:0,max:1,step:.05,style:{width:"100%"}})}),I.jsx(Ct.Item,{label:"New-skill pattern threshold",name:"newSkillPatternThreshold",extra:"Tasks scoring above this with no skill assistance can seed a new skill. 0–1.",children:I.jsx(Jl,{min:0,max:1,step:.05,style:{width:"100%"}})}),I.jsx(Ct.Item,{label:"Min runs before evolving a skill",name:"minRunsBeforeEvolve",extra:"Don't propose a rewrite until a skill has at least this many runs.",children:I.jsx(Jl,{min:0,step:1,style:{width:"100%"}})}),I.jsx(Ct.Item,{label:"Min pattern count for new skills",name:"minPatternCount",extra:"A new-skill candidate needs at least this many high-scoring sample tasks.",children:I.jsx(Jl,{min:0,step:1,style:{width:"100%"}})}),I.jsx(Ct.Item,{children:I.jsx(Qt,{type:"primary",htmlType:"submit",loading:a.isPending,children:"Save"})})]})}function Zue(){const e=Un(),{notification:t}=Mn.useApp(),{data:n,isLoading:r,error:o}=Ln({queryKey:["evolver","pending"],queryFn:()=>It.evolver.pendingList()}),i=Rn({mutationFn:u=>It.evolver.pendingApprove({id:u}),onSuccess:()=>{e.invalidateQueries({queryKey:["evolver","pending"]}),e.invalidateQueries({queryKey:["skills","list"]}),t.success({message:"Approved — skill is now live.",placement:"topRight"})},onError:u=>t.error({message:"Approve failed",description:u.message})}),a=Rn({mutationFn:u=>It.evolver.pendingReject({id:u}),onSuccess:()=>{e.invalidateQueries({queryKey:["evolver","pending"]}),e.invalidateQueries({queryKey:["skills","list"]}),t.success({message:"Rejected",placement:"topRight"})},onError:u=>t.error({message:"Reject failed",description:u.message})});if(r)return I.jsx("div",{style:{display:"grid",placeItems:"center",height:200},children:I.jsx(dr,{})});if(o)return I.jsxs(Nt.Text,{type:"danger",children:["Failed to load queue: ",o.message]});const s=(n==null?void 0:n.pending)??[];return s.length===0?I.jsx(Tn,{image:Tn.PRESENTED_IMAGE_SIMPLE,description:"No pending candidates. Run `ethos skills evolve` against an eval JSONL to populate this queue."}):I.jsx(Br,{rowKey:"id",dataSource:s,pagination:!1,size:"small",expandable:{expandedRowRender:u=>I.jsx(Que,{skill:u})},columns:[{title:"Name",dataIndex:"name",key:"name",render:(u,f)=>I.jsxs("div",{children:[I.jsx("div",{style:{fontWeight:500},children:u}),I.jsxs("div",{style:{color:"rgba(255,255,255,0.45)",fontSize:11},children:[f.id,".md"]})]})},{title:"Description",dataIndex:"description",key:"description",render:u=>u||I.jsx(Nt.Text,{type:"secondary",children:"—"})},{title:"Proposed",dataIndex:"proposedAt",key:"proposedAt",width:140,render:u=>CC(u)},{title:"",key:"actions",width:200,render:(u,f)=>I.jsxs("div",{style:{display:"flex",gap:8},children:[I.jsx(Qt,{size:"small",type:"primary",onClick:()=>i.mutate(f.id),loading:i.isPending&&i.variables===f.id,children:"Approve"}),I.jsx(Ol,{title:"Reject this candidate?",description:"The pending file is deleted.",onConfirm:()=>a.mutate(f.id),okText:"Reject",okButtonProps:{danger:!0},children:I.jsx(Qt,{size:"small",danger:!0,children:"Reject"})})]})}]})}function Que({skill:e}){return I.jsx("pre",{style:{margin:0,fontFamily:"Geist Mono, monospace",fontSize:12,maxHeight:320,overflow:"auto",background:"rgba(255,255,255,0.02)",padding:12,borderRadius:6,whiteSpace:"pre-wrap"},children:e.body})}function Yue(){const{data:e,isLoading:t,error:n}=Ln({queryKey:["evolver","history"],queryFn:()=>It.evolver.history({limit:50})}),r=c.useMemo(()=>(e==null?void 0:e.runs)??[],[e]);return t?I.jsx("div",{style:{display:"grid",placeItems:"center",height:200},children:I.jsx(dr,{})}):n?I.jsxs(Nt.Text,{type:"danger",children:["Failed to load history: ",n.message]}):r.length===0?I.jsx(Tn,{image:Tn.PRESENTED_IMAGE_SIMPLE,description:"No evolver runs recorded yet. Each run appends a line to ~/.ethos/evolver-history.jsonl."}):I.jsx(Br,{rowKey:"ranAt",dataSource:r,pagination:!1,size:"small",columns:[{title:"Ran at",dataIndex:"ranAt",key:"ranAt",width:180,render:o=>CC(o)},{title:"Eval source",dataIndex:"evalOutputPath",key:"evalOutputPath",render:o=>I.jsx(Nt.Text,{code:!0,children:o})},{title:"Rewrites",dataIndex:"rewritesProposed",key:"rewritesProposed",width:100,align:"right"},{title:"New",dataIndex:"newSkillsProposed",key:"newSkillsProposed",width:80,align:"right"},{title:"Skipped",key:"skipped",width:100,align:"right",render:(o,i)=>i.skipped.length}]})}function CC(e){const t=new Date(e).getTime();if(!Number.isFinite(t))return e;const n=Date.now()-t;return n<6e4?"just now":n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:n<30*864e5?`${Math.floor(n/864e5)}d ago`:new Date(e).toLocaleDateString()}const Jue=1280,jT=1280;function FO(){return typeof window<"u"&&window.innerWidth<jT}function ede(){const[e,t]=c.useState(FO),[n,r]=c.useState(()=>typeof window>"u"?!1:window.innerWidth>=Jue),[o,i]=c.useState(!1);tde(),kse(),c.useEffect(()=>{let u=FO();const f=()=>{if(typeof window>"u")return;const m=window.innerWidth<jT;m!==u&&(u=m,t(m),r(!m))};return window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)},[]);const a=c.useCallback(()=>r(u=>!u),[]);c.useEffect(()=>{const u=f=>{const m=f.metaKey||f.ctrlKey;if(m&&f.key==="k"){f.preventDefault(),i(p=>!p);return}if(m&&f.key==="."){const p=f.target;if(p!=null&&p.closest('input, textarea, [contenteditable="true"]'))return;f.preventDefault(),a()}};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[a]);const s=["app-shell",e?"collapsed":"",n?"drawer-open":""].filter(Boolean).join(" ");return I.jsxs("div",{className:s,children:[I.jsx(_se,{collapsed:e,onToggle:()=>t(u=>!u)}),I.jsx(Mse,{drawerOpen:n,onToggleDrawer:()=>r(u=>!u)}),I.jsx("main",{className:"app-main",children:I.jsxs(LJ,{children:[I.jsx(uo,{path:"/",element:I.jsx(JI,{to:"/chat",replace:!0})}),I.jsx(uo,{path:"/chat",element:I.jsx(Ece,{})}),I.jsx(uo,{path:"/sessions",element:I.jsx(jue,{})}),I.jsx(uo,{path:"/cron",element:I.jsx(_ce,{})}),I.jsx(uo,{path:"/skills",element:I.jsx(Bue,{})}),I.jsx(uo,{path:"/mesh",element:I.jsx(qce,{})}),I.jsx(uo,{path:"/settings",element:I.jsx(Aue,{})}),I.jsx(uo,{path:"/memory",element:I.jsx(Vce,{})}),I.jsx(uo,{path:"/plugins",element:I.jsx($ue,{})}),I.jsx(uo,{path:"/communications",element:I.jsx(Pce,{})}),I.jsx(uo,{path:"/personalities",element:I.jsx(rue,{})}),I.jsx(uo,{path:"/batch",element:I.jsx(Fse,{})}),I.jsx(uo,{path:"/eval",element:I.jsx(Lce,{})}),I.jsx(uo,{path:"/onboarding",element:I.jsx(Qce,{})}),I.jsx(uo,{path:"/signing-in",element:I.jsx(Fue,{})}),I.jsx(uo,{path:"*",element:I.jsx(JI,{to:"/chat",replace:!0})})]})}),I.jsx(wse,{open:n,onClose:()=>r(!1)}),I.jsx(fse,{open:o,onClose:()=>i(!1),onToggleDrawer:a}),I.jsx(yse,{})]})}function tde(){const e=aa(),{pathname:t}=Ra(),{data:n,isLoading:r}=Ln({queryKey:["onboarding","state"],queryFn:()=>It.onboarding.state()});c.useEffect(()=>{r||!n||n.step!=="done"&&(t==="/onboarding"||t==="/signing-in"||e("/onboarding",{replace:!0}))},[n,r,t,e])}const nde=new Fk({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:3e4,retry:1}}}),TT=document.getElementById("root");if(!TT)throw new Error("root element missing");qY.createRoot(TT).render(I.jsx(le.StrictMode,{children:I.jsx(Bk,{client:nde,children:I.jsx(bi,{theme:wce,children:I.jsx(Mn,{children:I.jsx(qJ,{children:I.jsx(ede,{})})})})})}));
|
|
549
|
-
//# sourceMappingURL=index-
|
|
549
|
+
//# sourceMappingURL=index-P6QBFWq3.js.map
|
package/web/index.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Ethos</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-P6QBFWq3.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BlnRaxwq.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|