@codeyam/codeyam-cli 0.1.3 → 0.1.4

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.
@@ -1,13 +1,13 @@
1
- import{r,j as e,d as te,a as ae,c as oe,L as H,w as re,M as le,D as ce,S as de,G as me,u as he,f as xe,O as pe}from"./chunk-JZWAC4HX-DB3aFuEO.js";import{_ as fe}from"./preload-helper-ckwbz45p.js";import{c as ue}from"./cy-logo-cli-DcX-ZS3p.js";import{B as ye,R as ve,S as ge}from"./ReportIssueModal-BzPgx-xO.js";import{a as je,R as be}from"./useReportContext-DZlYx2c4.js";import{L as Y}from"./loader-circle-TzRHMVog.js";import{c as M}from"./createLucideIcon-D1zB-pYc.js";import{B as ke}from"./book-open-D4IPYH_y.js";import{T as we,u as Ce}from"./useToast-ihdMtlf6.js";import{u as Ne}from"./useLastLogLine-DAFqfEDH.js";import{L as Se}from"./LogViewer-kgBTLoJD.js";import{E as Ae}from"./EntityTypeIcon-BH0XDim7.js";import{T as Le}from"./TruncatedFilePath-CDpEprKa.js";import{C as ze}from"./chevron-down-CG65viiV.js";import{C as Te}from"./circle-check-igfMr5DY.js";import"./triangle-alert-CAD5b1o_.js";import"./copy-Coc4o_8c.js";function Me({id:t,selected:i,onClick:a,icon:d,name:c}){const[l,n]=r.useState(!1);r.useEffect(()=>{n(!0)},[]);const u=r.useCallback(()=>{a==null||a(t)},[a,t]);return e.jsxs("button",{className:`
1
+ import{r,j as e,d as te,a as ae,c as oe,L as H,w as re,M as le,D as ce,S as de,G as me,u as he,f as xe,O as pe}from"./chunk-JZWAC4HX-DB3aFuEO.js";import{_ as fe}from"./preload-helper-ckwbz45p.js";import{c as ue}from"./cy-logo-cli-DcX-ZS3p.js";import{B as ye,R as ve,S as ge}from"./ReportIssueModal-BzPgx-xO.js";import{a as je,R as be}from"./useReportContext-DZlYx2c4.js";import{L as Y}from"./loader-circle-TzRHMVog.js";import{c as M}from"./createLucideIcon-D1zB-pYc.js";import{B as ke}from"./book-open-D4IPYH_y.js";import{T as Ce,u as we}from"./useToast-ihdMtlf6.js";import{u as Ne}from"./useLastLogLine-DAFqfEDH.js";import{L as Se}from"./LogViewer-kgBTLoJD.js";import{E as Ae}from"./EntityTypeIcon-BH0XDim7.js";import{T as Le}from"./TruncatedFilePath-CDpEprKa.js";import{C as ze}from"./chevron-down-CG65viiV.js";import{C as Te}from"./circle-check-igfMr5DY.js";import"./triangle-alert-CAD5b1o_.js";import"./copy-Coc4o_8c.js";function Me({id:t,selected:n,onClick:a,icon:d,name:c}){const[l,i]=r.useState(!1);r.useEffect(()=>{i(!0)},[]);const u=r.useCallback(()=>{a==null||a(t)},[a,t]);return e.jsxs("button",{className:`
2
2
  w-full px-1.5 py-2 cursor-pointer focus:outline-none
3
3
  flex flex-col items-center justify-center gap-1 transition-colors
4
- ${i?"text-[#CBF3FA]":"text-[#568B94] hover:text-[#CBF3FA]"}
5
- `,onClick:u,children:[e.jsx("div",{className:`${i?"bg-[#CBF3FA] text-[#022A35]":""} w-9 h-9 rounded-lg flex items-center justify-center transition-colors`,children:l&&d}),e.jsx("span",{className:`text-[10px] font-normal text-center leading-tight ${i?"text-[#CBF3FA]":""}`,style:i?{color:"#CBF3FA !important"}:void 0,children:c})]})}/**
4
+ ${n?"text-[#CBF3FA]":"text-[#568B94] hover:text-[#CBF3FA]"}
5
+ `,onClick:u,children:[e.jsx("div",{className:`${n?"bg-[#CBF3FA] text-[#022A35]":""} w-9 h-9 rounded-lg flex items-center justify-center transition-colors`,children:l&&d}),e.jsx("span",{className:`text-[10px] font-normal text-center leading-tight ${n?"text-[#CBF3FA]":""}`,style:n?{color:"#CBF3FA !important"}:void 0,children:c})]})}/**
6
6
  * @license lucide-react v0.556.0 - ISC
7
7
  *
8
8
  * This source code is licensed under the ISC license.
9
9
  * See the LICENSE file in the root directory of this source tree.
10
- */const Ee=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],q=M("activity",Ee);/**
10
+ */const Ee=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],U=M("activity",Ee);/**
11
11
  * @license lucide-react v0.556.0 - ISC
12
12
  *
13
13
  * This source code is licensed under the ISC license.
@@ -27,12 +27,12 @@ import{r,j as e,d as te,a as ae,c as oe,L as H,w as re,M as le,D as ce,S as de,G
27
27
  *
28
28
  * This source code is licensed under the ISC license.
29
29
  * See the LICENSE file in the root directory of this source tree.
30
- */const Pe=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],We=M("flask-conical",Pe);/**
30
+ */const We=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],Pe=M("flask-conical",We);/**
31
31
  * @license lucide-react v0.556.0 - ISC
32
32
  *
33
33
  * This source code is licensed under the ISC license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
- */const Ve=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],Z=M("git-commit-horizontal",Ve);/**
35
+ */const Ve=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],K=M("git-commit-horizontal",Ve);/**
36
36
  * @license lucide-react v0.556.0 - ISC
37
37
  *
38
38
  * This source code is licensed under the ISC license.
@@ -42,13 +42,13 @@ import{r,j as e,d as te,a as ae,c as oe,L as H,w as re,M as le,D as ce,S as de,G
42
42
  *
43
43
  * This source code is licensed under the ISC license.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
- */const He=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],qe=M("panels-top-left",He);/**
45
+ */const He=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],Ue=M("panels-top-left",He);/**
46
46
  * @license lucide-react v0.556.0 - ISC
47
47
  *
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
- */const Je=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Ue=M("refresh-cw",Je);function Ye({labs:t,isAdmin:i}){var $;const a=te(),d=ae(),[c,l]=r.useState(),[n,u]=r.useState(!1),[N,b]=r.useState(!1),[y,S]=r.useState(null),v=oe();r.useEffect(()=>{v.state==="idle"&&!v.data&&v.load("/api/generate-report")},[v]);const D=(($=v.data)==null?void 0:$.defaultEmail)||"",x={width:"20px",height:"20px",strokeWidth:1.5},A=(t==null?void 0:t.simulations)??!1,_=[{id:"dashboard",icon:e.jsx(Re,{style:x}),link:"/",name:"Dashboard",hidden:!A},{id:"simulations",icon:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:x,children:[e.jsx("path",{d:"M9 12.75V15.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6 15.75H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6.75 12.7498L11.325 8.17483C11.6067 7.89873 11.9858 7.7447 12.3803 7.7461C12.7747 7.74751 13.1528 7.90423 13.4325 8.18233L16.5 11.2498",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6 8.25C6.82843 8.25 7.5 7.57843 7.5 6.75C7.5 5.92157 6.82843 5.25 6 5.25C5.17157 5.25 4.5 5.92157 4.5 6.75C4.5 7.57843 5.17157 8.25 6 8.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M15 2.25H3C2.17157 2.25 1.5 2.92157 1.5 3.75V11.25C1.5 12.0784 2.17157 12.75 3 12.75H15C15.8284 12.75 16.5 12.0784 16.5 11.25V3.75C16.5 2.92157 15.8284 2.25 15 2.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),link:"/simulations",name:"Simulations",hidden:!A},{id:"git",icon:e.jsx(Z,{style:x}),link:"/git",name:"Git",hidden:!A},{id:"files",icon:e.jsx($e,{style:x}),link:"/files",name:"Files",hidden:!A},{id:"activity",icon:e.jsx(Ue,{style:x}),link:"/activity",name:"Activity",hidden:!A},{id:"memory",icon:e.jsx(ke,{style:x}),link:"/memory",name:"Memory"},{id:"labs",icon:e.jsx(We,{style:x}),link:"/labs",name:"Labs"},{id:"settings",icon:e.jsx(ge,{style:x}),link:"/settings",name:"Settings"},{id:"commits",icon:e.jsx(Z,{style:x}),link:"/commits",name:"Commits",hidden:!0},{id:"pages",icon:e.jsx(qe,{style:x}),link:"/pages",name:"Pages",hidden:!0},{id:"components",icon:e.jsx(Fe,{style:x}),link:"/components",name:"Components",hidden:!0}],B=r.useCallback(o=>{const m=_.find(p=>p.id===o);m!=null&&m.link&&d(m.link),l(p=>p===o?void 0:o)},[_,d]);r.useEffect(()=>{const o={dashboard:["/","/home"],git:["git"],commits:["commits"],simulations:["simulations"],activity:["activity"],memory:["memory","agent-transcripts"],files:["files"],labs:["labs"],settings:["settings"],pages:["pages"],components:["components"]};for(const[m,p]of Object.entries(o))if(p.some(L=>L==="/"?a.pathname==="/":a.pathname.includes(L))){l(m);return}l(void 0)},[a]);const k=async()=>{b(!0);try{const{default:o}=await fe(async()=>{const{default:L}=await import("./html2canvas-pro.esm-fmIEn3Bc.js");return{default:L}},[]),p=(await o(document.body)).toDataURL("image/jpeg",.8);S(p),u(!0)}catch(o){console.error("Screenshot capture failed:",o),u(!0)}finally{b(!1)}},E=()=>{u(!1),S(null)},w=je();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{id:"sidebar",className:"relative w-full h-screen bg-[#051C22] flex flex-col justify-between py-3",children:[e.jsxs("div",{className:"w-full flex flex-col items-center",children:[e.jsx("div",{className:"py-3 mt-2 mb-4",children:e.jsx(H,{to:"/",className:"flex items-center justify-center cursor-pointer",children:e.jsx("img",{src:ue,alt:"CodeYam",className:"h-6"})})}),_.filter(o=>!o.hidden).map(o=>e.jsx(Me,{id:o.id,selected:o.id===c,onClick:B,icon:o.icon,name:o.name},`sidebar-button-${o.id}`))]}),i&&e.jsx("div",{className:"w-full flex flex-col items-center pb-2",children:e.jsxs("button",{onClick:()=>void k(),disabled:N,className:"w-full px-1.5 py-2 flex flex-col items-center justify-center gap-1 text-[#568B94] hover:text-[#CBF3FA] transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-wait",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",children:N?e.jsx(Y,{style:{width:"20px",height:"20px",strokeWidth:1.5},className:"animate-spin"}):e.jsx(ye,{style:{width:"20px",height:"20px",strokeWidth:1.5}})}),e.jsx("span",{className:"text-[9px] font-normal text-center leading-tight whitespace-pre-line",children:N?"Capturing...":`Report
51
- Bug`})]})})]}),n&&e.jsx(ve,{isOpen:!0,onClose:E,context:w,defaultEmail:D,screenshotDataUrl:y??void 0})]})}function Ge({toast:t,onClose:i}){r.useEffect(()=>{const c=t.duration||5e3;if(c>0){const l=setTimeout(()=>{i(t.id)},c);return()=>clearTimeout(l)}},[t.id,t.duration,i]);const a={success:"✅",error:"❌",info:"ℹ️",warning:"⚠️"},d={success:"bg-emerald-50 border-emerald-200 text-emerald-900",error:"bg-red-50 border-red-200 text-red-900",info:"bg-blue-50 border-blue-200 text-blue-900",warning:"bg-amber-50 border-amber-200 text-amber-900"};return e.jsxs("div",{className:`flex items-center gap-3 px-4 py-3 rounded-lg border-2 shadow-lg min-w-[320px] max-w-[500px] animate-[slideIn_0.3s_ease-out] ${d[t.type]}`,children:[e.jsx("span",{className:"text-2xl",children:a[t.type]}),e.jsx("p",{className:"flex-1 text-sm font-medium m-0",children:t.message}),e.jsx("button",{onClick:()=>i(t.id),className:"text-gray-500 hover:text-gray-700 text-xl leading-none bg-transparent border-none cursor-pointer p-0 w-6 h-6 flex items-center justify-center rounded transition-colors hover:bg-black/10",children:"×"})]})}function Qe({toasts:t,onClose:i}){return t.length===0?null:e.jsxs("div",{className:"fixed top-4 right-4 z-10000 flex flex-col gap-2",children:[e.jsx("style",{children:`
50
+ */const qe=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Je=M("refresh-cw",qe);function Ye({labs:t,isAdmin:n}){var $;const a=te(),d=ae(),[c,l]=r.useState(),[i,u]=r.useState(!1),[N,b]=r.useState(!1),[y,S]=r.useState(null),v=oe();r.useEffect(()=>{v.state==="idle"&&!v.data&&v.load("/api/generate-report")},[v]);const D=(($=v.data)==null?void 0:$.defaultEmail)||"",x={width:"20px",height:"20px",strokeWidth:1.5},A=(t==null?void 0:t.simulations)??!1,_=[{id:"dashboard",icon:e.jsx(Re,{style:x}),link:"/",name:"Dashboard",hidden:!A},{id:"simulations",icon:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:x,children:[e.jsx("path",{d:"M9 12.75V15.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6 15.75H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6.75 12.7498L11.325 8.17483C11.6067 7.89873 11.9858 7.7447 12.3803 7.7461C12.7747 7.74751 13.1528 7.90423 13.4325 8.18233L16.5 11.2498",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6 8.25C6.82843 8.25 7.5 7.57843 7.5 6.75C7.5 5.92157 6.82843 5.25 6 5.25C5.17157 5.25 4.5 5.92157 4.5 6.75C4.5 7.57843 5.17157 8.25 6 8.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M15 2.25H3C2.17157 2.25 1.5 2.92157 1.5 3.75V11.25C1.5 12.0784 2.17157 12.75 3 12.75H15C15.8284 12.75 16.5 12.0784 16.5 11.25V3.75C16.5 2.92157 15.8284 2.25 15 2.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),link:"/simulations",name:"Simulations",hidden:!A},{id:"git",icon:e.jsx(K,{style:x}),link:"/git",name:"Git",hidden:!A},{id:"files",icon:e.jsx($e,{style:x}),link:"/files",name:"Files",hidden:!A},{id:"activity",icon:e.jsx(Je,{style:x}),link:"/activity",name:"Activity",hidden:!A},{id:"memory",icon:e.jsx(ke,{style:x}),link:"/memory",name:"Memory"},{id:"labs",icon:e.jsx(Pe,{style:x}),link:"/labs",name:"Labs"},{id:"settings",icon:e.jsx(ge,{style:x}),link:"/settings",name:"Settings"},{id:"commits",icon:e.jsx(K,{style:x}),link:"/commits",name:"Commits",hidden:!0},{id:"pages",icon:e.jsx(Ue,{style:x}),link:"/pages",name:"Pages",hidden:!0},{id:"components",icon:e.jsx(Fe,{style:x}),link:"/components",name:"Components",hidden:!0}],B=r.useCallback(o=>{const m=_.find(p=>p.id===o);m!=null&&m.link&&d(m.link),l(p=>p===o?void 0:o)},[_,d]);r.useEffect(()=>{const o={dashboard:["/","/home"],git:["git"],commits:["commits"],simulations:["simulations"],activity:["activity"],memory:["memory","agent-transcripts"],files:["files"],labs:["labs"],settings:["settings"],pages:["pages"],components:["components"]};for(const[m,p]of Object.entries(o))if(p.some(L=>L==="/"?a.pathname==="/":a.pathname.includes(L))){l(m);return}l(void 0)},[a]);const k=async()=>{b(!0);try{const{default:o}=await fe(async()=>{const{default:L}=await import("./html2canvas-pro.esm-fmIEn3Bc.js");return{default:L}},[]),p=(await o(document.body)).toDataURL("image/jpeg",.8);S(p),u(!0)}catch(o){console.error("Screenshot capture failed:",o),u(!0)}finally{b(!1)}},E=()=>{u(!1),S(null)},C=je();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{id:"sidebar",className:"relative w-full h-screen bg-[#051C22] flex flex-col justify-between py-3",children:[e.jsxs("div",{className:"w-full flex flex-col items-center",children:[e.jsx("div",{className:"py-3 mt-2 mb-4",children:e.jsx(H,{to:"/",className:"flex items-center justify-center cursor-pointer",children:e.jsx("img",{src:ue,alt:"CodeYam",className:"h-6"})})}),_.filter(o=>!o.hidden).map(o=>e.jsx(Me,{id:o.id,selected:o.id===c,onClick:B,icon:o.icon,name:o.name},`sidebar-button-${o.id}`))]}),n&&e.jsx("div",{className:"w-full flex flex-col items-center pb-2",children:e.jsxs("button",{onClick:()=>void k(),disabled:N,className:"w-full px-1.5 py-2 flex flex-col items-center justify-center gap-1 text-[#568B94] hover:text-[#CBF3FA] transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-wait",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",children:N?e.jsx(Y,{style:{width:"20px",height:"20px",strokeWidth:1.5},className:"animate-spin"}):e.jsx(ye,{style:{width:"20px",height:"20px",strokeWidth:1.5}})}),e.jsx("span",{className:"text-[9px] font-normal text-center leading-tight whitespace-pre-line",children:N?"Capturing...":`Report
51
+ Bug`})]})})]}),i&&e.jsx(ve,{isOpen:!0,onClose:E,context:C,defaultEmail:D,screenshotDataUrl:y??void 0})]})}function Ge({toast:t,onClose:n}){r.useEffect(()=>{const c=t.duration||5e3;if(c>0){const l=setTimeout(()=>{n(t.id)},c);return()=>clearTimeout(l)}},[t.id,t.duration,n]);const a={success:"✅",error:"❌",info:"ℹ️",warning:"⚠️"},d={success:"bg-emerald-50 border-emerald-200 text-emerald-900",error:"bg-red-50 border-red-200 text-red-900",info:"bg-blue-50 border-blue-200 text-blue-900",warning:"bg-amber-50 border-amber-200 text-amber-900"};return e.jsxs("div",{className:`flex items-center gap-3 px-4 py-3 rounded-lg border-2 shadow-lg min-w-[320px] max-w-[500px] animate-[slideIn_0.3s_ease-out] ${d[t.type]}`,children:[e.jsx("span",{className:"text-2xl",children:a[t.type]}),e.jsx("p",{className:"flex-1 text-sm font-medium m-0",children:t.message}),e.jsx("button",{onClick:()=>n(t.id),className:"text-gray-500 hover:text-gray-700 text-xl leading-none bg-transparent border-none cursor-pointer p-0 w-6 h-6 flex items-center justify-center rounded transition-colors hover:bg-black/10",children:"×"})]})}function Qe({toasts:t,onClose:n}){return t.length===0?null:e.jsxs("div",{className:"fixed top-4 right-4 z-10000 flex flex-col gap-2",children:[e.jsx("style",{children:`
52
52
  @keyframes slideIn {
53
53
  from {
54
54
  transform: translateX(400px);
@@ -59,4 +59,4 @@ Bug`})]})})]}),n&&e.jsx(ve,{isOpen:!0,onClose:E,context:w,defaultEmail:D,screens
59
59
  opacity: 1;
60
60
  }
61
61
  }
62
- `}),t.map(a=>e.jsx(Ge,{toast:a,onClose:i},a.id))]})}function J({entity:t,nameSize:i="11px",pathSize:a="10px",pathMaxLength:d=50,showScenarioCount:c=!1,scenarioCount:l=0,additionalContent:n}){return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ae,{type:t.entityType||"other"}),e.jsxs(H,{to:`/entity/${t.sha}`,className:"hover:underline shrink-0 cursor-pointer",style:{fontSize:i,fontWeight:500,color:"#000",whiteSpace:"nowrap"},children:[t.name,c&&l>0&&` (${l})`]}),e.jsx(Le,{filePath:t.filePath,maxLength:d,style:{fontSize:a,color:"#8E8E8E"}})]}),n]})}const U={fontSize:"9px",color:"#005C75",fontStyle:"italic"};function Xe({currentRun:t,projectSlug:i,currentEntities:a=[],isAnalysisStarting:d=!1,queuedJobCount:c=0,queueJobs:l=[],currentlyExecuting:n=null,historicalRuns:u=[]}){var G,Q,X;const[N,b]=r.useState(!1),[y,S]=r.useState(!1),[v,D]=r.useState(null),[x,A]=r.useState(new Set),[_,B]=r.useState(new Set),[k,E]=r.useState(!1),w=!!n||l.length>0,$=!!n,o=(n==null?void 0:n.entities)||a,m=!!(t!=null&&t.analysisCompletedAt),p=(t==null?void 0:t.readyToBeCaptured)??0,L=(t==null?void 0:t.capturesCompleted)??0;t!=null&&t.captureCompletedAt||m&&(p===0||L>=p);const W=(t==null?void 0:t.currentEntityShas)&&t.currentEntityShas.length>0,V=w,{lastLine:F}=Ne(i,V),z=$||l.length>0,se=new Set(((G=n==null?void 0:n.entities)==null?void 0:G.map(s=>s.sha))||[]),R=u.filter(s=>!(s.currentEntityShas||[]).some(h=>se.has(h))),ne=(()=>{const f=Date.now()-1440*60*1e3;if(t!=null&&t.createdAt&&W){const h=t.analysisCompletedAt||t.createdAt;if(new Date(h).getTime()>f)return!0}if(R.length>0){const h=R[0],T=h.analysisCompletedAt||h.archivedAt||h.createdAt;if(T&&new Date(T).getTime()>f)return!0}return!1})();return r.useEffect(()=>{const s=(n==null?void 0:n.id)||null;w&&!y&&s!==v&&S(!0),!w&&v!==null&&D(null)},[w,n==null?void 0:n.id,y,v]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`fixed bottom-4 right-4 z-9998 bg-white rounded shadow-lg border-2 border-primary-100 transition-all duration-200 ${y?"min-w-[350px] max-w-[500px]":"w-auto"}`,children:[!y&&e.jsxs("div",{onClick:()=>{S(!0),D(null)},className:"flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-gray-50 transition-colors",title:"Click to expand",children:[z?e.jsx(Y,{size:16,className:"animate-spin",style:{color:"#005C75"}}):e.jsx("div",{className:"flex items-center justify-center rounded",style:{backgroundColor:"#E0E9EC",width:"20px",height:"20px"},children:e.jsx(q,{size:16,style:{color:"#005C75"}})}),e.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"#343434"},children:z?"Analyzing...":"Activity: No Activity Yet"}),z&&e.jsx("button",{onClick:s=>{s.stopPropagation(),b(!0)},className:"ml-auto px-2 py-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC",color:"#005C75",fontSize:"10px",fontWeight:600},children:"View Logs"})]}),y&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[z?e.jsx(Y,{size:16,className:"animate-spin",style:{color:"#005C75"}}):e.jsx("div",{className:"flex items-center justify-center rounded",style:{backgroundColor:"#E0E9EC",width:"20px",height:"20px"},children:e.jsx(q,{size:16,style:{color:"#005C75"}})}),e.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"#343434"},children:z?"Analyzing...":"Activity"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>b(!0),className:"px-2 py-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC",color:"#005C75",fontSize:"10px",fontWeight:600},children:"View Logs"}),e.jsx("button",{onClick:()=>{S(!1),D((n==null?void 0:n.id)||null)},className:"p-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC"},title:"Collapse","aria-label":"Collapse",children:e.jsx(ze,{size:16,style:{color:"#646464"}})})]})]}),e.jsx("div",{style:{height:"1px",backgroundColor:"#E0E9EC",margin:"0 12px"}}),e.jsxs("div",{className:"px-3 pt-2 pb-3 space-y-3",children:[z&&n&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(q,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Current Activity"})]}),e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:o.length>0?e.jsxs("div",{className:"space-y-1.5",children:[(k?o:o.slice(0,3)).map(s=>e.jsx(J,{entity:s,nameSize:"11px",pathSize:"10px",pathMaxLength:150},s.sha)),o.length>3&&e.jsx("button",{onClick:()=>E(s=>!s),className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:U,"aria-label":k?"Show fewer entities":`Show ${o.length-3} more entities`,children:k?"Show less":`+${o.length-3} more`}),F&&e.jsx("div",{style:{fontSize:"10px",color:"#005C75",marginTop:"4px"},children:F})]}):e.jsxs("div",{children:[n.entityNames&&n.entityNames.length>0?e.jsxs("div",{className:"space-y-0.5",children:[n.entityNames.slice(0,5).map((s,f)=>e.jsx("div",{style:{fontSize:"11px",color:"#343434"},children:s},f)),n.entityNames.length>5&&e.jsxs("div",{className:"italic",style:{fontSize:"10px",color:"#666"},children:["+",n.entityNames.length-5," ","more"]})]}):e.jsxs("div",{style:{fontSize:"11px",color:"#343434"},children:["Analyzing"," ",((Q=n.entityShas)==null?void 0:Q.length)||0," ",((X=n.entityShas)==null?void 0:X.length)===1?"entity":"entities","..."]}),F&&e.jsx("div",{style:{fontSize:"10px",color:"#005C75",marginTop:"4px"},children:F})]})})]}),l.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(_e,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Queued Activity"})]}),e.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:l.map(s=>{var T,P;const f=x.has(s.id),h=f?s.entities:s.entities.slice(0,3);return e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:s.entities.length>0?e.jsxs("div",{className:"space-y-1.5",children:[h.map(C=>e.jsx(J,{entity:C,nameSize:"10px",pathSize:"9px",pathMaxLength:120},C.sha)),s.entities.length>3&&e.jsx("button",{onClick:()=>{A(C=>{const I=new Set(C);return I.has(s.id)?I.delete(s.id):I.add(s.id),I})},className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:U,"aria-label":f?"Show fewer entities":`Show ${s.entities.length-3} more entities`,children:f?"Show less":`+${s.entities.length-3} more`})]}):e.jsxs("div",{style:{fontSize:"10px",color:"#343434"},children:[s.type==="analysis"&&e.jsx(e.Fragment,{children:s.entityNames&&s.entityNames.length>0?e.jsxs("div",{className:"space-y-0.5",children:[s.entityNames.slice(0,5).map((C,I)=>e.jsx("div",{children:C},I)),s.entityNames.length>5&&e.jsxs("div",{className:"italic",children:["+",s.entityNames.length-5," more"]})]}):`Analyzing ${((T=s.entityShas)==null?void 0:T.length)||0} ${((P=s.entityShas)==null?void 0:P.length)===1?"entity":"entities"}`}),s.type==="recapture"&&"Recapturing scenario",s.type==="debug-setup"&&"Setting up debug environment"]})},s.id)})})]}),ne&&R.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(Te,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Recently Completed"})]}),e.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:R.slice(0,3).map((s,f)=>{const h=s.entities||[],T=s.analysisCompletedAt||s.archivedAt||s.createdAt||"",P=(()=>{if(!T)return"";const j=Date.now()-new Date(T).getTime(),g=Math.floor(j/6e4),O=Math.floor(j/36e5);return O>0?`${O}h ago`:g>0?`${g}m ago`:"just now"})(),C=_.has(f),ie=(C?h:h.slice(0,3)).map(j=>{var g,O,K;return{...j,scenarioCount:((K=(O=(g=j.analyses)==null?void 0:g[0])==null?void 0:O.scenarios)==null?void 0:K.length)||0}});return e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:h.length>0&&e.jsxs("div",{className:"space-y-1.5",children:[ie.map((j,g)=>e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(J,{entity:j,nameSize:"10px",pathSize:"9px",pathMaxLength:100,showScenarioCount:!0,scenarioCount:j.scenarioCount})}),g===0&&P&&e.jsx("div",{style:{fontSize:"9px",color:"#8E8E8E",whiteSpace:"nowrap",paddingTop:"2px"},children:P})]},j.sha)),h.length>3&&e.jsx("button",{onClick:()=>{B(j=>{const g=new Set(j);return g.has(f)?g.delete(f):g.add(f),g})},className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:U,"aria-label":C?"Show fewer entities":`Show ${h.length-3} more entities`,children:C?"Show less":`+${h.length-3} more`})]})},f)})})]})]}),e.jsx("div",{style:{height:"1px",backgroundColor:"#E0E9EC",margin:"0 12px"}}),e.jsx("div",{className:"px-3 pb-2",children:e.jsx(H,{to:"/activity",className:"text-xs font-medium hover:underline cursor-pointer",style:{color:"#005C75"},children:"View All Activity →"})})]})]}),N&&i&&e.jsx(Se,{projectSlug:i,onClose:()=>b(!1)})]})}const Ke="/assets/globals-OvbPxnso.css";function ee({text:t,subtext:i,linkText:a,linkTo:d}){const[c,l]=r.useState(!1);return c?null:e.jsx("div",{className:"bg-blue-100 border rounded border-blue-800 shadow-sm mx-6 mt-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-yellow-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-blue-900",children:t}),e.jsx("p",{className:"text-xs text-blue-700 mt-0.5",children:i})]}),e.jsx(H,{to:d,className:"shrink-0 px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded hover:bg-blue-700 transition-colors",children:a})]}),e.jsx("button",{type:"button",onClick:()=>l(!0),className:"shrink-0 ml-4 p-1 rounded text-blue-600 hover:text-blue-800 hover:bg-blue-100 transition-colors cursor-pointer","aria-label":"Dismiss banner",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})})]})})}function Ze(){return e.jsx("div",{className:"px-6 sm:px-12 pb-8 mt-auto pt-8",children:e.jsxs("div",{className:"border-t border-cygray-30 pt-6 flex flex-wrap justify-between items-center gap-4",children:[e.jsx("span",{className:"font-mono text-sm font-semibold tracking-widest text-cyblack-100",children:"CODEYAM"}),e.jsxs("div",{className:"flex items-center gap-4 font-mono text-xs uppercase tracking-widest",children:[e.jsx("a",{href:"https://blog.codeyam.com/",target:"_blank",rel:"noopener noreferrer",className:"text-cyblack-100 underline underline-offset-4 hover:text-primary-100",children:"Read the Blog"}),e.jsx("span",{className:"text-cygray-30",children:"|"}),e.jsx("a",{href:"https://discord.gg/x4uAgaRdwF",target:"_blank",rel:"noopener noreferrer",className:"text-cyblack-100 underline underline-offset-4 hover:text-primary-100",children:"Join Discord"})]})]})})}function et({serverVersion:t}){const[i,a]=r.useState("stale"),[d,c]=r.useState(null),l=async()=>{a("restarting"),c(null);try{if(!(await fetch("/api/restart-server",{method:"POST"})).ok)throw new Error("Failed to restart server");a("reconnecting");let u=0;const N=30,b=1e3,y=async()=>{try{if((await fetch("/api/health")).ok){window.location.reload();return}}catch{}u++,u<N?setTimeout(()=>void y(),b):(c("Server took too long to restart. Please refresh manually."),a("stale"))};setTimeout(()=>void y(),500)}catch(n){c(n instanceof Error?n.message:"Failed to restart server"),a("stale")}};return e.jsx("div",{className:"bg-amber-100 border rounded border-amber-700 shadow-sm mx-6 mt-6",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-amber-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),e.jsxs("div",{className:"flex-1",children:[i==="stale"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Dashboard server is out of date"}),e.jsxs("p",{className:"text-xs text-amber-700 mt-0.5",children:["Server version: ",t,". A newer version of CodeYam CLI is installed. Restart the server to get the latest features."]}),d&&e.jsx("p",{className:"text-xs text-red-600 mt-1",children:d})]}),i==="restarting"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Restarting server..."}),e.jsx("p",{className:"text-xs text-amber-700 mt-0.5",children:"Please wait while the server restarts."})]}),i==="reconnecting"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Reconnecting..."}),e.jsx("p",{className:"text-xs text-amber-700 mt-0.5",children:"Waiting for the server to come back online."})]})]}),i==="stale"&&e.jsx("button",{type:"button",onClick:()=>void l(),className:"shrink-0 px-4 py-2 bg-amber-600 text-white text-sm font-medium rounded hover:bg-amber-700 transition-colors cursor-pointer",children:"Restart Server"}),(i==="restarting"||i==="reconnecting")&&e.jsxs("div",{className:"shrink-0 flex items-center gap-2 px-4 py-2 text-amber-700 text-sm",children:[e.jsxs("svg",{className:"w-4 h-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),i==="restarting"?"Stopping...":"Reconnecting..."]})]})})})}function tt({currentVersion:t,latestVersion:i}){const[a,d]=r.useState(!1),[c,l]=r.useState(!1);if(a)return null;const n="npm install -g @codeyam/codeyam-cli@latest",u=async()=>{try{await navigator.clipboard.writeText(n),l(!0),setTimeout(()=>l(!1),2e3)}catch{}};return e.jsx("div",{className:"bg-emerald-100 border rounded border-emerald-700 shadow-sm mx-6 mt-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-emerald-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M7 11l5-5m0 0l5 5m-5-5v12"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-emerald-900",children:"A new version of CodeYam CLI is available"}),e.jsxs("p",{className:"text-xs text-emerald-700 mt-0.5",children:["Current: ",t," → Latest: ",i]})]}),e.jsxs("div",{className:"shrink-0 flex items-center gap-2",children:[e.jsx("code",{className:"text-xs bg-emerald-200 text-emerald-900 px-2 py-1.5 rounded font-mono",children:n}),e.jsx("button",{type:"button",onClick:()=>void u(),className:"px-3 py-1.5 bg-emerald-600 text-white text-xs font-medium rounded hover:bg-emerald-700 transition-colors cursor-pointer",children:c?"Copied!":"Copy"})]})]}),e.jsx("button",{type:"button",onClick:()=>d(!0),className:"shrink-0 ml-4 p-1 rounded text-emerald-600 hover:text-emerald-800 hover:bg-emerald-200 transition-colors cursor-pointer","aria-label":"Dismiss banner",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})})]})})}const jt=()=>[{rel:"stylesheet",href:Ke},{rel:"icon",type:"image/x-icon",href:"/favicon.ico"}];function st(){const{currentRun:t,projectSlug:i,currentEntities:a,availableAPIKeys:d,queuedJobCount:c,queueJobs:l,currentlyExecuting:n,historicalRuns:u,isServerOutOfDate:N,serverVersion:b,npmUpdate:y,labs:S,simulationsEnabled:v,isSimulationsReady:D,isAdmin:x}=he(),{toasts:A,closeToast:_}=Ce(),B=xe(),k=r.useRef(B),E=te();r.useEffect(()=>{k.current=B},[B]);const w=E.pathname.startsWith("/entity/")&&E.pathname.includes("/edit/")||E.pathname.startsWith("/dev/"),$=E.pathname.includes("/fullscreen");return r.useEffect(()=>{const o=new EventSource("/api/events");let m=null,p=0;const L=2e3;return o.addEventListener("message",W=>{const V=JSON.parse(W.data);if(V.type==="queue")k.current.revalidate(),p=Date.now();else if(V.type==="db-change"||V.type==="unknown"){const F=Date.now(),z=F-p;z<L?(m&&clearTimeout(m),m=setTimeout(()=>{k.current.revalidate(),p=Date.now(),m=null},L-z)):(k.current.revalidate(),p=F)}}),o.addEventListener("error",W=>{console.error("SSE connection error:",W)}),()=>{m&&clearTimeout(m),o.close()}},[]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`min-h-screen ${w?"":"grid"} bg-cygray-10`,style:w?void 0:{gridTemplateColumns:"65px minmax(0, 1fr)"},children:[!w&&e.jsx(Ye,{labs:S,isAdmin:x}),e.jsxs("div",{className:"max-h-screen overflow-auto bg-cygray-10 flex flex-col min-h-screen",children:[N&&e.jsx(et,{serverVersion:b}),y&&e.jsx(tt,{currentVersion:y.currentVersion,latestVersion:y.latestVersion}),v&&d.length===0&&e.jsx(ee,{text:"No AI API keys configured. Please provide an AI API key at your earliest convenience.",subtext:"An API key is required for stable, frequent use of CodeYam",linkText:"Configure API Keys",linkTo:"/settings"}),v&&!D&&e.jsx(ee,{text:"Simulations enabled but not yet configured",subtext:"Run /codeyam-setup in Claude Code to install the analyzer and configure your dev server",linkText:"View Labs",linkTo:"/labs"}),e.jsx("div",{className:"flex-1",children:e.jsx(pe,{})}),e.jsx(Ze,{})]})]}),e.jsx(Qe,{toasts:A,onClose:_}),!$&&v&&e.jsx(Xe,{currentRun:t,projectSlug:i,currentEntities:a,isAnalysisStarting:!1,queuedJobCount:c,queueJobs:l,currentlyExecuting:n,historicalRuns:u})]})}const bt=re(function(){return e.jsxs("html",{lang:"en",children:[e.jsxs("head",{children:[e.jsx("meta",{charSet:"utf-8"}),e.jsx("meta",{name:"viewport",content:"width=device-width,initial-scale=1"}),e.jsx(le,{}),e.jsx(ce,{})]}),e.jsxs("body",{children:[e.jsx(we,{children:e.jsx(be,{children:e.jsx(st,{})})}),e.jsx(de,{}),e.jsx(me,{})]})]})});export{bt as default,jt as links};
62
+ `}),t.map(a=>e.jsx(Ge,{toast:a,onClose:n},a.id))]})}function q({entity:t,nameSize:n="11px",pathSize:a="10px",pathMaxLength:d=50,showScenarioCount:c=!1,scenarioCount:l=0,additionalContent:i}){return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ae,{type:t.entityType||"other"}),e.jsxs(H,{to:`/entity/${t.sha}`,className:"hover:underline shrink-0 cursor-pointer",style:{fontSize:n,fontWeight:500,color:"#000",whiteSpace:"nowrap"},children:[t.name,c&&l>0&&` (${l})`]}),e.jsx(Le,{filePath:t.filePath,maxLength:d,style:{fontSize:a,color:"#8E8E8E"}})]}),i]})}const J={fontSize:"9px",color:"#005C75",fontStyle:"italic"};function Xe({currentRun:t,projectSlug:n,currentEntities:a=[],isAnalysisStarting:d=!1,queuedJobCount:c=0,queueJobs:l=[],currentlyExecuting:i=null,historicalRuns:u=[]}){var G,Q,X;const[N,b]=r.useState(!1),[y,S]=r.useState(!1),[v,D]=r.useState(null),[x,A]=r.useState(new Set),[_,B]=r.useState(new Set),[k,E]=r.useState(!1),C=!!i||l.length>0,$=!!i,o=(i==null?void 0:i.entities)||a,m=!!(t!=null&&t.analysisCompletedAt),p=(t==null?void 0:t.readyToBeCaptured)??0,L=(t==null?void 0:t.capturesCompleted)??0;t!=null&&t.captureCompletedAt||m&&(p===0||L>=p);const P=(t==null?void 0:t.currentEntityShas)&&t.currentEntityShas.length>0,V=C,{lastLine:F}=Ne(n,V),z=$||l.length>0,se=new Set(((G=i==null?void 0:i.entities)==null?void 0:G.map(s=>s.sha))||[]),R=u.filter(s=>!(s.currentEntityShas||[]).some(h=>se.has(h))),ie=(()=>{const f=Date.now()-1440*60*1e3;if(t!=null&&t.createdAt&&P){const h=t.analysisCompletedAt||t.createdAt;if(new Date(h).getTime()>f)return!0}if(R.length>0){const h=R[0],T=h.analysisCompletedAt||h.archivedAt||h.createdAt;if(T&&new Date(T).getTime()>f)return!0}return!1})();return r.useEffect(()=>{const s=(i==null?void 0:i.id)||null;C&&!y&&s!==v&&S(!0),!C&&v!==null&&D(null)},[C,i==null?void 0:i.id,y,v]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`fixed bottom-4 right-4 z-9998 bg-white rounded shadow-lg border-2 border-primary-100 transition-all duration-200 ${y?"min-w-[350px] max-w-[500px]":"w-auto"}`,children:[!y&&e.jsxs("div",{onClick:()=>{S(!0),D(null)},className:"flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-gray-50 transition-colors",title:"Click to expand",children:[z?e.jsx(Y,{size:16,className:"animate-spin",style:{color:"#005C75"}}):e.jsx("div",{className:"flex items-center justify-center rounded",style:{backgroundColor:"#E0E9EC",width:"20px",height:"20px"},children:e.jsx(U,{size:16,style:{color:"#005C75"}})}),e.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"#343434"},children:z?"Analyzing...":"Activity: No Activity Yet"}),z&&e.jsx("button",{onClick:s=>{s.stopPropagation(),b(!0)},className:"ml-auto px-2 py-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC",color:"#005C75",fontSize:"10px",fontWeight:600},children:"View Logs"})]}),y&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[z?e.jsx(Y,{size:16,className:"animate-spin",style:{color:"#005C75"}}):e.jsx("div",{className:"flex items-center justify-center rounded",style:{backgroundColor:"#E0E9EC",width:"20px",height:"20px"},children:e.jsx(U,{size:16,style:{color:"#005C75"}})}),e.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"#343434"},children:z?"Analyzing...":"Activity"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>b(!0),className:"px-2 py-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC",color:"#005C75",fontSize:"10px",fontWeight:600},children:"View Logs"}),e.jsx("button",{onClick:()=>{S(!1),D((i==null?void 0:i.id)||null)},className:"p-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC"},title:"Collapse","aria-label":"Collapse",children:e.jsx(ze,{size:16,style:{color:"#646464"}})})]})]}),e.jsx("div",{style:{height:"1px",backgroundColor:"#E0E9EC",margin:"0 12px"}}),e.jsxs("div",{className:"px-3 pt-2 pb-3 space-y-3",children:[z&&i&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(U,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Current Activity"})]}),e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:o.length>0?e.jsxs("div",{className:"space-y-1.5",children:[(k?o:o.slice(0,3)).map(s=>e.jsx(q,{entity:s,nameSize:"11px",pathSize:"10px",pathMaxLength:150},s.sha)),o.length>3&&e.jsx("button",{onClick:()=>E(s=>!s),className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:J,"aria-label":k?"Show fewer entities":`Show ${o.length-3} more entities`,children:k?"Show less":`+${o.length-3} more`}),F&&e.jsx("div",{style:{fontSize:"10px",color:"#005C75",marginTop:"4px"},children:F})]}):e.jsxs("div",{children:[i.entityNames&&i.entityNames.length>0?e.jsxs("div",{className:"space-y-0.5",children:[i.entityNames.slice(0,5).map((s,f)=>e.jsx("div",{style:{fontSize:"11px",color:"#343434"},children:s},f)),i.entityNames.length>5&&e.jsxs("div",{className:"italic",style:{fontSize:"10px",color:"#666"},children:["+",i.entityNames.length-5," ","more"]})]}):e.jsxs("div",{style:{fontSize:"11px",color:"#343434"},children:["Analyzing"," ",((Q=i.entityShas)==null?void 0:Q.length)||0," ",((X=i.entityShas)==null?void 0:X.length)===1?"entity":"entities","..."]}),F&&e.jsx("div",{style:{fontSize:"10px",color:"#005C75",marginTop:"4px"},children:F})]})})]}),l.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(_e,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Queued Activity"})]}),e.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:l.map(s=>{var T,W;const f=x.has(s.id),h=f?s.entities:s.entities.slice(0,3);return e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:s.entities.length>0?e.jsxs("div",{className:"space-y-1.5",children:[h.map(w=>e.jsx(q,{entity:w,nameSize:"10px",pathSize:"9px",pathMaxLength:120},w.sha)),s.entities.length>3&&e.jsx("button",{onClick:()=>{A(w=>{const I=new Set(w);return I.has(s.id)?I.delete(s.id):I.add(s.id),I})},className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:J,"aria-label":f?"Show fewer entities":`Show ${s.entities.length-3} more entities`,children:f?"Show less":`+${s.entities.length-3} more`})]}):e.jsxs("div",{style:{fontSize:"10px",color:"#343434"},children:[s.type==="analysis"&&e.jsx(e.Fragment,{children:s.entityNames&&s.entityNames.length>0?e.jsxs("div",{className:"space-y-0.5",children:[s.entityNames.slice(0,5).map((w,I)=>e.jsx("div",{children:w},I)),s.entityNames.length>5&&e.jsxs("div",{className:"italic",children:["+",s.entityNames.length-5," more"]})]}):`Analyzing ${((T=s.entityShas)==null?void 0:T.length)||0} ${((W=s.entityShas)==null?void 0:W.length)===1?"entity":"entities"}`}),s.type==="recapture"&&"Recapturing scenario",s.type==="debug-setup"&&"Setting up debug environment"]})},s.id)})})]}),ie&&R.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(Te,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Recently Completed"})]}),e.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:R.slice(0,3).map((s,f)=>{const h=s.entities||[],T=s.analysisCompletedAt||s.archivedAt||s.createdAt||"",W=(()=>{if(!T)return"";const j=Date.now()-new Date(T).getTime(),g=Math.floor(j/6e4),O=Math.floor(j/36e5);return O>0?`${O}h ago`:g>0?`${g}m ago`:"just now"})(),w=_.has(f),ne=(w?h:h.slice(0,3)).map(j=>{var g,O,Z;return{...j,scenarioCount:((Z=(O=(g=j.analyses)==null?void 0:g[0])==null?void 0:O.scenarios)==null?void 0:Z.length)||0}});return e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:h.length>0&&e.jsxs("div",{className:"space-y-1.5",children:[ne.map((j,g)=>e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(q,{entity:j,nameSize:"10px",pathSize:"9px",pathMaxLength:100,showScenarioCount:!0,scenarioCount:j.scenarioCount})}),g===0&&W&&e.jsx("div",{style:{fontSize:"9px",color:"#8E8E8E",whiteSpace:"nowrap",paddingTop:"2px"},children:W})]},j.sha)),h.length>3&&e.jsx("button",{onClick:()=>{B(j=>{const g=new Set(j);return g.has(f)?g.delete(f):g.add(f),g})},className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:J,"aria-label":w?"Show fewer entities":`Show ${h.length-3} more entities`,children:w?"Show less":`+${h.length-3} more`})]})},f)})})]})]}),e.jsx("div",{style:{height:"1px",backgroundColor:"#E0E9EC",margin:"0 12px"}}),e.jsx("div",{className:"px-3 pb-2",children:e.jsx(H,{to:"/activity",className:"text-xs font-medium hover:underline cursor-pointer",style:{color:"#005C75"},children:"View All Activity →"})})]})]}),N&&n&&e.jsx(Se,{projectSlug:n,onClose:()=>b(!1)})]})}const Ze="/assets/globals-BSZfYCkU.css";function ee({text:t,subtext:n,linkText:a,linkTo:d}){const[c,l]=r.useState(!1);return c?null:e.jsx("div",{className:"bg-blue-100 border rounded border-blue-800 shadow-sm mx-6 mt-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-yellow-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-blue-900",children:t}),e.jsx("p",{className:"text-xs text-blue-700 mt-0.5",children:n})]}),e.jsx(H,{to:d,className:"shrink-0 px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded hover:bg-blue-700 transition-colors",children:a})]}),e.jsx("button",{type:"button",onClick:()=>l(!0),className:"shrink-0 ml-4 p-1 rounded text-blue-600 hover:text-blue-800 hover:bg-blue-100 transition-colors cursor-pointer","aria-label":"Dismiss banner",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})})]})})}function Ke(){return e.jsx("div",{className:"px-6 sm:px-12 pb-8 mt-auto pt-8",children:e.jsxs("div",{className:"border-t border-cygray-30 pt-6 flex flex-wrap justify-between items-center gap-4",children:[e.jsx("span",{className:"font-mono text-sm font-semibold tracking-widest text-cyblack-100",children:"CODEYAM"}),e.jsxs("div",{className:"flex items-center gap-4 font-mono text-xs uppercase tracking-widest",children:[e.jsx("a",{href:"https://blog.codeyam.com/",target:"_blank",rel:"noopener noreferrer",className:"text-cyblack-100 underline underline-offset-4 hover:text-primary-100",children:"Read the Blog"}),e.jsx("span",{className:"text-cygray-30",children:"|"}),e.jsx("a",{href:"https://discord.gg/x4uAgaRdwF",target:"_blank",rel:"noopener noreferrer",className:"text-cyblack-100 underline underline-offset-4 hover:text-primary-100",children:"Join Discord"})]})]})})}function et({serverVersion:t}){const[n,a]=r.useState("stale"),[d,c]=r.useState(null),l=async()=>{a("restarting"),c(null);try{if(!(await fetch("/api/restart-server",{method:"POST"})).ok)throw new Error("Failed to restart server");a("reconnecting");let u=0;const N=30,b=1e3,y=async()=>{try{if((await fetch("/api/health")).ok){window.location.reload();return}}catch{}u++,u<N?setTimeout(()=>void y(),b):(c("Server took too long to restart. Please refresh manually."),a("stale"))};setTimeout(()=>void y(),500)}catch(i){c(i instanceof Error?i.message:"Failed to restart server"),a("stale")}};return e.jsx("div",{className:"bg-amber-100 border rounded border-amber-700 shadow-sm mx-6 mt-6",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-amber-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),e.jsxs("div",{className:"flex-1",children:[n==="stale"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Dashboard server is out of date"}),e.jsxs("p",{className:"text-xs text-amber-700 mt-0.5",children:["Server version: ",t,". A newer version of CodeYam CLI is installed. Restart the server to get the latest features."]}),d&&e.jsx("p",{className:"text-xs text-red-600 mt-1",children:d})]}),n==="restarting"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Restarting server..."}),e.jsx("p",{className:"text-xs text-amber-700 mt-0.5",children:"Please wait while the server restarts."})]}),n==="reconnecting"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Reconnecting..."}),e.jsx("p",{className:"text-xs text-amber-700 mt-0.5",children:"Waiting for the server to come back online."})]})]}),n==="stale"&&e.jsx("button",{type:"button",onClick:()=>void l(),className:"shrink-0 px-4 py-2 bg-amber-600 text-white text-sm font-medium rounded hover:bg-amber-700 transition-colors cursor-pointer",children:"Restart Server"}),(n==="restarting"||n==="reconnecting")&&e.jsxs("div",{className:"shrink-0 flex items-center gap-2 px-4 py-2 text-amber-700 text-sm",children:[e.jsxs("svg",{className:"w-4 h-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),n==="restarting"?"Stopping...":"Reconnecting..."]})]})})})}function tt({currentVersion:t,latestVersion:n}){const[a,d]=r.useState(!1),[c,l]=r.useState(!1);if(a)return null;const i="npm install -g @codeyam/codeyam-cli@latest && codeyam stop && codeyam",u=async()=>{try{await navigator.clipboard.writeText(i),l(!0),setTimeout(()=>l(!1),2e3)}catch{}};return e.jsx("div",{className:"bg-emerald-100 border rounded border-emerald-700 shadow-sm mx-6 mt-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-emerald-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M7 11l5-5m0 0l5 5m-5-5v12"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-emerald-900",children:"A new version of CodeYam CLI is available"}),e.jsxs("p",{className:"text-xs text-emerald-700 mt-0.5",children:["Current: ",t," → Latest: ",n]})]}),e.jsxs("div",{className:"shrink-0 flex items-center gap-2",children:[e.jsx("code",{className:"text-xs bg-emerald-200 text-emerald-900 px-2 py-1.5 rounded font-mono",children:i}),e.jsx("button",{type:"button",onClick:()=>void u(),className:"px-3 py-1.5 bg-emerald-600 text-white text-xs font-medium rounded hover:bg-emerald-700 transition-colors cursor-pointer",children:c?"Copied!":"Copy"})]})]}),e.jsx("button",{type:"button",onClick:()=>d(!0),className:"shrink-0 ml-4 p-1 rounded text-emerald-600 hover:text-emerald-800 hover:bg-emerald-200 transition-colors cursor-pointer","aria-label":"Dismiss banner",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})})]})})}const jt=()=>[{rel:"stylesheet",href:Ze},{rel:"icon",type:"image/x-icon",href:"/favicon.ico"}];function st(){const{currentRun:t,projectSlug:n,currentEntities:a,availableAPIKeys:d,queuedJobCount:c,queueJobs:l,currentlyExecuting:i,historicalRuns:u,isServerOutOfDate:N,serverVersion:b,npmUpdate:y,labs:S,simulationsEnabled:v,isSimulationsReady:D,isAdmin:x}=he(),{toasts:A,closeToast:_}=we(),B=xe(),k=r.useRef(B),E=te();r.useEffect(()=>{k.current=B},[B]);const C=E.pathname.startsWith("/entity/")&&E.pathname.includes("/edit/")||E.pathname.startsWith("/dev/"),$=E.pathname.includes("/fullscreen");return r.useEffect(()=>{const o=new EventSource("/api/events");let m=null,p=0;const L=2e3;return o.addEventListener("message",P=>{const V=JSON.parse(P.data);if(V.type==="queue")k.current.revalidate(),p=Date.now();else if(V.type==="db-change"||V.type==="unknown"){const F=Date.now(),z=F-p;z<L?(m&&clearTimeout(m),m=setTimeout(()=>{k.current.revalidate(),p=Date.now(),m=null},L-z)):(k.current.revalidate(),p=F)}}),o.addEventListener("error",P=>{console.error("SSE connection error:",P)}),()=>{m&&clearTimeout(m),o.close()}},[]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`min-h-screen ${C?"":"grid"} bg-cygray-10`,style:C?void 0:{gridTemplateColumns:"65px minmax(0, 1fr)"},children:[!C&&e.jsx(Ye,{labs:S,isAdmin:x}),e.jsxs("div",{className:"max-h-screen overflow-auto bg-cygray-10 flex flex-col min-h-screen",children:[N&&e.jsx(et,{serverVersion:b}),y&&e.jsx(tt,{currentVersion:y.currentVersion,latestVersion:y.latestVersion}),v&&d.length===0&&e.jsx(ee,{text:"No AI API keys configured. Please provide an AI API key at your earliest convenience.",subtext:"An API key is required for stable, frequent use of CodeYam",linkText:"Configure API Keys",linkTo:"/settings"}),v&&!D&&e.jsx(ee,{text:"Simulations enabled but not yet configured",subtext:"Run /codeyam-setup in Claude Code to install the analyzer and configure your dev server",linkText:"View Labs",linkTo:"/labs"}),e.jsx("div",{className:"flex-1",children:e.jsx(pe,{})}),e.jsx(Ke,{})]})]}),e.jsx(Qe,{toasts:A,onClose:_}),!$&&v&&e.jsx(Xe,{currentRun:t,projectSlug:n,currentEntities:a,isAnalysisStarting:!1,queuedJobCount:c,queueJobs:l,currentlyExecuting:i,historicalRuns:u})]})}const bt=re(function(){return e.jsxs("html",{lang:"en",children:[e.jsxs("head",{children:[e.jsx("meta",{charSet:"utf-8"}),e.jsx("meta",{name:"viewport",content:"width=device-width,initial-scale=1"}),e.jsx(le,{}),e.jsx(ce,{})]}),e.jsxs("body",{children:[e.jsx(Ce,{children:e.jsx(be,{children:e.jsx(st,{})})}),e.jsx(de,{}),e.jsx(me,{})]})]})});export{bt as default,jt as links};
@@ -1 +1 @@
1
- import"fetch-retry";import{G as V,H as W,I as X,J as Y,K as Z,L as _,P as $,S as aa,d as ta,a as sa,b as oa,c as ia,e as ra,f as ma,g as ea,h as pa,i as la,j as na,k as da,C as ba,F as ua,E as ca,D as Ta,l as Ca,m as ha,n as ya,o as Ba,p as Sa,q as Aa,r as ga,s as Ea,t as Fa,u as Pa,v as ja,w as Da,x as Ma,y as fa,z as qa,A as xa,B as Ga}from"./server-build-CqaV_Zaw.js";import"typescript";import"kysely";import"react/jsx-runtime";import"node:stream";import"@react-router/node";import"react-router";import"isbot";import"react-dom/server";import"react";import"lucide-react";import"better-sqlite3";import"pg";import"fs";import"path";import"kysely/helpers/sqlite";import"kysely/helpers/postgres";import"fs/promises";import"os";import"prompts";import"chalk";import"crypto";import"child_process";import"url";import"util";import"dotenv";import"events";import"uuid";import"openai";import"p-queue";import"p-retry";import"@aws-sdk/client-dynamodb";import"lru-cache";import"pluralize";import"piscina";import"json5";import"@aws-sdk/util-dynamodb";import"v8";import"react-syntax-highlighter";import"react-syntax-highlighter/dist/cjs/styles/prism/index.js";import"node:crypto";import"minimatch";import"react-markdown";import"remark-gfm";import"react-diff-viewer-continued";export{V as AnalysisBranchesTableColumns,W as BranchesTableColumns,X as CommitsTableColumns,Y as EntitiesTableColumns,Z as EntityBranchesTableColumns,_ as FilesTableColumns,$ as ProjectsTableColumns,aa as ScenariosTableColumns,ta as dbToAnalysis,sa as dbToAnalysisBranch,oa as dbToBranch,ia as dbToCommit,ra as dbToEntity,ma as dbToFile,ea as dbToProject,pa as dbToScenario,la as dbToUserScenario,na as deleteScenarios,da as generateSha,ba as getDatabase,ua as getJsonHelper,ca as getPostgreDatabase,Ta as getSqliteDatabase,Ca as loadAnalyses,ha as loadAnalysis,ya as loadBranches,Ba as loadCommitBranches,Sa as loadCommits,Aa as loadEntities,ga as loadEntity,Ea as loadFiles,Fa as loadProject,Pa as updateCommitMetadata,ja as updateFreshAnalysisMetadata,Da as updateFreshAnalysisStatus,Ma as updateProjectMetadata,fa as upsertCommitBranches,qa as upsertCommits,xa as upsertGithubUser,Ga as upsertScenarios};
1
+ import"fetch-retry";import{G as V,H as W,I as X,J as Y,K as Z,L as _,P as $,S as aa,d as ta,a as sa,b as oa,c as ia,e as ra,f as ma,g as ea,h as pa,i as la,j as na,k as da,C as ba,F as ua,E as ca,D as Ta,l as Ca,m as ha,n as ya,o as Ba,p as Sa,q as Aa,r as ga,s as Ea,t as Fa,u as Pa,v as ja,w as Da,x as Ma,y as fa,z as qa,A as xa,B as Ga}from"./server-build-DYbfdxa3.js";import"typescript";import"kysely";import"react/jsx-runtime";import"node:stream";import"@react-router/node";import"react-router";import"isbot";import"react-dom/server";import"react";import"lucide-react";import"better-sqlite3";import"pg";import"fs";import"path";import"kysely/helpers/sqlite";import"kysely/helpers/postgres";import"fs/promises";import"os";import"prompts";import"chalk";import"crypto";import"child_process";import"url";import"util";import"dotenv";import"events";import"uuid";import"openai";import"p-queue";import"p-retry";import"@aws-sdk/client-dynamodb";import"lru-cache";import"pluralize";import"piscina";import"json5";import"@aws-sdk/util-dynamodb";import"v8";import"react-syntax-highlighter";import"react-syntax-highlighter/dist/cjs/styles/prism/index.js";import"node:crypto";import"minimatch";import"react-markdown";import"remark-gfm";import"react-diff-viewer-continued";export{V as AnalysisBranchesTableColumns,W as BranchesTableColumns,X as CommitsTableColumns,Y as EntitiesTableColumns,Z as EntityBranchesTableColumns,_ as FilesTableColumns,$ as ProjectsTableColumns,aa as ScenariosTableColumns,ta as dbToAnalysis,sa as dbToAnalysisBranch,oa as dbToBranch,ia as dbToCommit,ra as dbToEntity,ma as dbToFile,ea as dbToProject,pa as dbToScenario,la as dbToUserScenario,na as deleteScenarios,da as generateSha,ba as getDatabase,ua as getJsonHelper,ca as getPostgreDatabase,Ta as getSqliteDatabase,Ca as loadAnalyses,ha as loadAnalysis,ya as loadBranches,Ba as loadCommitBranches,Sa as loadCommits,Aa as loadEntities,ga as loadEntity,Ea as loadFiles,Fa as loadProject,Pa as updateCommitMetadata,ja as updateFreshAnalysisMetadata,Da as updateFreshAnalysisStatus,Ma as updateProjectMetadata,fa as upsertCommitBranches,qa as upsertCommits,xa as upsertGithubUser,Ga as upsertScenarios};