@shmulikdav/solix 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/web/assets/{CrewPanel-CVTXUelp.js → CrewPanel-CCQyVXEO.js} +1 -1
- package/dist/web/assets/{GalaxyPanel-DV-kbENC.js → GalaxyPanel-YXuzkrWv.js} +1 -1
- package/dist/web/assets/{Scene-gMUGX2_a.js → Scene-NahUVf-g.js} +1 -1
- package/dist/web/assets/{TimelineDrawer-BQo9SqvU.js → TimelineDrawer-CpPhGaYI.js} +1 -1
- package/dist/web/assets/{index-P5SyOUJE.js → index-C8BeteJb.js} +2 -2
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/dist/web/workbox-0bb07689.js +1 -0
- package/package.json +1 -1
- package/dist/web/workbox-9c191d2f.js +0 -1
package/dist/index.js
CHANGED
|
@@ -5529,7 +5529,7 @@ var BANNER = `
|
|
|
5529
5529
|
async function start(opts = {}) {
|
|
5530
5530
|
const port = opts.port ?? Number(process.env.SOLIX_PORT ?? 4242);
|
|
5531
5531
|
console.log(BANNER);
|
|
5532
|
-
const handle = await createSolixServer({ port, version: "1.9.
|
|
5532
|
+
const handle = await createSolixServer({ port, version: "1.9.1" });
|
|
5533
5533
|
const url = `http://${handle.hostname}:${handle.port}`;
|
|
5534
5534
|
console.log(`[solix] server listening on ${url}`);
|
|
5535
5535
|
console.log(`[solix] events -> POST ${url}/events`);
|
|
@@ -5584,7 +5584,7 @@ function uninstall() {
|
|
|
5584
5584
|
|
|
5585
5585
|
// src/index.ts
|
|
5586
5586
|
var program = new Command();
|
|
5587
|
-
program.name("solix").description("Solix \u2014 a solar-system command center for Claude Code agents").version("1.9.
|
|
5587
|
+
program.name("solix").description("Solix \u2014 a solar-system command center for Claude Code agents").version("1.9.1");
|
|
5588
5588
|
program.command("start", { isDefault: true }).description("Start the Solix server and open the browser").option("-p, --port <port>", "port to listen on", (v) => parseInt(v, 10), 4242).option("--no-open", "do not open browser automatically").action(async (opts) => {
|
|
5589
5589
|
await start({ port: opts.port, noOpen: !opts.open });
|
|
5590
5590
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{al as t,aE as m,j as e}from"./index-
|
|
1
|
+
import{al as t,aE as m,j as e}from"./index-C8BeteJb.js";function v({open:b,onClose:i}){const l=t(m),d=t(r=>r.enableAdvisor),n=t(r=>r.disableAdvisor),a=t(r=>r.pinAdvisor),o=t(r=>r.unpinAdvisor),c=t(r=>r.selectAdvisor);if(!b)return null;const s=l.filter(r=>r.enabled),x=l.filter(r=>!r.enabled);return e.jsx("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm",children:e.jsxs("div",{className:"w-[620px] max-w-[94vw] max-h-[88vh] flex flex-col rounded-xl border border-solix-accent/40 bg-solix-panel/95 shadow-2xl",children:[e.jsxs("div",{className:"px-5 py-4 border-b border-solix-border flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs uppercase tracking-widest text-solix-accent",children:"crew"}),e.jsx("div",{className:"text-lg font-semibold mt-0.5",children:"Advisor roster"}),e.jsxs("div",{className:"text-xs text-slate-400 mt-1",children:[s.length," active · ",x.length," available. Enable an advisor to add it to the inner ring and the + Task picker."]})]}),e.jsx("button",{onClick:i,className:"text-slate-400 hover:text-slate-100","aria-label":"Close",children:"✕"})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:[e.jsx(p,{title:`Active crew · ${s.length}`,advisors:s,enableAdvisor:d,disableAdvisor:n,pinAdvisor:a,unpinAdvisor:o,selectAdvisor:c,onClose:i}),x.length>0&&e.jsx(p,{title:`Available (opt-in) · ${x.length}`,advisors:x,enableAdvisor:d,disableAdvisor:n,pinAdvisor:a,unpinAdvisor:o,selectAdvisor:c,onClose:i})]})]})})}function p({title:b,advisors:i,enableAdvisor:l,disableAdvisor:d,pinAdvisor:n,unpinAdvisor:a,selectAdvisor:o,onClose:c}){return e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] uppercase tracking-widest text-slate-500 mb-2",children:b}),e.jsx("div",{className:"space-y-2",children:i.map(s=>e.jsx("div",{className:"rounded border border-solix-border bg-black/20 p-3",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{style:{color:s.color},children:s.glyph}),e.jsx("span",{className:"font-semibold text-slate-100",children:s.codename}),e.jsxs("span",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:[s.name," · ",String(s.defaultModel)]}),s.pinned&&e.jsx("span",{className:"text-[9px] uppercase tracking-wider text-amber-300 border border-amber-300/40 rounded px-1 py-0.5",children:"pinned"})]}),e.jsx("div",{className:"mt-1 text-xs text-slate-400 leading-snug",children:s.description})]}),e.jsxs("div",{className:"flex flex-col gap-1.5 shrink-0",children:[s.enabled?e.jsx("button",{onClick:()=>d(s.id),className:"px-2.5 py-1 rounded border border-solix-border text-slate-400 text-xs hover:text-white hover:bg-solix-border/30",children:"Disable"}):e.jsx("button",{onClick:()=>l(s.id),className:"px-2.5 py-1 rounded bg-cyan-500/20 border border-cyan-400/60 text-cyan-100 text-xs hover:bg-cyan-500/30",children:"+ Add"}),s.enabled&&(s.pinned?e.jsx("button",{onClick:()=>a(s.id),className:"px-2.5 py-1 rounded bg-amber-500/15 border border-amber-400/50 text-amber-200 text-xs hover:bg-amber-500/25",children:"Unpin"}):e.jsx("button",{onClick:()=>n(s.id),className:"px-2.5 py-1 rounded bg-amber-500/10 border border-amber-400/30 text-amber-200/80 text-xs hover:bg-amber-500/20",title:"Spawn an always-on session",children:"Pin"})),e.jsx("button",{onClick:()=>{o(s.id),c()},className:"px-2.5 py-1 rounded border border-solix-border text-slate-300 text-xs hover:text-white hover:bg-solix-border/30",children:"Details"})]})]})},s.id))})]})}export{v as CrewPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,al as $,j as e}from"./index-P5SyOUJE.js";function H(s,i){const a=new Map(s.advisors.map(t=>[t.role,t])),n=new Map(i.advisors.map(t=>[t.role,t])),h=[...n.keys()].filter(t=>!a.has(t)),v=[...a.keys()].filter(t=>!n.has(t)),j=[...n.keys()].filter(t=>a.has(t)).map(t=>({role:t,from:a.get(t).pinned,to:n.get(t).pinned})).filter(t=>t.from!==t.to),x=new Set(s.skills.map(t=>t.id)),p=new Set(i.skills.map(t=>t.id)),r=[...p].filter(t=>!x.has(t)),b=[...x].filter(t=>!p.has(t)),d=new Set(s.projects.map(t=>t.name)),f=new Set(i.projects.map(t=>t.name)),u=[...f].filter(t=>!d.has(t)),g=[...d].filter(t=>!f.has(t));return{advisors:{added:h.sort(),removed:v.sort(),pinChanged:j.sort((t,S)=>t.role.localeCompare(S.role))},skills:{added:r.sort(),removed:b.sort()},projects:{added:u.sort(),removed:g.sort()}}}function W({open:s,onClose:i}){const[a,n]=c.useState("share"),[h,v]=c.useState("My Galaxy"),[j,x]=c.useState(""),[p,r]=c.useState(""),[b,d]=c.useState(!1),[f,u]=c.useState(null),[g,t]=c.useState(null),S=$(o=>Object.keys(o.sessions).length),I=$(o=>Object.values(o.advisors).filter(y=>y.enabled).length),l=$(o=>Object.keys(o.skills).length);if(!s)return null;const m=async()=>{d(!0),u(null);try{const o=new URLSearchParams({name:h}),y=await fetch(`/api/galaxy/export?${o.toString()}`);if(!y.ok)throw new Error(`HTTP ${y.status}`);const N=await y.json(),C=new Blob([JSON.stringify(N,null,2)],{type:"application/json"}),w=URL.createObjectURL(C),k=document.createElement("a");k.href=w,k.download=`${h.toLowerCase().replace(/\s+/g,"-")}.galaxy.json`,k.click(),URL.revokeObjectURL(w),u("Downloaded.")}catch(o){u(`Export failed: ${String(o)}`)}finally{d(!1)}},U=async o=>{d(!0),u(null);try{const N=await(await fetch("/api/galaxy/import",{method:"POST",headers:{"Content-Type":"application/json"},body:o})).json();N.ok?(u(`Imported: ${N.advisorsEnabled} enabled, ${N.advisorsDisabled} disabled, ${N.projectsHinted} projects.`),x(""),r("")):u(`Import failed: ${N.error??"unknown"}`)}catch(y){u(`Import failed: ${String(y)}`)}finally{d(!1)}},E=async(o,y,N)=>{u(null);let C,w=N;if(w)try{const k=await fetch("/api/galaxy/export?preview=1");if(k.ok){const B=await k.json();C=H(B,w)}}catch{}t({body:o,label:y,diff:C,manifest:w})},O=()=>{let o;try{o=JSON.parse(j)}catch{u("Could not parse JSON.");return}E(j,"pasted manifest",o)},D=()=>{E(JSON.stringify({url:p}),`URL: ${p}`,void 0)},_=()=>{if(!g)return;const o=g.body;t(null),U(o)},J=()=>{t(null)};return e.jsxs("div",{className:"absolute top-16 right-0 bottom-0 w-full sm:w-[480px] bg-solix-panel border-l border-solix-border backdrop-blur-md flex flex-col z-30",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-solix-border flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs uppercase tracking-wide text-solix-accent",children:"Galaxy"}),e.jsx("div",{className:"text-lg font-semibold",children:"Share your space"}),e.jsxs("div",{className:"text-xs text-slate-400 mt-0.5",children:[I," advisors · ",l," skills ·"," ",S," sessions"]})]}),e.jsx("button",{onClick:i,className:"text-slate-400 hover:text-slate-100",children:"✕"})]}),e.jsxs("div",{className:"flex border-b border-solix-border text-xs",children:[e.jsx(P,{active:a==="share",onClick:()=>n("share"),children:"Sharing"}),e.jsx(P,{active:a==="versions",onClick:()=>n("versions"),children:"Versions"}),e.jsx(P,{active:a==="audit",onClick:()=>n("audit"),children:"Audit"})]}),a==="audit"?e.jsx(G,{open:s}):a==="versions"?e.jsx(V,{open:s}):e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6",children:[e.jsxs("section",{children:[e.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-400 mb-2",children:"Export"}),e.jsx("input",{value:h,onChange:o=>v(o.target.value),placeholder:"Galaxy name",className:"w-full text-sm bg-black/40 border border-solix-border rounded p-2 text-slate-100 placeholder-slate-600 focus:outline-none focus:border-solix-accent"}),e.jsx("button",{onClick:()=>void m(),disabled:b,className:"mt-2 w-full py-2 rounded bg-solix-accent/20 border border-solix-accent text-solix-accent text-sm hover:bg-solix-accent/30 disabled:opacity-50",children:"Download manifest (.galaxy.json)"})]}),e.jsxs("section",{children:[e.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-400 mb-2",children:"Import from URL"}),e.jsx("input",{value:p,onChange:o=>r(o.target.value),placeholder:"https://… or local server URL",className:"w-full text-sm bg-black/40 border border-solix-border rounded p-2 text-slate-100 placeholder-slate-600 focus:outline-none focus:border-solix-accent"}),e.jsx("button",{onClick:D,disabled:b||!p.trim(),className:"mt-2 w-full py-2 rounded bg-cyan-500/15 border border-cyan-400/40 text-cyan-200 text-sm hover:bg-cyan-500/25 disabled:opacity-50",children:"Pull and import"})]}),e.jsxs("section",{children:[e.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-400 mb-2",children:"Import from JSON"}),e.jsx("textarea",{value:j,onChange:o=>x(o.target.value),placeholder:"Paste a galaxy manifest JSON here…",rows:10,className:"w-full text-xs bg-black/40 border border-solix-border rounded p-2 text-slate-100 placeholder-slate-600 focus:outline-none focus:border-solix-accent font-mono resize-none"}),e.jsx("button",{onClick:O,disabled:b||!j.trim(),className:"mt-2 w-full py-2 rounded bg-cyan-500/15 border border-cyan-400/40 text-cyan-200 text-sm hover:bg-cyan-500/25 disabled:opacity-50",children:"Apply manifest"})]}),g&&e.jsx(K,{label:g.label,diff:g.diff,manifest:g.manifest,busy:b,onConfirm:_,onCancel:J}),f&&e.jsx("div",{className:"text-xs text-slate-300 border border-solix-border rounded p-2 bg-black/30",children:f})]}),e.jsx("div",{className:"px-4 py-3 border-t border-solix-border text-xs text-slate-500",children:a==="audit"?"Append-only history. Read-only.":a==="versions"?"Each export snapshots a version. Identical re-exports are deduped.":"Imports never spawn pinned advisors or run shell commands. You're in control."})]})}function P({active:s,onClick:i,children:a}){return e.jsx("button",{onClick:i,className:`flex-1 px-3 py-2 ${s?"text-solix-accent border-b-2 border-solix-accent":"text-slate-400 hover:text-slate-200 border-b-2 border-transparent"}`,children:a})}const F=["permission_approved","permission_denied","advisor_invoked","advisor_pinned","advisor_unpinned","galaxy_imported"];function G({open:s}){const[i,a]=c.useState([]),[n,h]=c.useState("all"),[v,j]=c.useState(!1),[x,p]=c.useState(null);return c.useEffect(()=>{if(!s)return;let r=!1;j(!0),p(null);const b=`/api/audit${n==="all"?"":`?kind=${n}`}`;return fetch(b).then(d=>d.ok?d.json():Promise.reject(new Error(`HTTP ${d.status}`))).then(d=>{r||a(d)}).catch(d=>{r||p(d.message)}).finally(()=>{r||j(!1)}),()=>{r=!0}},[s,n]),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx(T,{label:"all",active:n==="all",onClick:()=>h("all")}),F.map(r=>e.jsx(T,{label:A(r),active:n===r,onClick:()=>h(r)},r))]}),v&&e.jsx("div",{className:"text-xs text-slate-500 italic",children:"Loading…"}),x&&e.jsxs("div",{className:"text-xs text-solix-danger italic",children:["Could not load audit events: ",x]}),!v&&i.length===0&&e.jsx("div",{className:"text-xs text-slate-500 italic",children:"No audit events yet. Approve a permission or invoke an advisor and they'll start appearing here."}),e.jsx("ul",{className:"space-y-1.5",children:i.map(r=>e.jsxs("li",{className:"rounded border border-solix-border bg-black/20 p-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-[10px]",children:[e.jsx("span",{className:`uppercase tracking-wide ${M(r.kind)}`,children:A(r.kind)}),e.jsx("span",{className:"text-slate-500 font-mono",children:new Date(r.ts).toLocaleString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,month:"short",day:"numeric"})})]}),e.jsx("div",{className:"text-[12px] text-slate-100 mt-1 leading-snug",children:r.summary})]},r.id))})]})}function T({label:s,active:i,onClick:a}){return e.jsx("button",{onClick:a,className:`text-[10px] px-2 py-0.5 rounded border ${i?"bg-solix-accent/15 border-solix-accent text-solix-accent":"border-solix-border text-slate-400 hover:text-slate-200"}`,children:s})}function A(s){return s==="all"?"all":s.replace(/_/g," ")}function M(s){return s==="permission_approved"?"text-solix-ok":s==="permission_denied"?"text-solix-danger":s==="galaxy_imported"?"text-cyan-300":s.startsWith("advisor_")?"text-amber-300":"text-slate-300"}function V({open:s}){const[i,a]=c.useState([]),[n,h]=c.useState(!1),[v,j]=c.useState(null),[x,p]=c.useState(null),[r,b]=c.useState(null),[d,f]=c.useState(null),[u,g]=c.useState(!1);c.useEffect(()=>{if(!s)return;let l=!1;return h(!0),fetch("/api/galaxy/versions").then(m=>m.ok?m.json():Promise.reject(new Error(`HTTP ${m.status}`))).then(m=>{l||a(m)}).catch(m=>{l||j(m.message)}).finally(()=>{l||h(!1)}),()=>{l=!0}},[s]),c.useEffect(()=>{if(!x||!r){f(null);return}if(x===r){f(null);return}let l=!1;return g(!0),fetch(`/api/galaxy/diff?from=${x}&to=${r}`).then(m=>m.ok?m.json():Promise.reject(new Error(`HTTP ${m.status}`))).then(m=>{l||f(m)}).catch(()=>{l||f(null)}).finally(()=>{l||g(!1)}),()=>{l=!0}},[x,r]);const t=l=>{x?!r&&l!==x?b(l):(p(l),b(null),f(null)):p(l)},S=()=>{p(null),b(null),f(null)},I=l=>l.id===x?"from":l.id===r?"to":null;return e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3",children:[(x||r)&&e.jsxs("div",{className:"flex items-center justify-between text-[11px] text-slate-400",children:[e.jsxs("div",{children:[x&&!r&&"Pick a second version to diff…",x&&r&&u&&"Computing diff…",x&&r&&!u&&d&&e.jsxs(e.Fragment,{children:["v",d.from.ordinal," → v",d.to.ordinal]})]}),e.jsx("button",{onClick:S,className:"text-slate-500 hover:text-slate-100",children:"clear"})]}),d&&e.jsx(R,{diff:d.diff}),n&&e.jsx("div",{className:"text-xs text-slate-500 italic",children:"Loading…"}),v&&e.jsxs("div",{className:"text-xs text-solix-danger italic",children:["Could not load versions: ",v]}),!n&&i.length===0&&e.jsx("div",{className:"text-xs text-slate-500 italic",children:'No versions yet. Hit "Download manifest" on the Sharing tab to create one.'}),e.jsx("ul",{className:"space-y-1.5",children:i.map(l=>{const m=I(l);return e.jsx("li",{children:e.jsxs("button",{onClick:()=>t(l.id),className:`w-full text-left rounded border p-2 ${m==="from"?"border-solix-accent bg-solix-accent/10":m==="to"?"border-cyan-400 bg-cyan-400/10":"border-solix-border bg-black/20 hover:bg-solix-border/30"}`,children:[e.jsxs("div",{className:"flex items-center justify-between text-[10px]",children:[e.jsxs("span",{className:"uppercase tracking-wide text-slate-400",children:["v",l.ordinal," · ",l.name]}),e.jsx("span",{className:"text-slate-500 font-mono",children:new Date(l.ts).toLocaleString("en-US",{hour:"2-digit",minute:"2-digit",month:"short",day:"numeric"})})]}),e.jsxs("div",{className:"text-[11px] text-slate-300 mt-1",children:[l.manifest.advisors.length," advisors ·"," ",l.manifest.skills.length," skills ·"," ",l.manifest.projects.length," projects",m&&e.jsxs("span",{className:"ml-2 text-[9px] uppercase tracking-wider text-slate-400",children:["[",m,"]"]})]})]})},l.id)})})]})}function R({diff:s}){return s.advisors.added.length===0&&s.advisors.removed.length===0&&s.advisors.pinChanged.length===0&&s.skills.added.length===0&&s.skills.removed.length===0&&s.projects.added.length===0&&s.projects.removed.length===0?e.jsx("div",{className:"text-xs text-slate-500 italic border border-solix-border rounded p-2 bg-black/20",children:"No changes between these versions."}):e.jsxs("div",{className:"rounded border border-solix-border bg-black/30 p-2 space-y-2 text-xs",children:[e.jsx(L,{label:"Advisors",added:s.advisors.added,removed:s.advisors.removed}),s.advisors.pinChanged.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:"Advisor pin changes"}),e.jsx("ul",{className:"mt-1 space-y-0.5",children:s.advisors.pinChanged.map(a=>e.jsxs("li",{className:"text-slate-200",children:[e.jsx("span",{className:"font-mono",children:a.role}),":"," ",a.from?"pinned":"unpinned"," →"," ",a.to?"pinned":"unpinned"]},a.role))})]}),e.jsx(L,{label:"Skills",added:s.skills.added,removed:s.skills.removed}),e.jsx(L,{label:"Projects",added:s.projects.added,removed:s.projects.removed})]})}function K({label:s,diff:i,manifest:a,busy:n,onConfirm:h,onCancel:v}){return e.jsxs("div",{className:"rounded border border-amber-300/60 bg-amber-500/10 p-3 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-[11px] uppercase tracking-wide text-amber-200",children:"confirm import"}),e.jsx("div",{className:"text-[10px] text-slate-400 font-mono truncate max-w-[55%]",children:s})]}),a&&e.jsxs("div",{className:"text-xs text-slate-200",children:[e.jsx("span",{className:"font-semibold",children:a.name}),a.author&&e.jsxs("span",{className:"text-slate-400",children:[" · by ",a.author]})]}),i?e.jsx(R,{diff:i}):a?e.jsx("div",{className:"text-xs text-slate-400 italic",children:"Could not compute a diff against the current galaxy. Apply will still proceed if you confirm."}):e.jsx("div",{className:"text-xs text-slate-300",children:"Solix will fetch the manifest from this URL and apply it. Diff preview is only available for pasted JSON."}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:h,disabled:n,className:"flex-1 py-1.5 rounded bg-amber-500/20 border border-amber-300 text-amber-100 text-xs hover:bg-amber-500/30 disabled:opacity-50",children:"Apply"}),e.jsx("button",{onClick:v,disabled:n,className:"px-3 py-1.5 rounded border border-solix-border text-slate-300 text-xs hover:text-white disabled:opacity-50",children:"Cancel"})]})]})}function L({label:s,added:i,removed:a}){return i.length===0&&a.length===0?null:e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:s}),e.jsxs("ul",{className:"mt-1 space-y-0.5",children:[i.map(n=>e.jsxs("li",{className:"text-solix-ok",children:["+ ",n]},`+${n}`)),a.map(n=>e.jsxs("li",{className:"text-solix-danger",children:["− ",n]},`-${n}`))]})]})}export{W as GalaxyPanel};
|
|
1
|
+
import{r as c,al as $,j as e}from"./index-C8BeteJb.js";function H(s,i){const a=new Map(s.advisors.map(t=>[t.role,t])),n=new Map(i.advisors.map(t=>[t.role,t])),h=[...n.keys()].filter(t=>!a.has(t)),v=[...a.keys()].filter(t=>!n.has(t)),j=[...n.keys()].filter(t=>a.has(t)).map(t=>({role:t,from:a.get(t).pinned,to:n.get(t).pinned})).filter(t=>t.from!==t.to),x=new Set(s.skills.map(t=>t.id)),p=new Set(i.skills.map(t=>t.id)),r=[...p].filter(t=>!x.has(t)),b=[...x].filter(t=>!p.has(t)),d=new Set(s.projects.map(t=>t.name)),f=new Set(i.projects.map(t=>t.name)),u=[...f].filter(t=>!d.has(t)),g=[...d].filter(t=>!f.has(t));return{advisors:{added:h.sort(),removed:v.sort(),pinChanged:j.sort((t,S)=>t.role.localeCompare(S.role))},skills:{added:r.sort(),removed:b.sort()},projects:{added:u.sort(),removed:g.sort()}}}function W({open:s,onClose:i}){const[a,n]=c.useState("share"),[h,v]=c.useState("My Galaxy"),[j,x]=c.useState(""),[p,r]=c.useState(""),[b,d]=c.useState(!1),[f,u]=c.useState(null),[g,t]=c.useState(null),S=$(o=>Object.keys(o.sessions).length),I=$(o=>Object.values(o.advisors).filter(y=>y.enabled).length),l=$(o=>Object.keys(o.skills).length);if(!s)return null;const m=async()=>{d(!0),u(null);try{const o=new URLSearchParams({name:h}),y=await fetch(`/api/galaxy/export?${o.toString()}`);if(!y.ok)throw new Error(`HTTP ${y.status}`);const N=await y.json(),C=new Blob([JSON.stringify(N,null,2)],{type:"application/json"}),w=URL.createObjectURL(C),k=document.createElement("a");k.href=w,k.download=`${h.toLowerCase().replace(/\s+/g,"-")}.galaxy.json`,k.click(),URL.revokeObjectURL(w),u("Downloaded.")}catch(o){u(`Export failed: ${String(o)}`)}finally{d(!1)}},U=async o=>{d(!0),u(null);try{const N=await(await fetch("/api/galaxy/import",{method:"POST",headers:{"Content-Type":"application/json"},body:o})).json();N.ok?(u(`Imported: ${N.advisorsEnabled} enabled, ${N.advisorsDisabled} disabled, ${N.projectsHinted} projects.`),x(""),r("")):u(`Import failed: ${N.error??"unknown"}`)}catch(y){u(`Import failed: ${String(y)}`)}finally{d(!1)}},E=async(o,y,N)=>{u(null);let C,w=N;if(w)try{const k=await fetch("/api/galaxy/export?preview=1");if(k.ok){const B=await k.json();C=H(B,w)}}catch{}t({body:o,label:y,diff:C,manifest:w})},O=()=>{let o;try{o=JSON.parse(j)}catch{u("Could not parse JSON.");return}E(j,"pasted manifest",o)},D=()=>{E(JSON.stringify({url:p}),`URL: ${p}`,void 0)},_=()=>{if(!g)return;const o=g.body;t(null),U(o)},J=()=>{t(null)};return e.jsxs("div",{className:"absolute top-16 right-0 bottom-0 w-full sm:w-[480px] bg-solix-panel border-l border-solix-border backdrop-blur-md flex flex-col z-30",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-solix-border flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs uppercase tracking-wide text-solix-accent",children:"Galaxy"}),e.jsx("div",{className:"text-lg font-semibold",children:"Share your space"}),e.jsxs("div",{className:"text-xs text-slate-400 mt-0.5",children:[I," advisors · ",l," skills ·"," ",S," sessions"]})]}),e.jsx("button",{onClick:i,className:"text-slate-400 hover:text-slate-100",children:"✕"})]}),e.jsxs("div",{className:"flex border-b border-solix-border text-xs",children:[e.jsx(P,{active:a==="share",onClick:()=>n("share"),children:"Sharing"}),e.jsx(P,{active:a==="versions",onClick:()=>n("versions"),children:"Versions"}),e.jsx(P,{active:a==="audit",onClick:()=>n("audit"),children:"Audit"})]}),a==="audit"?e.jsx(G,{open:s}):a==="versions"?e.jsx(V,{open:s}):e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6",children:[e.jsxs("section",{children:[e.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-400 mb-2",children:"Export"}),e.jsx("input",{value:h,onChange:o=>v(o.target.value),placeholder:"Galaxy name",className:"w-full text-sm bg-black/40 border border-solix-border rounded p-2 text-slate-100 placeholder-slate-600 focus:outline-none focus:border-solix-accent"}),e.jsx("button",{onClick:()=>void m(),disabled:b,className:"mt-2 w-full py-2 rounded bg-solix-accent/20 border border-solix-accent text-solix-accent text-sm hover:bg-solix-accent/30 disabled:opacity-50",children:"Download manifest (.galaxy.json)"})]}),e.jsxs("section",{children:[e.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-400 mb-2",children:"Import from URL"}),e.jsx("input",{value:p,onChange:o=>r(o.target.value),placeholder:"https://… or local server URL",className:"w-full text-sm bg-black/40 border border-solix-border rounded p-2 text-slate-100 placeholder-slate-600 focus:outline-none focus:border-solix-accent"}),e.jsx("button",{onClick:D,disabled:b||!p.trim(),className:"mt-2 w-full py-2 rounded bg-cyan-500/15 border border-cyan-400/40 text-cyan-200 text-sm hover:bg-cyan-500/25 disabled:opacity-50",children:"Pull and import"})]}),e.jsxs("section",{children:[e.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-400 mb-2",children:"Import from JSON"}),e.jsx("textarea",{value:j,onChange:o=>x(o.target.value),placeholder:"Paste a galaxy manifest JSON here…",rows:10,className:"w-full text-xs bg-black/40 border border-solix-border rounded p-2 text-slate-100 placeholder-slate-600 focus:outline-none focus:border-solix-accent font-mono resize-none"}),e.jsx("button",{onClick:O,disabled:b||!j.trim(),className:"mt-2 w-full py-2 rounded bg-cyan-500/15 border border-cyan-400/40 text-cyan-200 text-sm hover:bg-cyan-500/25 disabled:opacity-50",children:"Apply manifest"})]}),g&&e.jsx(K,{label:g.label,diff:g.diff,manifest:g.manifest,busy:b,onConfirm:_,onCancel:J}),f&&e.jsx("div",{className:"text-xs text-slate-300 border border-solix-border rounded p-2 bg-black/30",children:f})]}),e.jsx("div",{className:"px-4 py-3 border-t border-solix-border text-xs text-slate-500",children:a==="audit"?"Append-only history. Read-only.":a==="versions"?"Each export snapshots a version. Identical re-exports are deduped.":"Imports never spawn pinned advisors or run shell commands. You're in control."})]})}function P({active:s,onClick:i,children:a}){return e.jsx("button",{onClick:i,className:`flex-1 px-3 py-2 ${s?"text-solix-accent border-b-2 border-solix-accent":"text-slate-400 hover:text-slate-200 border-b-2 border-transparent"}`,children:a})}const F=["permission_approved","permission_denied","advisor_invoked","advisor_pinned","advisor_unpinned","galaxy_imported"];function G({open:s}){const[i,a]=c.useState([]),[n,h]=c.useState("all"),[v,j]=c.useState(!1),[x,p]=c.useState(null);return c.useEffect(()=>{if(!s)return;let r=!1;j(!0),p(null);const b=`/api/audit${n==="all"?"":`?kind=${n}`}`;return fetch(b).then(d=>d.ok?d.json():Promise.reject(new Error(`HTTP ${d.status}`))).then(d=>{r||a(d)}).catch(d=>{r||p(d.message)}).finally(()=>{r||j(!1)}),()=>{r=!0}},[s,n]),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx(T,{label:"all",active:n==="all",onClick:()=>h("all")}),F.map(r=>e.jsx(T,{label:A(r),active:n===r,onClick:()=>h(r)},r))]}),v&&e.jsx("div",{className:"text-xs text-slate-500 italic",children:"Loading…"}),x&&e.jsxs("div",{className:"text-xs text-solix-danger italic",children:["Could not load audit events: ",x]}),!v&&i.length===0&&e.jsx("div",{className:"text-xs text-slate-500 italic",children:"No audit events yet. Approve a permission or invoke an advisor and they'll start appearing here."}),e.jsx("ul",{className:"space-y-1.5",children:i.map(r=>e.jsxs("li",{className:"rounded border border-solix-border bg-black/20 p-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-[10px]",children:[e.jsx("span",{className:`uppercase tracking-wide ${M(r.kind)}`,children:A(r.kind)}),e.jsx("span",{className:"text-slate-500 font-mono",children:new Date(r.ts).toLocaleString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,month:"short",day:"numeric"})})]}),e.jsx("div",{className:"text-[12px] text-slate-100 mt-1 leading-snug",children:r.summary})]},r.id))})]})}function T({label:s,active:i,onClick:a}){return e.jsx("button",{onClick:a,className:`text-[10px] px-2 py-0.5 rounded border ${i?"bg-solix-accent/15 border-solix-accent text-solix-accent":"border-solix-border text-slate-400 hover:text-slate-200"}`,children:s})}function A(s){return s==="all"?"all":s.replace(/_/g," ")}function M(s){return s==="permission_approved"?"text-solix-ok":s==="permission_denied"?"text-solix-danger":s==="galaxy_imported"?"text-cyan-300":s.startsWith("advisor_")?"text-amber-300":"text-slate-300"}function V({open:s}){const[i,a]=c.useState([]),[n,h]=c.useState(!1),[v,j]=c.useState(null),[x,p]=c.useState(null),[r,b]=c.useState(null),[d,f]=c.useState(null),[u,g]=c.useState(!1);c.useEffect(()=>{if(!s)return;let l=!1;return h(!0),fetch("/api/galaxy/versions").then(m=>m.ok?m.json():Promise.reject(new Error(`HTTP ${m.status}`))).then(m=>{l||a(m)}).catch(m=>{l||j(m.message)}).finally(()=>{l||h(!1)}),()=>{l=!0}},[s]),c.useEffect(()=>{if(!x||!r){f(null);return}if(x===r){f(null);return}let l=!1;return g(!0),fetch(`/api/galaxy/diff?from=${x}&to=${r}`).then(m=>m.ok?m.json():Promise.reject(new Error(`HTTP ${m.status}`))).then(m=>{l||f(m)}).catch(()=>{l||f(null)}).finally(()=>{l||g(!1)}),()=>{l=!0}},[x,r]);const t=l=>{x?!r&&l!==x?b(l):(p(l),b(null),f(null)):p(l)},S=()=>{p(null),b(null),f(null)},I=l=>l.id===x?"from":l.id===r?"to":null;return e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3",children:[(x||r)&&e.jsxs("div",{className:"flex items-center justify-between text-[11px] text-slate-400",children:[e.jsxs("div",{children:[x&&!r&&"Pick a second version to diff…",x&&r&&u&&"Computing diff…",x&&r&&!u&&d&&e.jsxs(e.Fragment,{children:["v",d.from.ordinal," → v",d.to.ordinal]})]}),e.jsx("button",{onClick:S,className:"text-slate-500 hover:text-slate-100",children:"clear"})]}),d&&e.jsx(R,{diff:d.diff}),n&&e.jsx("div",{className:"text-xs text-slate-500 italic",children:"Loading…"}),v&&e.jsxs("div",{className:"text-xs text-solix-danger italic",children:["Could not load versions: ",v]}),!n&&i.length===0&&e.jsx("div",{className:"text-xs text-slate-500 italic",children:'No versions yet. Hit "Download manifest" on the Sharing tab to create one.'}),e.jsx("ul",{className:"space-y-1.5",children:i.map(l=>{const m=I(l);return e.jsx("li",{children:e.jsxs("button",{onClick:()=>t(l.id),className:`w-full text-left rounded border p-2 ${m==="from"?"border-solix-accent bg-solix-accent/10":m==="to"?"border-cyan-400 bg-cyan-400/10":"border-solix-border bg-black/20 hover:bg-solix-border/30"}`,children:[e.jsxs("div",{className:"flex items-center justify-between text-[10px]",children:[e.jsxs("span",{className:"uppercase tracking-wide text-slate-400",children:["v",l.ordinal," · ",l.name]}),e.jsx("span",{className:"text-slate-500 font-mono",children:new Date(l.ts).toLocaleString("en-US",{hour:"2-digit",minute:"2-digit",month:"short",day:"numeric"})})]}),e.jsxs("div",{className:"text-[11px] text-slate-300 mt-1",children:[l.manifest.advisors.length," advisors ·"," ",l.manifest.skills.length," skills ·"," ",l.manifest.projects.length," projects",m&&e.jsxs("span",{className:"ml-2 text-[9px] uppercase tracking-wider text-slate-400",children:["[",m,"]"]})]})]})},l.id)})})]})}function R({diff:s}){return s.advisors.added.length===0&&s.advisors.removed.length===0&&s.advisors.pinChanged.length===0&&s.skills.added.length===0&&s.skills.removed.length===0&&s.projects.added.length===0&&s.projects.removed.length===0?e.jsx("div",{className:"text-xs text-slate-500 italic border border-solix-border rounded p-2 bg-black/20",children:"No changes between these versions."}):e.jsxs("div",{className:"rounded border border-solix-border bg-black/30 p-2 space-y-2 text-xs",children:[e.jsx(L,{label:"Advisors",added:s.advisors.added,removed:s.advisors.removed}),s.advisors.pinChanged.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:"Advisor pin changes"}),e.jsx("ul",{className:"mt-1 space-y-0.5",children:s.advisors.pinChanged.map(a=>e.jsxs("li",{className:"text-slate-200",children:[e.jsx("span",{className:"font-mono",children:a.role}),":"," ",a.from?"pinned":"unpinned"," →"," ",a.to?"pinned":"unpinned"]},a.role))})]}),e.jsx(L,{label:"Skills",added:s.skills.added,removed:s.skills.removed}),e.jsx(L,{label:"Projects",added:s.projects.added,removed:s.projects.removed})]})}function K({label:s,diff:i,manifest:a,busy:n,onConfirm:h,onCancel:v}){return e.jsxs("div",{className:"rounded border border-amber-300/60 bg-amber-500/10 p-3 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-[11px] uppercase tracking-wide text-amber-200",children:"confirm import"}),e.jsx("div",{className:"text-[10px] text-slate-400 font-mono truncate max-w-[55%]",children:s})]}),a&&e.jsxs("div",{className:"text-xs text-slate-200",children:[e.jsx("span",{className:"font-semibold",children:a.name}),a.author&&e.jsxs("span",{className:"text-slate-400",children:[" · by ",a.author]})]}),i?e.jsx(R,{diff:i}):a?e.jsx("div",{className:"text-xs text-slate-400 italic",children:"Could not compute a diff against the current galaxy. Apply will still proceed if you confirm."}):e.jsx("div",{className:"text-xs text-slate-300",children:"Solix will fetch the manifest from this URL and apply it. Diff preview is only available for pasted JSON."}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:h,disabled:n,className:"flex-1 py-1.5 rounded bg-amber-500/20 border border-amber-300 text-amber-100 text-xs hover:bg-amber-500/30 disabled:opacity-50",children:"Apply"}),e.jsx("button",{onClick:v,disabled:n,className:"px-3 py-1.5 rounded border border-solix-border text-slate-300 text-xs hover:text-white disabled:opacity-50",children:"Cancel"})]})]})}function L({label:s,added:i,removed:a}){return i.length===0&&a.length===0?null:e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:s}),e.jsxs("ul",{className:"mt-1 space-y-0.5",children:[i.map(n=>e.jsxs("li",{className:"text-solix-ok",children:["+ ",n]},`+${n}`)),a.map(n=>e.jsxs("li",{className:"text-solix-danger",children:["− ",n]},`-${n}`))]})]})}export{W as GalaxyPanel};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as w,g as Vf,j as S,R as Qf,O as Wn,P as Vn,S as Jo,a as Oo,V as Yf,b as Xf,B as Kf,N as Wu,A as Vu,W as Zf,C as qf,c as ve,d as Te,e as Jf,L as Bo,f as $f,U as An,T as ed,h as td,D as Rn,i as Ss,M as dr,k as pr,l as $o,Q as el,m as nd,n as rd,I as id,F as su,o as tl,p as Sr,q as sd,s as fl,t as Qu,u as Ht,v as ou,w as lu,x as Yu,y as zn,z as od,E as ld,G as Cn,H as st,J as fs,K as Qn,X as ri,Y as it,Z as ad,_ as ud,$ as cd,a0 as Xu,a1 as Ft,a2 as ds,a3 as fd,a4 as ps,a5 as Tr,a6 as dl,a7 as Ku,a8 as Zu,a9 as xr,aa as dd,ab as Xn,ac as _e,ad as qu,ae as pd,af as Ju,ag as hs,ah as nl,ai as hd,aj as ms,ak as rl,al as ce,am as il,an as $u,ao as md,ap as vd,aq as gd,ar as yd,as as Sd,at as xd,au as Ed,av as wd,aw as Md,ax as _d,ay as pl,az as hl,aA as Td,aB as Pd,aC as Rd,aD as Cd}from"./index-
|
|
1
|
+
import{r as w,g as Vf,j as S,R as Qf,O as Wn,P as Vn,S as Jo,a as Oo,V as Yf,b as Xf,B as Kf,N as Wu,A as Vu,W as Zf,C as qf,c as ve,d as Te,e as Jf,L as Bo,f as $f,U as An,T as ed,h as td,D as Rn,i as Ss,M as dr,k as pr,l as $o,Q as el,m as nd,n as rd,I as id,F as su,o as tl,p as Sr,q as sd,s as fl,t as Qu,u as Ht,v as ou,w as lu,x as Yu,y as zn,z as od,E as ld,G as Cn,H as st,J as fs,K as Qn,X as ri,Y as it,Z as ad,_ as ud,$ as cd,a0 as Xu,a1 as Ft,a2 as ds,a3 as fd,a4 as ps,a5 as Tr,a6 as dl,a7 as Ku,a8 as Zu,a9 as xr,aa as dd,ab as Xn,ac as _e,ad as qu,ae as pd,af as Ju,ag as hs,ah as nl,ai as hd,aj as ms,ak as rl,al as ce,am as il,an as $u,ao as md,ap as vd,aq as gd,ar as yd,as as Sd,at as xd,au as Ed,av as wd,aw as Md,ax as _d,ay as pl,az as hl,aA as Td,aB as Pd,aC as Rd,aD as Cd}from"./index-C8BeteJb.js";var ec={exports:{}},Kn={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-reconciler-constants.production.min.js
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{al as n,r,j as s}from"./index-
|
|
1
|
+
import{al as n,r,j as s}from"./index-C8BeteJb.js";const P=[1,4,16,64];function S({open:l,onClose:u}){const e=n(t=>t.playback),m=n(t=>t.enterPlayback),v=n(t=>t.exitPlayback),o=n(t=>t.setPlaybackTime),f=n(t=>t.setPlaybackSpeed),p=n(t=>t.setPlaybackPlaying),x=n(t=>t.setPlaybackLoading),[i,g]=r.useState(30);r.useEffect(()=>{if(!l||e.active&&e.events.length>0)return;x(!0);const t=Date.now()-i*60*1e3;fetch(`/api/timeline?sinceMs=${t}&untilMs=${Date.now()}`).then(a=>a.json()).then(a=>{if(a.events.length===0){x(!1),m([],Date.now()-6e4,Date.now());return}m(a.events,a.earliest,a.latest)}).catch(a=>{console.warn("[timeline] fetch failed",a),x(!1)})},[l,i]);const c=r.useRef(0);if(r.useEffect(()=>{if(!e.active||!e.playing)return;let t=0;const a=h=>{const N=c.current?h-c.current:16;c.current=h;const b=e.currentMs+N*e.speed;b>=e.latestMs?(o(e.latestMs),p(!1)):(o(b),t=requestAnimationFrame(a))};return t=requestAnimationFrame(a),()=>{cancelAnimationFrame(t),c.current=0}},[e.active,e.playing,e.speed,e.latestMs]),!l)return null;const j=()=>{v(),u()},y=Math.max(1,e.latestMs-e.earliestMs),k=e.active?(e.currentMs-e.earliestMs)/y*100:0,M=e.events.filter(t=>t.ts<=e.currentMs);return s.jsx("div",{className:"absolute bottom-0 inset-x-0 z-30 bg-solix-panel/95 backdrop-blur border-t border-solix-border",children:s.jsxs("div",{className:"px-4 py-3 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-xs uppercase tracking-widest text-solix-accent",children:"▸ Playback"}),s.jsxs("span",{className:"text-[10px] text-slate-400",children:[e.events.length," events · last ",i," min"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("select",{value:i,onChange:t=>g(parseInt(t.target.value,10)),className:"text-[10px] bg-black/40 border border-solix-border rounded px-1.5 py-0.5 text-slate-300",children:[s.jsx("option",{value:5,children:"5 min"}),s.jsx("option",{value:15,children:"15 min"}),s.jsx("option",{value:30,children:"30 min"}),s.jsx("option",{value:60,children:"1 hour"}),s.jsx("option",{value:180,children:"3 hours"})]}),s.jsx("button",{onClick:j,className:"text-slate-400 hover:text-slate-100 text-xs",children:"✕ Live"})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:()=>p(!e.playing),disabled:!e.active||e.events.length===0,className:"w-8 h-8 rounded-full bg-solix-accent/20 border border-solix-accent text-solix-accent text-sm hover:bg-solix-accent/30 disabled:opacity-40 flex items-center justify-center",children:e.playing?"⏸":"▶"}),s.jsxs("div",{className:"flex-1 relative",children:[s.jsx("input",{type:"range",min:e.earliestMs,max:e.latestMs,value:e.currentMs,onChange:t=>o(parseInt(t.target.value,10)),className:"w-full",disabled:!e.active}),s.jsx("div",{className:"absolute -top-1.5 h-0.5 bg-solix-accent/40 pointer-events-none",style:{left:0,width:`${k}%`}})]}),s.jsx("div",{className:"flex items-center gap-1",children:P.map(t=>s.jsxs("button",{onClick:()=>f(t),className:`text-[10px] px-1.5 py-0.5 rounded border ${e.speed===t?"bg-solix-accent/20 border-solix-accent text-solix-accent":"border-solix-border text-slate-400 hover:text-slate-200"}`,children:[t,"×"]},t))})]}),s.jsxs("div",{className:"mt-2 flex items-center justify-between text-[10px] text-slate-500 font-mono",children:[s.jsx("span",{children:d(e.earliestMs)}),s.jsxs("span",{className:"text-solix-accent",children:[d(e.currentMs)," · ",M.length," events"]}),s.jsx("span",{children:d(e.latestMs)})]}),e.loading&&s.jsx("div",{className:"text-center text-xs text-slate-500 italic mt-2",children:"Loading timeline…"}),!e.loading&&e.events.length===0&&e.active&&s.jsx("div",{className:"text-center text-xs text-slate-500 italic mt-2",children:"No events in this range. Try a longer window or run some agents first."})]})})}function d(l){return l?new Date(l).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}):"—"}export{S as TimelineDrawer};
|