@ulpi/cli 0.1.10 → 0.1.11
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/{chunk-F32YQRFR.js → chunk-GSFWS32F.js} +1 -1
- package/dist/{ci-QBXWR3GW.js → ci-RMMSML3A.js} +1 -1
- package/dist/{doctor-SRJIZM2T.js → doctor-ILXW63Q2.js} +1 -1
- package/dist/{history-UGYO7Z3U.js → history-TKPFJAL3.js} +1 -1
- package/dist/index.js +8 -8
- package/dist/portal/apps/portal/.next/BUILD_ID +1 -1
- package/dist/portal/apps/portal/.next/app-build-manifest.json +98 -98
- package/dist/portal/apps/portal/.next/app-path-routes-manifest.json +21 -21
- package/dist/portal/apps/portal/.next/build-manifest.json +2 -2
- package/dist/portal/apps/portal/.next/prerender-manifest.json +106 -106
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/billing/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/codemap/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/history/[sha]/transcript/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/history/page.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/history/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/jobs/[id]/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/jobs/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/loop/page.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/loop/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/mcps/[name]/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/mcps/catalog/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/mcps/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/mcps/secrets/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/mcps/submissions/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/mcps/usage/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/memory/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/memory/settings/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/memory/timeline/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/notifications/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/parallel/page.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/parallel/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/prd/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/repos/[id]/guards/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/repos/[id]/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/repos/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/review/config/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/review/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/review/plan/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/review/queue/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/rules/[id]/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/rules/new/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/rules/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/rules/pipelines/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/sessions/[sessionId]/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/sessions/page.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/sessions/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/settings/github/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/settings/installations/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/settings/keys/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/settings/members/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/settings/orgs/new/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/skills/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/sprints/[batchId]/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/sprints/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/templates/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/_not-found.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/_not-found.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/auth/callback/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/auth/callback.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/auth/callback.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/billing.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/billing.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/codemap.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/codemap.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/dashboard.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/dashboard.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/history.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/history.rsc +2 -2
- package/dist/portal/apps/portal/.next/server/app/jobs.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/jobs.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/loop.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/loop.rsc +2 -2
- package/dist/portal/apps/portal/.next/server/app/mcps/catalog.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/mcps/catalog.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/mcps/secrets.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/mcps/secrets.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/mcps/submissions.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/mcps/submissions.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/mcps/usage.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/mcps/usage.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/mcps.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/mcps.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/memory/settings.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/memory/settings.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/memory/timeline.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/memory/timeline.rsc +2 -2
- package/dist/portal/apps/portal/.next/server/app/memory.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/memory.rsc +2 -2
- package/dist/portal/apps/portal/.next/server/app/notifications.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/notifications.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/parallel.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/parallel.rsc +2 -2
- package/dist/portal/apps/portal/.next/server/app/prd.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/prd.rsc +2 -2
- package/dist/portal/apps/portal/.next/server/app/repos.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/repos.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/review/config.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/review/config.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/review/plan.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/review/plan.rsc +2 -2
- package/dist/portal/apps/portal/.next/server/app/review/queue.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/review/queue.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/review.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/review.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/rules/new.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/rules/new.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/rules/pipelines.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/rules/pipelines.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/rules.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/rules.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/sessions.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/sessions.rsc +2 -2
- package/dist/portal/apps/portal/.next/server/app/settings/github.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings/github.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings/installations.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings/installations.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings/keys.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings/keys.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings/members.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings/members.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings/orgs/new.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings/orgs/new.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/skills.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/skills.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/sprints.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/sprints.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/templates.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/templates.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app-paths-manifest.json +21 -21
- package/dist/portal/apps/portal/.next/server/next-font-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/next-font-manifest.json +1 -1
- package/dist/portal/apps/portal/.next/server/pages/404.html +1 -1
- package/dist/portal/apps/portal/.next/server/pages/500.html +1 -1
- package/dist/portal/apps/portal/.next/server/pages-manifest.json +1 -1
- package/dist/portal/apps/portal/.next/static/chunks/3958-eebe9ad88e40b2c1.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/{7525-d6350803a451284c.js → 7525-8d416b046f9add2a.js} +1 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/history/{page-264989cf873cd3de.js → page-0275ca43fdd64bf2.js} +1 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/jobs/[id]/page-dba3c6050ccf9243.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/loop/page-c3f658ffb8d7397b.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/memory/page-afe7f7a5b78650f2.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/memory/timeline/{page-30db4506366d09f4.js → page-4e3dd7e30a9946f0.js} +1 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/parallel/{page-85690140ff82dd58.js → page-49a26690ced20482.js} +1 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/sessions/{page-6b199747e9f587de.js → page-0b140fb8bbc53097.js} +1 -1
- package/dist/portal/apps/portal/package.json +1 -0
- package/dist/portal/package.json +1 -1
- package/dist/{start-DWZHVBUO.js → start-BRB2XW3T.js} +1 -1
- package/dist/{update-IBPDEBEK.js → update-HBWHFHUW.js} +1 -1
- package/dist/{version-checker-XKFQNN3I.js → version-checker-BQP7DVQ4.js} +1 -1
- package/package.json +6 -6
- package/dist/portal/apps/portal/.next/static/chunks/3958-9975252472a218aa.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/jobs/[id]/page-b0ac38d08f846f50.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/loop/page-faeaacd95742c754.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/memory/page-79f977cd348c57ae.js +0 -1
- /package/dist/portal/apps/portal/.next/static/{02AzZdYDA5HVAwITp37Ql → SG8tUyluXEA9HzEKtf-oo}/_buildManifest.js +0 -0
- /package/dist/portal/apps/portal/.next/static/{02AzZdYDA5HVAwITp37Ql → SG8tUyluXEA9HzEKtf-oo}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2771],{334:(e,t,s)=>{Promise.resolve().then(s.bind(s,7102))},4736:(e,t,s)=>{"use strict";var r=s(1504);s.o(r,"useParams")&&s.d(t,{useParams:function(){return r.useParams}}),s.o(r,"usePathname")&&s.d(t,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(t,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(t,{useSearchParams:function(){return r.useSearchParams}})},6971:(e,t,s)=>{"use strict";s.d(t,{P:()=>l});var r=s(8111);let a={queued:{label:"Queued",bg:"bg-yellow-500/10",text:"text-yellow-400",dot:"bg-yellow-400"},running:{label:"Running",bg:"bg-blue-500/10",text:"text-blue-400",dot:"bg-blue-400 animate-pulse"},completed:{label:"Completed",bg:"bg-emerald-500/10",text:"text-emerald-400",dot:"bg-emerald-400"},failed:{label:"Failed",bg:"bg-red-500/10",text:"text-red-400",dot:"bg-red-400"},canceled:{label:"Canceled",bg:"bg-gray-500/10",text:"text-gray-400",dot:"bg-gray-400"}};function l(e){let{status:t,size:s="sm"}=e,l=a[t];return(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full ".concat(l.bg," ").concat(l.text," ").concat("sm"===s?"px-2 py-0.5 text-xs":"px-2.5 py-1 text-sm"),children:[(0,r.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full ".concat(l.dot)}),l.label]})}},7102:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>m});var r=s(8111),a=s(5271),l=s(4736),n=s(8934),i=s(2928),c=s(6971);function o(e){let{streamUrl:t,lines:s,live:l=!1,maxHeight:n=600}=e,[i,c]=(0,a.useState)(null!=s?s:[]),[o,d]=(0,a.useState)(!1),[x,u]=(0,a.useState)(!0),m=(0,a.useRef)(null),h=(0,a.useRef)(null);return(0,a.useEffect)(()=>{if(!t)return;let e=new EventSource(t,{withCredentials:!0});return e.onopen=()=>{d(!0)},e.onmessage=e=>{try{let t=JSON.parse(e.data);c(e=>[...e,t])}catch(t){c(t=>[...t,{timestamp:new Date().toISOString(),text:e.data}])}},e.addEventListener("done",()=>{e.close(),d(!1)}),e.onerror=()=>{d(!1),e.close()},()=>{e.close()}},[t]),(0,a.useEffect)(()=>{x&&h.current&&h.current.scrollIntoView({behavior:"smooth"})},[i,x]),(0,r.jsxs)("div",{className:"overflow-hidden rounded-xl border border-white/[0.06] bg-surface-950",children:[(0,r.jsxs)("div",{className:"glass flex items-center justify-between px-4 py-2.5",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("svg",{className:"h-3.5 w-3.5 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6.75 7.5 3 2.25-3 2.25m4.5 0h3"})}),(0,r.jsx)("span",{className:"text-xs font-medium text-gray-400",children:"Logs"}),(l||o)&&(0,r.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-emerald-400",children:[(0,r.jsx)("span",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-emerald-400"}),"Live"]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsxs)("span",{className:"text-xs text-gray-600",children:[i.length," line",1!==i.length?"s":""]}),!x&&(0,r.jsxs)("button",{onClick:()=>{var e;u(!0),null==(e=h.current)||e.scrollIntoView({behavior:"smooth"})},className:"flex items-center gap-1 rounded-md px-2 py-1 text-xs text-gray-400 transition-colors hover:bg-white/[0.04] hover:text-white",children:[(0,r.jsx)("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})}),"Bottom"]})]})]}),(0,r.jsxs)("div",{ref:m,onScroll:function(){let e=m.current;e&&u(e.scrollHeight-e.scrollTop-e.clientHeight<50)},className:"overflow-y-auto font-mono text-xs leading-6",style:{maxHeight:n},children:[0===i.length&&(0,r.jsx)("div",{className:"flex items-center justify-center py-16 text-gray-600",children:(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,r.jsx)("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6.75 7.5 3 2.25-3 2.25m4.5 0h3M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15A2.25 2.25 0 0 0 2.25 6.75v10.5A2.25 2.25 0 0 0 4.5 19.5Z"})}),(0,r.jsx)("span",{className:"text-xs",children:l||t?"Waiting for logs...":"No logs available."})]})}),i.map((e,t)=>(0,r.jsxs)("div",{className:"flex hover:bg-white/[0.02] px-4",children:[(0,r.jsx)("span",{className:"w-10 shrink-0 select-none pr-4 text-right text-gray-700",children:t+1}),(0,r.jsx)("span",{className:"w-20 shrink-0 text-gray-600",children:e.timestamp?new Date(e.timestamp).toLocaleTimeString():""}),(0,r.jsx)("span",{className:"whitespace-pre-wrap break-all ".concat(function(e){switch(e){case"error":return"text-red-400";case"warn":return"text-yellow-400";case"debug":return"text-gray-500";default:return"text-gray-300"}}(e.level)),children:e.text})]},t)),(0,r.jsx)("div",{ref:h})]})]})}var d=s(5935),x=s.n(d);function u(e){let{label:t,children:s}=e;return(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:t}),(0,r.jsx)("div",{className:"text-sm text-gray-200",children:s})]})}function m(){let e=(0,l.useParams)(),{org:t}=(0,n.As)(),[s,d]=(0,a.useState)(null),[m,h]=(0,a.useState)(!0),[g,p]=(0,a.useState)(!1),b=(0,a.useCallback)(async()=>{if(t&&(null==e?void 0:e.id))try{let s=await i.uE.getJob(t.id,e.id);d(s)}catch(e){}finally{h(!1)}},[t,null==e?void 0:e.id]);async function f(){if(t&&s){p(!0);try{await i.uE.cancelJob(t.id,s.id),await b()}catch(e){}finally{p(!1)}}}async function j(){if(t&&s){p(!0);try{let e=await i.uE.retryJob(t.id,s.id);window.location.href="/jobs/".concat(e.job_id)}catch(e){}finally{p(!1)}}}if((0,a.useEffect)(()=>{b()},[b]),(0,a.useEffect)(()=>{if(!s||"running"!==s.status)return;let e=setInterval(()=>{b()},5e3);return()=>clearInterval(e)},[s,b]),m)return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)("div",{className:"h-6 w-48 animate-pulse rounded bg-surface-800"}),(0,r.jsx)("div",{className:"h-48 animate-pulse rounded-xl border border-white/[0.06] bg-surface-900"}),(0,r.jsx)("div",{className:"h-72 animate-pulse rounded-xl border border-white/[0.06] bg-surface-900"})]});if(!s)return(0,r.jsxs)("div",{className:"py-20 text-center",children:[(0,r.jsx)("svg",{className:"mx-auto h-10 w-10 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20 13V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7m16 0v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-5m16 0h-2.586a1 1 0 0 0-.707.293l-2.414 2.414a1 1 0 0 1-.707.293h-3.172a1 1 0 0 1-.707-.293l-2.414-2.414A1 1 0 0 0 6.586 13H4"})}),(0,r.jsx)("h2",{className:"mt-3 text-base font-medium text-gray-300",children:"Job not found"}),(0,r.jsx)(x(),{href:"/jobs",className:"mt-4 inline-flex text-sm text-primary-400 hover:text-primary-300",children:"← Back to jobs"})]});let v="running"===s.status,y=v&&t?i.uE.getJobLogStreamUrl(t.id,s.id):void 0;return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("nav",{className:"flex items-center gap-1.5 text-sm",children:[(0,r.jsx)(x(),{href:"/jobs",className:"text-gray-400 transition-colors hover:text-gray-200",children:"Jobs"}),(0,r.jsx)("svg",{className:"h-3 w-3 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})}),(0,r.jsx)("span",{className:"font-mono text-sm text-white",children:s.id.slice(0,8)})]}),(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-3",children:[(0,r.jsxs)("h1",{className:"text-xl font-semibold text-white",children:["Job ",s.id.slice(0,8)]}),(0,r.jsx)(c.P,{status:s.status,size:"md"})]})]}),(0,r.jsx)("div",{className:"flex gap-2",children:"running"===s.status||"queued"===s.status?(0,r.jsx)("button",{onClick:()=>void f(),disabled:g,className:"rounded-lg border border-red-500/20 bg-red-500/5 px-3.5 py-1.5 text-sm font-medium text-red-400 transition-colors hover:bg-red-500/10 disabled:opacity-50",children:"Cancel"}):"failed"===s.status||"canceled"===s.status?(0,r.jsx)("button",{onClick:()=>void j(),disabled:g,className:"rounded-lg bg-primary-500 px-3.5 py-1.5 text-sm font-medium text-white transition-colors hover:bg-primary-600 disabled:opacity-50",children:"Retry"}):null})]}),(0,r.jsx)("div",{className:"rounded-xl border border-white/[0.06] bg-surface-900 p-5",children:(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-x-8 gap-y-5 md:grid-cols-4",children:[(0,r.jsx)(u,{label:"Status",children:(0,r.jsx)(c.P,{status:s.status})}),(0,r.jsx)(u,{label:"Repository",children:(0,r.jsxs)(x(),{href:"/repos/".concat(s.repo_id),className:"text-primary-400 hover:underline",children:[s.repo_id.slice(0,12),"..."]})}),(0,r.jsx)(u,{label:"Trigger",children:(0,r.jsx)("span",{className:"capitalize",children:s.trigger.replace(/_/g," ")})}),s.github_pr_number?(0,r.jsx)(u,{label:"PR Number",children:(0,r.jsxs)("span",{className:"text-primary-400",children:["#",s.github_pr_number]})}):(0,r.jsx)(u,{label:"PR Number",children:(0,r.jsx)("span",{className:"text-gray-600",children:"—"})}),(0,r.jsx)(u,{label:"Queued At",children:new Date(s.queued_at).toLocaleString()}),s.started_at&&(0,r.jsx)(u,{label:"Started At",children:new Date(s.started_at).toLocaleString()}),s.duration_ms?(0,r.jsx)(u,{label:"Duration",children:function(e){let t=Math.floor(e/1e3);if(t<60)return"".concat(t,"s");let s=Math.floor(t/60);return"".concat(s,"m ").concat(t%60,"s")}(s.duration_ms)}):v?(0,r.jsx)(u,{label:"Duration",children:(0,r.jsx)("span",{className:"text-blue-400",children:"In progress..."})}):null,s.worker_container_id&&(0,r.jsx)(u,{label:"Container",children:(0,r.jsx)("span",{className:"font-mono text-xs",children:s.worker_container_id.slice(0,12)})})]})}),s.result_summary&&(0,r.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-surface-900 p-5",children:[(0,r.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Result Summary"}),(0,r.jsx)("p",{className:"mt-2 text-sm leading-relaxed text-gray-300",children:s.result_summary})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"mb-3 text-base font-semibold text-white",children:"Logs"}),(0,r.jsx)(o,{streamUrl:y,live:v,maxHeight:500})]}),s.artifacts_path&&(0,r.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-surface-900 p-5",children:[(0,r.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Artifacts"}),(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-2.5",children:[(0,r.jsx)("svg",{className:"h-4 w-4 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})}),(0,r.jsx)("span",{className:"text-sm text-gray-400",children:s.artifacts_path})]})]})]})}}},e=>{e.O(0,[5935,8934,814,9743,7358],()=>e(e.s=334)),_N_E=e.O()}]);
|
package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/loop/page-faeaacd95742c754.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[313],{1452:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m});var s=n(8111),l=n(5271),a=n(4736),r=n(3951),o=n(4632),i=n(3025),c=n(2853),d=n(5079),u=n(5605),x=n(8322);function h(e){let{jobs:t,selectedId:n,onSelect:l,onNewRun:a}=e,r=function(e){let t=new Set(["running","queued","paused","pausing"]);return[...e].sort((e,n)=>{let s=+!t.has(e.status),l=+!t.has(n.status);return s!==l?s-l:new Date(n.createdAt).getTime()-new Date(e.createdAt).getTime()})}(t);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-3 shrink-0 border-b border-white/[0.04]",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-white",children:"Jobs"}),t.length>0&&(0,s.jsx)("span",{className:"inline-flex items-center justify-center rounded-full bg-surface-800 px-1.5 py-0.5 text-[10px] font-medium text-gray-400",children:t.length})]}),(0,s.jsxs)("button",{type:"button",onClick:a,className:"inline-flex items-center gap-1.5 rounded-lg bg-primary-500 px-3 py-1.5 text-[11px] font-semibold text-white transition-colors hover:bg-primary-600",children:[(0,s.jsx)("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),"New Run"]})]}),(0,s.jsx)("div",{className:"flex-1 overflow-y-auto",children:0===r.length?(0,s.jsx)("div",{className:"p-4",children:(0,s.jsx)(o.p,{title:"No jobs yet",description:"Start a new run to create a job.",icon:(0,s.jsx)("svg",{className:"h-8 w-8 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 14.15v4.25c0 1.094-.787 2.036-1.872 2.18-2.087.277-4.216.42-6.378.42s-4.291-.143-6.378-.42c-1.085-.144-1.872-1.086-1.872-2.18v-4.25m16.5 0a2.18 2.18 0 0 0 .75-1.661V8.706c0-1.081-.768-2.015-1.837-2.175a48.114 48.114 0 0 0-3.413-.387m4.5 8.006c-.194.165-.42.295-.673.38A23.978 23.978 0 0 1 12 15.75c-2.648 0-5.195-.429-7.577-1.22a2.016 2.016 0 0 1-.673-.38m0 0A2.18 2.18 0 0 1 3 12.489V8.706c0-1.081.768-2.015 1.837-2.175a48.111 48.111 0 0 1 3.413-.387m7.5 0V5.25A2.25 2.25 0 0 0 13.5 3h-3a2.25 2.25 0 0 0-2.25 2.25v.894m7.5 0a48.667 48.667 0 0 0-7.5 0"})})})}):r.map(e=>{let t=n===e.id;return(0,s.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:"w-full px-3 py-2.5 text-left transition-colors border-b border-white/[0.02] ".concat(t?"bg-primary-500/10 border-l-2 border-l-primary-500":"hover:bg-white/[0.03]"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(u.W,{status:e.status,size:"sm"}),(0,s.jsx)(x.L,{name:e.agentName})]}),(0,s.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"font-mono text-[11px] text-gray-500 truncate",children:e.sourceBranch}),e.taskCount>0&&(0,s.jsxs)("span",{className:"text-[11px] text-gray-500 shrink-0",children:[e.completedTasks,"/",e.taskCount,e.failedTasks>0&&(0,s.jsxs)("span",{className:"text-red-400",children:[" (",e.failedTasks,"!)"]})]})]}),(0,s.jsx)("div",{className:"mt-1 text-[10px] text-gray-600",children:function(e){let t=Date.now()-new Date(e).getTime();return t<6e4?"just now":t<36e5?"".concat(Math.floor(t/6e4),"m ago"):t<864e5?"".concat(Math.floor(t/36e5),"h ago"):"".concat(Math.floor(t/864e5),"d ago")}(e.createdAt)})]},e.id)})})]})}function m(){return(0,s.jsx)(i.s,{featureName:"Loop Engine",children:(0,s.jsx)(j,{})})}function j(){var e,t,n,i,u;let m=(0,a.useRouter)(),j=(0,a.useSearchParams)(),p=null!=(e=null==j?void 0:j.get("job"))?e:null,b=null!=(t=null==j?void 0:j.get("prd"))?t:null,f=null!=(n=null==j?void 0:j.get("agent"))?n:null,g=null!=(i=null==j?void 0:j.get("model"))?i:null,[v,w]=(0,l.useState)(p?"job":b?"new-run":null),{jobs:k,refresh:N,deleteJob:y,stopJob:C,rerunJob:L,rerunningId:S}=(0,c.QE)(),R=k.find(e=>"running"===e.status||"queued"===e.status),A=null!=(u=null!=p?p:null==R?void 0:R.id)?u:null,E=null!=v?v:A?"job":null,{status:M,loading:_,hasActiveEngine:P,refresh:T}=(0,c.y_)("job"===E?A:null),{start:B,runAction:D,actionRunning:W,actionMessage:I}=(0,c.nr)(T,N),V=A?k.find(e=>e.id===A):null,F=(0,l.useCallback)(e=>{var t;let n=new URLSearchParams(null!=(t=null==j?void 0:j.toString())?t:"");e?n.set("job",e):n.delete("job");let s=n.toString();m.replace("/loop".concat(s?"?".concat(s):""),{scroll:!1})},[m,j]);(0,l.useEffect)(()=>{p&&w("job")},[p]);let q=(0,l.useCallback)(()=>{w("new-run"),F(null)},[F]),J=(0,l.useCallback)(e=>{w("job"),F(e)},[F]),O=(0,l.useCallback)(async e=>{let t=await B(e);t.jobId?(w("job"),F(t.jobId)):w(null),N()},[B,N,F]),Q=(0,l.useCallback)(async e=>{try{await y(e),A===e&&(w(null),F(null))}catch(e){}},[y,A,F]),z=(0,l.useCallback)(async e=>{try{await C(e),T()}catch(e){}},[C,T]),G=(0,l.useCallback)(async e=>{try{let t=await L(e);t.id&&(w("job"),F(t.id)),T()}catch(e){}},[L,T,F]);return _?(0,s.jsxs)("div",{className:"flex flex-col h-[calc(100vh-32px)]",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Loop Engine"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-gray-400",children:"Autonomous task execution loop. Configure an agent and task tracker, then start a run."})]}),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(r.G,{rows:1})})]}):(0,s.jsxs)("div",{className:"flex flex-col h-[calc(100vh-32px)]",children:[(0,s.jsxs)("div",{className:"shrink-0",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Loop Engine"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-gray-400",children:"Autonomous task execution loop. Configure an agent and task tracker, then start a run."})]}),I&&(0,s.jsx)("div",{className:"mt-3 shrink-0 rounded-lg border border-blue-500/20 bg-blue-500/[0.06] px-3 py-2 text-xs text-blue-400",children:I}),(0,s.jsxs)("div",{className:"flex gap-4 flex-1 min-h-0 mt-4",children:[(0,s.jsx)("div",{className:"w-80 min-w-[280px] max-w-[360px] shrink-0 flex flex-col rounded-xl border border-white/[0.06] bg-surface-900 overflow-hidden",children:(0,s.jsx)(h,{jobs:k,selectedId:"job"===E?A:null,onSelect:J,onNewRun:q})}),(0,s.jsx)("div",{className:"flex-1 min-w-0 rounded-xl border border-white/[0.06] bg-surface-900 p-5 overflow-hidden flex flex-col",children:"new-run"===E?(0,s.jsx)(d.Q,{onStart:e=>void O(e),initialPrdFilename:null!=b?b:void 0,initialAgent:null!=f?f:void 0,initialModel:null!=g?g:void 0}):V?(0,s.jsx)(x.F,{job:V,status:M,actionRunning:W,onPause:()=>void D("pause","Pause",V.id),onResume:()=>void D("resume","Resume",V.id),onStop:()=>void D("stop","Stop",V.id),onStopJob:e=>void z(e),onRerun:e=>void G(e),onDelete:e=>void Q(e),rerunningId:S}):(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center flex-1",children:[(0,s.jsx)(o.p,{title:k.length>0?"Select a job":"No jobs yet",description:k.length>0?"Choose a job from the list or start a new run.":"Click 'New Run' to start your first execution.",icon:(0,s.jsx)("svg",{className:"h-10 w-10 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"})})}),0===k.length&&(0,s.jsxs)("button",{type:"button",onClick:q,className:"mt-4 inline-flex items-center gap-2 rounded-lg bg-primary-500 px-4 py-2 text-xs font-semibold text-white transition-colors hover:bg-primary-600",children:[(0,s.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),"New Run"]})]})})]})]})}},9486:(e,t,n)=>{Promise.resolve().then(n.bind(n,1452))}},e=>{e.O(0,[7889,814,9743,7358],()=>e(e.s=9486)),_N_E=e.O()}]);
|
package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/memory/page-79f977cd348c57ae.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9796],{422:(e,t,r)=>{"use strict";r.d(t,{J:()=>l,h:()=>a});var s=r(7811);function a(){return"local"===s.env.NEXT_PUBLIC_ULPI_MODE,"https://ulpi-cloud-api.ngrok.app"}function l(){return"local"===s.env.NEXT_PUBLIC_ULPI_MODE||!0==="https://ulpi-cloud-api.ngrok.app".includes("localhost")}},3446:(e,t,r)=>{"use strict";r.d(t,{Kv:()=>c,HI:()=>u,Xk:()=>d,yC:()=>x});var s=r(8111),a=r(5271),l=r(422),n=r(7811);class i{async request(e,t){let r="".concat(this.baseUrl).concat(e);if(this.repo){let e=r.includes("?")?"&":"?";r="".concat(r).concat(e,"repo=").concat(encodeURIComponent(this.repo))}let s=n.env.NEXT_PUBLIC_ULPI_API_SECRET,a=await fetch(r,{...t,headers:{"Content-Type":"application/json",...s?{"X-Ulpi-Secret":s}:{},...null==t?void 0:t.headers}});if(!a.ok)throw Error((await a.json().catch(()=>({error:a.statusText}))).error||"API error: ".concat(a.status));return a.json()}async get(e){return this.request(e)}async post(e,t){return this.request(e,{method:"POST",body:t?JSON.stringify(t):void 0})}async put(e,t){return this.request(e,{method:"PUT",body:t?JSON.stringify(t):void 0})}async delete(e){return this.request(e,{method:"DELETE"})}constructor(){this.repo=null,this.baseUrl=(0,l.h)()}}let o=(0,a.createContext)({mode:"cloud",localClient:null});function c(e){let{children:t}=e,r=(0,a.useMemo)(()=>{let e=(0,l.J)()?"local":"cloud";return{mode:e,localClient:"local"===e?new i:null}},[]);return(0,s.jsx)(o,{value:r,children:t})}function d(){return(0,a.useContext)(o).mode}function x(){let{localClient:e}=(0,a.useContext)(o);if(!e)throw Error("LocalApiClient not available in cloud mode");return e}function u(){return(0,a.useContext)(o)}},3951:(e,t,r)=>{"use strict";r.d(t,{G:()=>a});var s=r(8111);function a(e){let{rows:t=3,variant:r="skeleton",className:a=""}=e;return"spinner"===r?(0,s.jsx)("div",{className:"flex items-center justify-center py-16 ".concat(a),children:(0,s.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,s.jsx)("div",{className:"h-7 w-7 animate-spin rounded-full border-2 border-primary-500 border-t-transparent"}),(0,s.jsx)("p",{className:"text-xs text-gray-500",children:"Loading..."})]})}):(0,s.jsx)("div",{className:"space-y-3 ".concat(a),children:Array.from({length:t}).map((e,t)=>(0,s.jsx)("div",{className:"animate-pulse rounded-xl border border-white/[0.04] bg-surface-800/50 p-4",children:(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("div",{className:"h-8 w-8 rounded-lg bg-white/[0.06]"}),(0,s.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,s.jsx)("div",{className:"h-3.5 w-1/3 rounded bg-white/[0.06]"}),(0,s.jsx)("div",{className:"h-3 w-2/3 rounded bg-white/[0.04]"})]}),(0,s.jsx)("div",{className:"h-5 w-16 rounded-full bg-white/[0.04]"})]})},t))})}},4409:(e,t,r)=>{Promise.resolve().then(r.bind(r,7099))},4632:(e,t,r)=>{"use strict";r.d(t,{p:()=>l});var s=r(8111);function a(){return(0,s.jsx)("svg",{className:"h-10 w-10 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m6 4.125 2.25 2.25m0 0 2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"})})}function l(e){let{icon:t,title:r,description:l,action:n,className:i=""}=e;return(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-2xl border border-dashed border-white/[0.06] bg-surface-800/30 px-6 py-16 text-center ".concat(i),children:[(0,s.jsx)("div",{className:"mb-4",children:null!=t?t:(0,s.jsx)(a,{})}),(0,s.jsx)("h3",{className:"text-sm font-medium text-gray-300",children:r}),l&&(0,s.jsx)("p",{className:"mt-1.5 max-w-sm text-xs text-gray-500",children:l}),n&&(0,s.jsx)("button",{onClick:n.onClick,className:"mt-5 rounded-lg bg-primary-500 px-4 py-2 text-xs font-semibold text-white transition-colors hover:bg-primary-600",children:n.label})]})}},4721:(e,t,r)=>{"use strict";r.d(t,{_:()=>o});var s=r(8111),a=r(5271);let l={DECISION:"bg-blue-500/15 text-blue-400 border-blue-500/20",PATTERN:"bg-green-500/15 text-green-400 border-green-500/20",BUG_ROOT_CAUSE:"bg-red-500/15 text-red-400 border-red-500/20",PREFERENCE:"bg-yellow-500/15 text-yellow-400 border-yellow-500/20",CONSTRAINT:"bg-orange-500/15 text-orange-400 border-orange-500/20",CONTEXT:"bg-purple-500/15 text-purple-400 border-purple-500/20",LESSON:"bg-pink-500/15 text-pink-400 border-pink-500/20",RELATIONSHIP:"bg-cyan-500/15 text-cyan-400 border-cyan-500/20"},n={critical:"text-red-400",high:"text-orange-400",medium:"text-yellow-400",low:"text-gray-500"};function i(e){var t;let{type:r}=e,a=null!=(t=l[r])?t:"bg-gray-500/15 text-gray-400 border-gray-500/20";return(0,s.jsx)("span",{className:"inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide ".concat(a),children:r.replace(/_/g," ")})}function o(e){var t,r,l,o;let{entry:c,score:d,onForget:x}=e,[u,m]=(0,a.useState)(!1),p=!!c.detail,h=(null==(t=c.relatedFiles)?void 0:t.length)>0,g=p||h;return(0,s.jsxs)("div",{className:"rounded-xl border bg-surface-800/50 p-4 space-y-2 transition-colors ".concat(g?"cursor-pointer hover:border-white/[0.08]":""," ").concat(u?"border-primary-500/30":"border-white/[0.04]"),onClick:()=>g&&m(e=>!e),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[g&&(0,s.jsx)("svg",{className:"h-3.5 w-3.5 text-gray-500 transition-transform ".concat(u?"rotate-0":"-rotate-90"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})}),(0,s.jsx)(i,{type:c.type}),(0,s.jsx)("span",{className:"text-xs font-medium ".concat(n[c.importance]),children:c.importance}),void 0!==d&&(0,s.jsxs)("span",{className:"text-xs font-medium text-primary-400",children:[(100*d).toFixed(0),"% match"]})]}),x&&(0,s.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),x(c.id)},className:"rounded px-1.5 py-0.5 text-[10px] text-gray-600 transition-colors hover:bg-red-500/10 hover:text-red-400",title:"Mark as superseded",children:"forget"})]}),(0,s.jsx)("p",{className:"text-sm leading-relaxed text-gray-200",children:c.summary}),p&&(0,s.jsx)("p",{className:"text-xs leading-relaxed text-gray-400 whitespace-pre-wrap ".concat(u?"":"line-clamp-2"),children:c.detail}),u&&(0,s.jsxs)("div",{className:"space-y-2 border-t border-white/[0.04] pt-2",children:[h&&(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wide text-gray-600",children:"Related Files"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:c.relatedFiles.map(e=>(0,s.jsx)("span",{className:"inline-flex items-center gap-1 rounded bg-surface-800 px-2 py-0.5 font-mono text-[11px] text-gray-400",children:e.split("/").pop()},e))})]}),(null==(r=c.tags)?void 0:r.length)>0&&(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wide text-gray-600",children:"Tags"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:c.tags.map(e=>(0,s.jsxs)("span",{className:"inline-flex items-center rounded-full bg-surface-800 px-2 py-0.5 text-[10px] text-gray-400",children:["#",e]},e))})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-x-4 gap-y-1 pt-1 text-[11px] text-gray-600",children:[(null==(l=c.source)?void 0:l.sessionId)&&(0,s.jsxs)("span",{children:["Session: ",c.source.sessionId.slice(0,12),"..."]}),(0,s.jsxs)("span",{children:["Created: ",new Date(c.createdAt).toLocaleString()]}),(0,s.jsxs)("span",{className:"font-mono text-[10px]",children:["ID: ",c.id.slice(0,12)]})]})]}),!u&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-xs text-gray-600",children:[(null==(o=c.tags)?void 0:o.length)>0&&(0,s.jsxs)("span",{children:["#",c.tags.slice(0,3).join(", #"),c.tags.length>3&&" +".concat(c.tags.length-3)]}),(0,s.jsx)("span",{children:function(e){let t=new Date(e);if(isNaN(t.getTime()))return e;let r=Date.now()-t.getTime();return r<6e4?"just now":r<36e5?"".concat(Math.floor(r/6e4),"m ago"):r<864e5?"".concat(Math.floor(r/36e5),"h ago"):r<6048e5?"".concat(Math.floor(r/864e5),"d ago"):t.toLocaleDateString()}(c.createdAt)}),h&&(0,s.jsxs)("span",{children:[c.relatedFiles.length," files"]})]})]})}},6028:(e,t,r)=>{"use strict";r.d(t,{a:()=>l});var s=r(8111),a=r(5271);function l(e){let{open:t,onClose:r,title:l,description:n,children:i,maxWidth:o="max-w-lg"}=e,c=(0,a.useRef)(null),d=(0,a.useCallback)(e=>{"Escape"===e.key&&r()},[r]);return((0,a.useEffect)(()=>{if(t)return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[t,d]),(0,a.useEffect)(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t]),t)?(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center px-4",children:[(0,s.jsx)("div",{ref:c,className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:r}),(0,s.jsxs)("div",{className:"relative z-10 w-full ".concat(o," animate-in rounded-2xl border border-white/[0.08] bg-surface-900 shadow-2xl"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between border-b border-white/[0.06] px-6 py-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-base font-semibold text-white",children:l}),n&&(0,s.jsx)("p",{className:"mt-1 text-sm text-gray-400",children:n})]}),(0,s.jsx)("button",{onClick:r,className:"ml-4 rounded-lg p-1.5 text-gray-500 transition-colors hover:bg-white/[0.06] hover:text-gray-300",children:(0,s.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})})})]}),(0,s.jsx)("div",{className:"px-6 py-4",children:i})]})]}):null}},7099:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var s=r(8111),a=r(5271),l=r(8984),n=r(4721);let i=["DECISION","PATTERN","BUG_ROOT_CAUSE","PREFERENCE","CONSTRAINT","CONTEXT","LESSON","RELATIONSHIP"],o=["critical","high","medium","low"];function c(e){let{onSubmit:t,onCancel:r}=e,[l,n]=(0,a.useState)(""),[c,d]=(0,a.useState)("DECISION"),[x,u]=(0,a.useState)("medium"),[m,p]=(0,a.useState)(""),[h,g]=(0,a.useState)(""),[b,y]=(0,a.useState)(!1),[f,j]=(0,a.useState)(null);async function v(e){if(e.preventDefault(),l.trim()){y(!0),j(null);try{let e=m.split(",").map(e=>e.trim()).filter(Boolean);await t({summary:l.trim(),type:c,importance:x,tags:e,detail:h.trim()||void 0})}catch(e){j(e instanceof Error?e.message:"Failed to save memory")}finally{y(!1)}}}return(0,s.jsxs)("form",{onSubmit:e=>void v(e),className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs font-medium text-gray-400",children:"Summary"}),(0,s.jsx)("input",{type:"text",value:l,onChange:e=>n(e.target.value),placeholder:"What should be remembered?",className:"mt-1 w-full rounded-lg border border-white/[0.08] bg-surface-800 px-3 py-2 text-sm text-white placeholder-gray-600 outline-none focus:border-primary-500/50",autoFocus:!0})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs font-medium text-gray-400",children:"Type"}),(0,s.jsx)("select",{value:c,onChange:e=>d(e.target.value),className:"mt-1 w-full rounded-lg border border-white/[0.08] bg-surface-800 px-3 py-2 text-sm text-white outline-none focus:border-primary-500/50",children:i.map(e=>(0,s.jsx)("option",{value:e,children:e.replace(/_/g," ")},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs font-medium text-gray-400",children:"Importance"}),(0,s.jsx)("select",{value:x,onChange:e=>u(e.target.value),className:"mt-1 w-full rounded-lg border border-white/[0.08] bg-surface-800 px-3 py-2 text-sm text-white outline-none focus:border-primary-500/50",children:o.map(e=>(0,s.jsx)("option",{value:e,children:e},e))})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-xs font-medium text-gray-400",children:["Tags ",(0,s.jsx)("span",{className:"text-gray-600",children:"(comma-separated)"})]}),(0,s.jsx)("input",{type:"text",value:m,onChange:e=>p(e.target.value),placeholder:"architecture, performance, security",className:"mt-1 w-full rounded-lg border border-white/[0.08] bg-surface-800 px-3 py-2 text-sm text-white placeholder-gray-600 outline-none focus:border-primary-500/50"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-xs font-medium text-gray-400",children:["Detail ",(0,s.jsx)("span",{className:"text-gray-600",children:"(optional)"})]}),(0,s.jsx)("textarea",{value:h,onChange:e=>g(e.target.value),placeholder:"Additional context or explanation...",rows:3,className:"mt-1 w-full rounded-lg border border-white/[0.08] bg-surface-800 px-3 py-2 text-sm text-white placeholder-gray-600 outline-none focus:border-primary-500/50 resize-none"})]}),f&&(0,s.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/[0.06] px-3 py-2 text-xs text-red-400",children:f}),(0,s.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:r,className:"rounded-lg px-4 py-2 text-xs font-medium text-gray-400 transition-colors hover:bg-white/[0.04] hover:text-gray-300",children:"Cancel"}),(0,s.jsx)("button",{type:"submit",disabled:b||!l.trim(),className:"rounded-lg bg-primary-500 px-4 py-2 text-xs font-semibold text-white transition-colors hover:bg-primary-600 disabled:cursor-not-allowed disabled:opacity-50",children:b?"Saving...":"Remember"})]})]})}var d=r(3951),x=r(4632),u=r(6028);let m=["DECISION","PATTERN","BUG_ROOT_CAUSE","PREFERENCE","CONSTRAINT","CONTEXT","LESSON","RELATIONSHIP"],p=["critical","high","medium","low"],h={DECISION:"bg-blue-500/15 text-blue-400 border-blue-500/20",PATTERN:"bg-green-500/15 text-green-400 border-green-500/20",BUG_ROOT_CAUSE:"bg-red-500/15 text-red-400 border-red-500/20",PREFERENCE:"bg-yellow-500/15 text-yellow-400 border-yellow-500/20",CONSTRAINT:"bg-orange-500/15 text-orange-400 border-orange-500/20",CONTEXT:"bg-purple-500/15 text-purple-400 border-purple-500/20",LESSON:"bg-pink-500/15 text-pink-400 border-pink-500/20",RELATIONSHIP:"bg-cyan-500/15 text-cyan-400 border-cyan-500/20"};function g(){var e,t,r,i;let{status:o,loading:g,refresh:y,toggleEnabled:f}=(0,l.XB)(),{results:j,searching:v,search:N}=(0,l.nu)(),{remember:w,forget:k,runAction:C,getTimeline:E}=(0,l.wC)(),[S,T]=(0,a.useState)(""),[R,I]=(0,a.useState)([]),[L,O]=(0,a.useState)([]),[P,M]=(0,a.useState)(!1),[_,A]=(0,a.useState)(!1),[U,B]=(0,a.useState)(null),[D,F]=(0,a.useState)(null),[X,H]=(0,a.useState)(null),[W,G]=(0,a.useState)([]),[q,z]=(0,a.useState)(!0),J=(0,a.useCallback)(async()=>{try{var e;let t=await E(20);G(null!=(e=t.entries)?e:[])}catch(e){}finally{z(!1)}},[E]);(0,a.useEffect)(()=>{J()},[J]);let V=(0,a.useCallback)(async e=>{null==e||e.preventDefault(),S.trim()&&(M(!0),await N(S.trim()))},[S,N]),Z=(0,a.useCallback)(async e=>{try{await k(e),y(),J()}catch(e){}},[k,y,J]),K=(0,a.useCallback)(async e=>{await w(e.summary,e.type),A(!1),y(),J()},[w,y,J]),Q=(null==o?void 0:o.reindexing)===!0,Y=(0,a.useCallback)(async(e,t)=>{B(e),F(null);try{var r;let s=await C(e);F(null!=(r=null==s?void 0:s.message)?r:"".concat(t," started.")),y()}catch(e){F(e instanceof Error?e.message:"".concat(t," failed"))}finally{B(null)}},[C,y]),$=j.filter(e=>(!(R.length>0)||!e.type||!!R.includes(e.type))&&(!(L.length>0)||!e.importance||!!L.includes(e.importance)));return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Memory"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-gray-400",children:"Search and manage agent memories across sessions."})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[[{action:"classify-all",label:"Classify"},{action:"reindex",label:"Reindex"},{action:"export",label:"Export"}].map(e=>{let{action:t,label:r}=e,a=null!==U||"reindex"===t&&Q,l=U===t||"reindex"===t&&Q,n="reindex"===t&&Q?"Reindexing...":r;return(0,s.jsxs)("button",{onClick:()=>void Y(t,r),disabled:a,className:"inline-flex items-center gap-1.5 rounded-lg border border-white/[0.08] bg-surface-900 px-3 py-2 text-xs font-medium text-gray-300 transition-colors hover:bg-surface-800 hover:text-white disabled:cursor-not-allowed disabled:opacity-50",children:[l&&(0,s.jsx)("span",{className:"h-3 w-3 animate-spin rounded-full border-2 border-primary-500 border-t-transparent"}),n]},t)}),(0,s.jsxs)("button",{onClick:()=>A(!0),className:"inline-flex items-center gap-2 rounded-lg bg-primary-500 px-3 py-2 text-xs font-semibold text-white transition-colors hover:bg-primary-600",children:[(0,s.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),"Remember"]})]})]}),D&&(0,s.jsx)("div",{className:"rounded-lg border border-blue-500/20 bg-blue-500/[0.06] px-3 py-2 text-xs text-blue-400",children:D}),Q&&o.reindexProgress&&(0,s.jsxs)("div",{className:"rounded-xl border border-primary-500/20 bg-primary-500/[0.06] p-5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary-500 border-t-transparent"}),(0,s.jsxs)("h2",{className:"text-sm font-semibold text-white",children:["Reindexing — ",o.reindexProgress.phase]})]}),(0,s.jsx)("span",{className:"text-xs text-gray-400",children:o.reindexProgress.total>0?"".concat(o.reindexProgress.current," / ").concat(o.reindexProgress.total):"".concat(o.reindexProgress.current," processed")})]}),(0,s.jsx)("p",{className:"mt-2 text-xs text-gray-400",children:o.reindexProgress.message}),o.reindexProgress.total>0&&(0,s.jsx)("div",{className:"mt-3 h-2 w-full overflow-hidden rounded-full bg-surface-800",children:(0,s.jsx)("div",{className:"h-full rounded-full bg-primary-500 transition-all duration-500 ease-out",style:{width:"".concat(Math.min(100,Math.round(o.reindexProgress.current/o.reindexProgress.total*100)),"%")}})})]}),Q&&!o.reindexProgress&&(0,s.jsx)("div",{className:"rounded-xl border border-primary-500/20 bg-primary-500/[0.06] p-5",children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary-500 border-t-transparent"}),(0,s.jsx)("h2",{className:"text-sm font-semibold text-white",children:"Starting reindex pipeline..."})]})}),(null==o?void 0:o.lastReindexError)&&!Q&&o.lastReindexError!==X&&(0,s.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-red-500/20 bg-red-500/[0.06] px-3 py-2 text-xs text-red-400",children:[(0,s.jsxs)("span",{children:["Reindex failed: ",o.lastReindexError]}),(0,s.jsx)("button",{onClick:()=>H(o.lastReindexError),className:"ml-2 shrink-0 text-red-400/60 hover:text-red-400 transition-colors",children:(0,s.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})})})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-surface-900 p-5 space-y-4",children:[(0,s.jsx)("h2",{className:"text-base font-semibold text-white",children:"Search Memories"}),(0,s.jsxs)("form",{onSubmit:e=>void V(e),className:"flex items-end gap-3",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("label",{className:"block text-xs font-medium text-gray-400",children:"Query"}),(0,s.jsx)("input",{type:"text",value:S,onChange:e=>T(e.target.value),placeholder:"Why did we choose this architecture?",className:"mt-1 w-full rounded-lg border border-white/[0.08] bg-surface-800 px-3 py-2.5 text-sm text-white placeholder-gray-600 outline-none focus:border-primary-500/50"})]}),(0,s.jsxs)("button",{type:"submit",disabled:v||!S.trim(),className:"inline-flex items-center gap-2 rounded-lg bg-primary-500 px-4 py-2.5 text-sm font-semibold text-white transition-colors hover:bg-primary-600 disabled:cursor-not-allowed disabled:opacity-50",children:[v?(0,s.jsx)("span",{className:"h-3.5 w-3.5 animate-spin rounded-full border-2 border-white border-t-transparent"}):(0,s.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"})}),"Search"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-2 text-[10px] font-medium uppercase tracking-widest text-gray-600",children:"Type Filter"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:m.map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>{I(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},className:"inline-flex items-center rounded-full border px-2.5 py-1 text-[10px] font-semibold uppercase tracking-wide transition-colors ".concat(R.includes(e)?h[e]:"border-transparent bg-surface-800 text-gray-500 hover:text-gray-400"),children:e.replace(/_/g," ")},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-2 text-[10px] font-medium uppercase tracking-widest text-gray-600",children:"Importance Filter"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:p.map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>{O(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},className:"inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium transition-colors ".concat(L.includes(e)?"border-primary-500/30 bg-primary-500/10 text-primary-400":"border-transparent bg-surface-800 text-gray-500 hover:text-gray-400"),children:e},e))})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-12",children:[(0,s.jsxs)("div",{className:"lg:col-span-8",children:[(0,s.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,s.jsx)("h2",{className:"text-base font-semibold text-white",children:P?"Search Results":"Recent Memories"}),P&&$.length>0&&(0,s.jsxs)("span",{className:"text-xs text-gray-500",children:[$.length," results"]}),!P&&W.length>0&&(0,s.jsxs)("span",{className:"text-xs text-gray-500",children:["Last ",W.length]})]}),v?(0,s.jsx)(d.G,{rows:3}):P?0===$.length?(0,s.jsx)(x.p,{title:"No results found",description:"Try a different query or adjust the filters."}):(0,s.jsx)("div",{className:"space-y-3",children:$.map(e=>(0,s.jsx)(n._,{entry:e,score:e.score,onForget:Z},e.id))}):q?(0,s.jsx)(d.G,{rows:3}):0===W.length?(0,s.jsx)(x.p,{title:"No memories yet",description:"Memories will appear here as the agent captures decisions, patterns, and lessons.",icon:(0,s.jsx)("svg",{className:"h-10 w-10 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Z"})})}):(0,s.jsx)("div",{className:"space-y-3",children:W.map(e=>(0,s.jsx)(n._,{entry:e,onForget:Z},e.id))})]}),(0,s.jsxs)("div",{className:"lg:col-span-4 space-y-4",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-surface-900 p-5",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:"Stats"}),g?(0,s.jsx)(d.G,{rows:1,variant:"spinner"}):o?(0,s.jsxs)("div",{className:"mt-3 space-y-2.5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{className:"text-gray-400",children:"Enabled"}),(0,s.jsx)("button",{onClick:()=>{var e;f(!(null==(e=o.config)?void 0:e.enabled))},className:"relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full transition-colors ".concat((null==(e=o.config)?void 0:e.enabled)?"bg-primary-500":"bg-surface-700"),children:(0,s.jsx)("span",{className:"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform ".concat((null==(t=o.config)?void 0:t.enabled)?"translate-x-[18px]":"translate-x-[3px]")})})]}),(0,s.jsx)(b,{label:"Total Memories",value:String(null!=(i=null==(r=o.stats)?void 0:r.totalMemories)?i:0)}),(0,s.jsx)(b,{label:"Initialized",value:o.initialized?"Yes":"No"})]}):(0,s.jsx)("p",{className:"mt-2 text-xs text-gray-500",children:"Unable to fetch status."})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-surface-900 p-5",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:"About Memory"}),(0,s.jsx)("p",{className:"mt-2 text-xs leading-relaxed text-gray-400",children:"Agent Memory captures decisions, patterns, and lessons learned across coding sessions. Memories are semantically indexed and surfaced to the agent at session start for context continuity."})]})]})]}),(0,s.jsx)(u.a,{open:_,onClose:()=>A(!1),title:"Remember",description:"Create a new memory for the agent to recall.",children:(0,s.jsx)(c,{onSubmit:K,onCancel:()=>A(!1)})})]})}function b(e){let{label:t,value:r}=e;return(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{className:"text-gray-400",children:t}),(0,s.jsx)("span",{className:"font-medium text-white",children:r})]})}},8984:(e,t,r)=>{"use strict";r.d(t,{XB:()=>l,nu:()=>n,wC:()=>i});var s=r(5271),a=r(3446);function l(){let e=(0,a.yC)(),[t,r]=(0,s.useState)(null),[l,n]=(0,s.useState)(!0),[i,o]=(0,s.useState)(null),c=(0,s.useRef)(null),d=(0,s.useCallback)(async()=>{o(null);try{let t=await e.get("/api/memory/status");return r(t),t}catch(e){return o(e instanceof Error?e.message:"Failed to fetch memory status"),null}finally{n(!1)}},[e]);(0,s.useEffect)(()=>{let e=!1;async function t(){var r;if(e)return;let s=await d();e||(c.current=setTimeout(()=>void t(),null!=(r=null==s?void 0:s.pollIntervalMs)?r:3e4))}return n(!0),t(),()=>{e=!0,c.current&&clearTimeout(c.current)}},[d]);let x=(0,s.useCallback)(async t=>{await e.put("/api/memory/config",{enabled:t}),await d()},[e,d]);return{status:t,loading:l,error:i,refresh:d,toggleEnabled:x}}function n(){let e=(0,a.yC)(),[t,r]=(0,s.useState)([]),[l,n]=(0,s.useState)(!1);return{results:t,searching:l,search:(0,s.useCallback)(async t=>{n(!0);try{var s;let a=(null!=(s=(await e.post("/api/memory/search",{query:t})).results)?s:[]).map(e=>e.entry);return r(a),a}catch(e){return r([]),[]}finally{n(!1)}},[e])}}function i(){let e=(0,a.yC)(),t=(0,s.useCallback)(async(t,r)=>e.post("/api/memory/remember",{summary:t,type:null!=r?r:"CONTEXT"}),[e]),r=(0,s.useCallback)(async t=>e.get("/api/memory/timeline".concat(t?"?limit=".concat(t):"")),[e]);return{remember:t,getTimeline:r,forget:(0,s.useCallback)(async t=>e.post("/api/memory/entries/".concat(t,"/forget")),[e]),runAction:(0,s.useCallback)(async t=>e.post("/api/memory/action",{action:t}),[e])}}}},e=>{e.O(0,[814,9743,7358],()=>e(e.s=4409)),_N_E=e.O()}]);
|
|
File without changes
|
|
File without changes
|