loki-mode 6.57.0 → 6.57.2

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.
Files changed (28) hide show
  1. package/SKILL.md +2 -2
  2. package/VERSION +1 -1
  3. package/dashboard/__init__.py +1 -1
  4. package/docs/INSTALLATION.md +1 -1
  5. package/mcp/__init__.py +1 -1
  6. package/package.json +1 -1
  7. package/web-app/dist/assets/{Badge-B67j7joS.js → Badge-DEuIXRiU.js} +1 -1
  8. package/web-app/dist/assets/Button-C6_pbJaj.js +11 -0
  9. package/web-app/dist/assets/{Card-Ciw4QWLx.js → Card-Brk8VylH.js} +1 -1
  10. package/web-app/dist/assets/{HomePage-YNmSv1D1.js → HomePage-Ch2vN8Ak.js} +3 -3
  11. package/web-app/dist/assets/{LoginPage-DxTWjVbY.js → LoginPage-Drv-MrWG.js} +1 -1
  12. package/web-app/dist/assets/{NotFoundPage-BCVkrGqA.js → NotFoundPage-zzGOKeA7.js} +1 -1
  13. package/web-app/dist/assets/{ProjectPage-BnDAAUIO.js → ProjectPage-CypAvA7p.js} +45 -50
  14. package/web-app/dist/assets/ProjectsPage-Dwksrl0D.js +16 -0
  15. package/web-app/dist/assets/{SettingsPage-BlEJ08Gv.js → SettingsPage-DgQkGCgO.js} +1 -1
  16. package/web-app/dist/assets/{TemplatesPage-u9bIAvZ4.js → TemplatesPage-sR52FMuk.js} +1 -1
  17. package/web-app/dist/assets/{TerminalOutput-B455njN4.js → TerminalOutput-IDSyFzsl.js} +10 -15
  18. package/web-app/dist/assets/{arrow-left-CrvV7OEl.js → arrow-left-D7rfZRWw.js} +1 -1
  19. package/web-app/dist/assets/{clock-arMDDQOh.js → clock-DJzo3OVn.js} +1 -1
  20. package/web-app/dist/assets/{external-link-BBVnfWUJ.js → external-link-DhyFyJxS.js} +1 -1
  21. package/web-app/dist/assets/{index-iESYbzQ8.js → index-B5T4poQo.js} +15 -15
  22. package/web-app/dist/assets/index-DLwOm_Mv.css +1 -0
  23. package/web-app/dist/assets/square-BPVJdSa9.js +6 -0
  24. package/web-app/dist/index.html +2 -2
  25. package/web-app/server.py +313 -3
  26. package/web-app/dist/assets/Button-DMrzb-kA.js +0 -6
  27. package/web-app/dist/assets/ProjectsPage-CU3RDQw8.js +0 -6
  28. package/web-app/dist/assets/index-UNfgZjJl.css +0 -1
@@ -0,0 +1,16 @@
1
+ import{c as S,u as R,r as a,a as v,j as e}from"./index-B5T4poQo.js";import{T as z,B,P as E}from"./Button-C6_pbJaj.js";import{C as M}from"./Card-Brk8VylH.js";import{u as U,B as H}from"./Badge-DEuIXRiU.js";import{S as I}from"./square-BPVJdSa9.js";import"./clock-DJzo3OVn.js";/**
2
+ * @license lucide-react v0.577.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const V=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],X=S("circle-x",V);/**
7
+ * @license lucide-react v0.577.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const G=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],J=S("search",G);/**
12
+ * @license lucide-react v0.577.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const K=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],O=S("square-check-big",K);function Q(l){const n=Y(l);return n==="completed"?"completed":n==="running"?"running":n==="failed"?"failed":n==="started"?"started":"empty"}const W={completed:"Completed",complete:"Completed",done:"Completed",completion_promise_fulfilled:"Completed",running:"Running",in_progress:"Running",planning:"Planning",started:"Started",error:"Failed",failed:"Failed",empty:"Empty"};function Y(l){return{completion_promise_fulfilled:"completed",complete:"completed",done:"completed",in_progress:"running",planning:"running",error:"failed"}[l]||l}const Z=[{key:"all",label:"All"},{key:"running",label:"Running"},{key:"completed",label:"Completed"},{key:"failed",label:"Failed"}];function ae(){const l=R(),[n,k]=a.useState(""),[o,h]=a.useState("all"),[r,c]=a.useState(new Set),[d,f]=a.useState(null),[m,g]=a.useState(!1),[j,w]=a.useState(!1),[C,x]=a.useState(null),D=a.useCallback(()=>v.getSessionsHistory(),[]),{data:b,refresh:F}=U(D,15e3,!0),y=a.useMemo(()=>{if(!b)return[];let t=b;if(o!=="all"&&(t=t.filter(s=>s.status===o)),n.trim()){const s=n.trim().toLowerCase();t=t.filter(i=>i.prd_snippet.toLowerCase().includes(s))}return t},[b,o,n]),N=r.size>0,_=(t,s)=>{s.stopPropagation(),c(i=>{const u=new Set(i);return u.has(t)?u.delete(t):u.add(t),u})},$=()=>{c(new Set(y.map(t=>t.id)))},P=()=>{c(new Set)},T=(t,s)=>{t.stopPropagation(),f(s)},A=()=>{r.size!==0&&g(!0)},L=async()=>{w(!0);try{if(m){const t=Array.from(r);let s=0;for(const i of t)try{await v.deleteSession(i),s++}catch{}c(new Set),g(!1),x(`${s} project${s!==1?"s":""} deleted`)}else d&&(await v.deleteSession(d.id),f(null),x("Project deleted"));setTimeout(()=>x(null),3e3),F()}catch(t){x(`Delete failed: ${t instanceof Error?t.message:"Unknown error"}`),setTimeout(()=>x(null),5e3)}finally{w(!1)}},p=m?r.size:1,q=m?`${r.size} project${r.size!==1?"s":""}`:(d==null?void 0:d.prd_snippet)||"Untitled project";return e.jsxs("div",{className:"max-w-[1400px] mx-auto px-6 py-8",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h1",{className:"font-heading text-h1 text-[#36342E]",children:"Projects"}),e.jsxs("div",{className:"flex items-center gap-2",children:[N&&e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"text-xs text-[#6B6960] mr-1",children:[r.size," selected"]}),e.jsx("button",{onClick:$,className:"px-3 py-1.5 text-xs font-medium text-[#6B6960] hover:text-[#36342E] hover:bg-[#F8F4F0] rounded-[3px] transition-colors",children:"Select all"}),e.jsx("button",{onClick:P,className:"px-3 py-1.5 text-xs font-medium text-[#6B6960] hover:text-[#36342E] hover:bg-[#F8F4F0] rounded-[3px] transition-colors",children:"Clear"}),e.jsxs("button",{onClick:A,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-white bg-red-600 hover:bg-red-700 rounded-[3px] transition-colors",children:[e.jsx(z,{size:12}),"Delete (",r.size,")"]})]}),e.jsx(B,{icon:E,onClick:()=>l("/"),children:"New Project"})]})]}),e.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[e.jsxs("div",{className:"relative flex-1 max-w-sm",children:[e.jsx(J,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[#6B6960]"}),e.jsx("input",{type:"text",placeholder:"Search projects...","aria-label":"Search projects",value:n,onChange:t=>k(t.target.value),className:"w-full pl-9 pr-3 py-2 text-sm border border-[#ECEAE3] rounded-[5px] bg-white text-[#36342E] placeholder:text-[#939084] focus:outline-none focus:ring-2 focus:ring-[#553DE9]/20 focus:border-[#553DE9]"})]}),e.jsx("div",{className:"flex items-center gap-1",role:"tablist",children:Z.map(t=>e.jsx("button",{role:"tab","aria-selected":o===t.key,onClick:()=>h(t.key),className:`px-3 py-1.5 text-xs font-semibold rounded-[3px] transition-colors ${o===t.key?"bg-[#553DE9] text-white":"text-[#6B6960] hover:text-[#36342E] hover:bg-[#F8F4F0]"}`,children:t.label},t.key))})]}),y.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[e.jsx("p",{className:"text-[#6B6960] text-sm mb-4",children:"No projects yet. Start building."}),e.jsx(B,{icon:E,onClick:()=>l("/"),children:"New Project"})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:y.map(t=>e.jsx(ee,{session:t,isSelected:r.has(t.id),selectionMode:N,onClick:()=>{N?c(s=>{const i=new Set(s);return i.has(t.id)?i.delete(t.id):i.add(t.id),i}):l(`/project/${t.id}`)},onSelect:s=>_(t.id,s),onDelete:s=>T(s,t)},t.id))}),(d||m)&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:e.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full mx-4 p-6",children:[e.jsxs("h2",{className:"text-base font-semibold text-[#36342E] mb-2",children:["Delete ",p>1?`${p} projects`:q,"?"]}),e.jsx("p",{className:"text-sm text-[#6B6960] mb-6",children:"This will remove all files, dependencies, and state. This cannot be undone."}),e.jsxs("div",{className:"flex items-center justify-end gap-3",children:[e.jsx("button",{onClick:()=>{f(null),g(!1)},disabled:j,className:"px-4 py-2 text-sm font-medium text-[#6B6960] hover:text-[#36342E] rounded-[5px] hover:bg-[#F8F4F0] transition-colors disabled:opacity-50",children:"Cancel"}),e.jsx("button",{onClick:L,disabled:j,className:"px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-[5px] transition-colors disabled:opacity-50",children:j?"Deleting...":`Delete${p>1?` (${p})`:""}`})]})]})}),C&&e.jsxs("div",{className:"fixed bottom-6 right-6 z-50 px-4 py-3 bg-[#36342E] text-white text-sm rounded-[5px] shadow-lg flex items-center gap-2",children:[C,e.jsx("button",{onClick:()=>x(null),className:"text-white/60 hover:text-white",children:e.jsx(X,{size:14})})]})]})}function ee({session:l,isSelected:n,selectionMode:k,onClick:o,onSelect:h,onDelete:r}){const c=new Date(l.date).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"});return e.jsxs(M,{hover:!0,onClick:o,className:`group relative ${n?"ring-2 ring-red-400 bg-red-50/30":""}`,children:[e.jsxs("div",{className:"absolute top-2 right-2 flex items-center gap-1 z-10",children:[e.jsx("button",{onClick:h,"aria-label":n?"Deselect project":"Select project",className:`p-1 rounded-[3px] transition-colors ${n?"text-red-600 bg-red-50":"text-[#B8B5AD] hover:text-[#36342E] hover:bg-[#F8F4F0]"}`,children:n?e.jsx(O,{size:15}):e.jsx(I,{size:15})}),e.jsx("button",{onClick:r,"aria-label":"Delete project",className:"p-1 rounded-[3px] text-[#B8B5AD] hover:text-red-600 hover:bg-red-50 transition-colors",children:e.jsx(z,{size:15})})]}),e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-[#6B6960]",children:c}),e.jsx(H,{status:Q(l.status),children:W[l.status]||l.status})]}),e.jsx("h3",{className:"text-sm font-medium text-[#36342E] line-clamp-2 mb-2",children:l.prd_snippet||"Untitled project"}),e.jsx("p",{className:"text-xs text-[#6B6960] truncate",children:l.path})]})}export{ae as default};
@@ -1 +1 @@
1
- import{r as t,a,j as e}from"./index-iESYbzQ8.js";import{C as l}from"./Card-Ciw4QWLx.js";import{E as c}from"./external-link-BBVnfWUJ.js";const h=[{id:"claude",name:"Claude",description:"Anthropic Claude Code -- full features"},{id:"codex",name:"Codex",description:"OpenAI Codex CLI -- degraded mode"},{id:"gemini",name:"Gemini",description:"Google Gemini CLI -- degraded mode"}];function p(){const[i,n]=t.useState("claude"),[o,r]=t.useState(!1),[d,x]=t.useState("");t.useEffect(()=>{a.getCurrentProvider().then(s=>n(s.provider)).catch(()=>{}),a.getStatus().then(s=>x(s.version||"")).catch(()=>{})},[]);const m=async s=>{n(s),r(!0);try{await a.setProvider(s)}catch{}finally{r(!1)}};return e.jsxs("div",{className:"max-w-[800px] mx-auto px-6 py-8",children:[e.jsx("h1",{className:"font-heading text-h1 text-[#36342E] mb-8",children:"Settings"}),e.jsxs("section",{className:"mb-10",children:[e.jsx("h2",{className:"text-sm font-semibold text-[#36342E] uppercase tracking-wide mb-4",children:"Provider"}),e.jsx("div",{className:"flex flex-col gap-3",children:h.map(s=>e.jsx(l,{hover:!0,onClick:()=>m(s.id),className:i===s.id?"ring-2 ring-[#553DE9] border-[#553DE9]":"",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-4 h-4 rounded-full border-2 flex items-center justify-center flex-shrink-0 ${i===s.id?"border-[#553DE9]":"border-[#ECEAE3]"}`,children:i===s.id&&e.jsx("div",{className:"w-2 h-2 rounded-full bg-[#553DE9]"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-[#36342E]",children:s.name}),e.jsx("p",{className:"text-xs text-[#6B6960]",children:s.description})]})]})},s.id))}),o&&e.jsx("p",{className:"text-xs text-[#6B6960] mt-2",children:"Saving..."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-sm font-semibold text-[#36342E] uppercase tracking-wide mb-4",children:"About"}),e.jsx(l,{children:e.jsxs("div",{className:"flex flex-col gap-3",children:[d&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-[#6B6960]",children:"Version"}),e.jsxs("span",{className:"text-sm font-medium text-[#36342E]",children:["v",d]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-[#6B6960]",children:"Documentation"}),e.jsxs("a",{href:"https://www.autonomi.dev/docs",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-[#553DE9] hover:underline",children:["autonomi.dev/docs ",e.jsx(c,{size:12})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-[#6B6960]",children:"GitHub"}),e.jsxs("a",{href:"https://github.com/asklokesh/loki-mode",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-[#553DE9] hover:underline",children:["asklokesh/loki-mode ",e.jsx(c,{size:12})]})]})]})})]})]})}export{p as default};
1
+ import{r as t,a,j as e}from"./index-B5T4poQo.js";import{C as l}from"./Card-Brk8VylH.js";import{E as c}from"./external-link-DhyFyJxS.js";const h=[{id:"claude",name:"Claude",description:"Anthropic Claude Code -- full features"},{id:"codex",name:"Codex",description:"OpenAI Codex CLI -- degraded mode"},{id:"gemini",name:"Gemini",description:"Google Gemini CLI -- degraded mode"}];function p(){const[i,n]=t.useState("claude"),[o,r]=t.useState(!1),[d,x]=t.useState("");t.useEffect(()=>{a.getCurrentProvider().then(s=>n(s.provider)).catch(()=>{}),a.getStatus().then(s=>x(s.version||"")).catch(()=>{})},[]);const m=async s=>{n(s),r(!0);try{await a.setProvider(s)}catch{}finally{r(!1)}};return e.jsxs("div",{className:"max-w-[800px] mx-auto px-6 py-8",children:[e.jsx("h1",{className:"font-heading text-h1 text-[#36342E] mb-8",children:"Settings"}),e.jsxs("section",{className:"mb-10",children:[e.jsx("h2",{className:"text-sm font-semibold text-[#36342E] uppercase tracking-wide mb-4",children:"Provider"}),e.jsx("div",{className:"flex flex-col gap-3",children:h.map(s=>e.jsx(l,{hover:!0,onClick:()=>m(s.id),className:i===s.id?"ring-2 ring-[#553DE9] border-[#553DE9]":"",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-4 h-4 rounded-full border-2 flex items-center justify-center flex-shrink-0 ${i===s.id?"border-[#553DE9]":"border-[#ECEAE3]"}`,children:i===s.id&&e.jsx("div",{className:"w-2 h-2 rounded-full bg-[#553DE9]"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-[#36342E]",children:s.name}),e.jsx("p",{className:"text-xs text-[#6B6960]",children:s.description})]})]})},s.id))}),o&&e.jsx("p",{className:"text-xs text-[#6B6960] mt-2",children:"Saving..."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-sm font-semibold text-[#36342E] uppercase tracking-wide mb-4",children:"About"}),e.jsx(l,{children:e.jsxs("div",{className:"flex flex-col gap-3",children:[d&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-[#6B6960]",children:"Version"}),e.jsxs("span",{className:"text-sm font-medium text-[#36342E]",children:["v",d]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-[#6B6960]",children:"Documentation"}),e.jsxs("a",{href:"https://www.autonomi.dev/docs",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-[#553DE9] hover:underline",children:["autonomi.dev/docs ",e.jsx(c,{size:12})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-[#6B6960]",children:"GitHub"}),e.jsxs("a",{href:"https://github.com/asklokesh/loki-mode",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-[#553DE9] hover:underline",children:["asklokesh/loki-mode ",e.jsx(c,{size:12})]})]})]})})]})]})}export{p as default};
@@ -1 +1 @@
1
- import{u as c,r,a as x,j as t}from"./index-iESYbzQ8.js";import{C as p}from"./Card-Ciw4QWLx.js";import{u as d,B as h}from"./Badge-B67j7joS.js";import"./clock-arMDDQOh.js";const g=[{key:"all",label:"All"},{key:"website",label:"Website"},{key:"api",label:"API"},{key:"cli",label:"CLI"},{key:"bot",label:"Bot"},{key:"data",label:"Data"},{key:"other",label:"Other"}];function u(l){return l.replace(/\.md$/i,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase())}function k(){const l=c(),[a,o]=r.useState("all"),n=r.useCallback(()=>x.getTemplates(),[]),{data:s}=d(n,6e4,!0),i=r.useMemo(()=>s?a==="all"?s:s.filter(e=>(e.category||"other")===a):[],[s,a]),m=e=>{sessionStorage.setItem("pl_template",e),l("/")};return t.jsxs("div",{className:"max-w-[1400px] mx-auto px-6 py-8",children:[t.jsx("h1",{className:"font-heading text-h1 text-[#36342E] mb-6",children:"Templates"}),t.jsx("div",{className:"flex items-center gap-1 mb-6",role:"tablist",children:g.map(e=>t.jsx("button",{role:"tab","aria-selected":a===e.key,onClick:()=>o(e.key),className:`px-3 py-1.5 text-xs font-semibold rounded-[3px] transition-colors ${a===e.key?"bg-[#553DE9] text-white":"text-[#6B6960] hover:text-[#36342E] hover:bg-[#F8F4F0]"}`,children:e.label},e.key))}),s?i.length===0?t.jsx("p",{className:"text-sm text-[#6B6960] py-12 text-center",children:"No templates in this category."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:i.map(e=>t.jsxs(p,{hover:!0,onClick:()=>m(e.filename),children:[t.jsx("div",{className:"mb-2",children:t.jsx(h,{status:"version",children:e.category||"other"})}),t.jsx("h3",{className:"text-sm font-medium text-[#36342E] mb-1",children:u(e.name)}),t.jsx("p",{className:"text-xs text-[#6B6960]",children:e.filename})]},e.filename))}):t.jsx("p",{className:"text-sm text-[#6B6960]",children:"Loading templates..."})]})}export{k as default};
1
+ import{u as c,r,a as x,j as t}from"./index-B5T4poQo.js";import{C as p}from"./Card-Brk8VylH.js";import{u as d,B as h}from"./Badge-DEuIXRiU.js";import"./clock-DJzo3OVn.js";const g=[{key:"all",label:"All"},{key:"website",label:"Website"},{key:"api",label:"API"},{key:"cli",label:"CLI"},{key:"bot",label:"Bot"},{key:"data",label:"Data"},{key:"other",label:"Other"}];function u(l){return l.replace(/\.md$/i,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase())}function k(){const l=c(),[a,o]=r.useState("all"),n=r.useCallback(()=>x.getTemplates(),[]),{data:s}=d(n,6e4,!0),i=r.useMemo(()=>s?a==="all"?s:s.filter(e=>(e.category||"other")===a):[],[s,a]),m=e=>{sessionStorage.setItem("pl_template",e),l("/")};return t.jsxs("div",{className:"max-w-[1400px] mx-auto px-6 py-8",children:[t.jsx("h1",{className:"font-heading text-h1 text-[#36342E] mb-6",children:"Templates"}),t.jsx("div",{className:"flex items-center gap-1 mb-6",role:"tablist",children:g.map(e=>t.jsx("button",{role:"tab","aria-selected":a===e.key,onClick:()=>o(e.key),className:`px-3 py-1.5 text-xs font-semibold rounded-[3px] transition-colors ${a===e.key?"bg-[#553DE9] text-white":"text-[#6B6960] hover:text-[#36342E] hover:bg-[#F8F4F0]"}`,children:e.label},e.key))}),s?i.length===0?t.jsx("p",{className:"text-sm text-[#6B6960] py-12 text-center",children:"No templates in this category."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:i.map(e=>t.jsxs(p,{hover:!0,onClick:()=>m(e.filename),children:[t.jsx("div",{className:"mb-2",children:t.jsx(h,{status:"version",children:e.category||"other"})}),t.jsx("h3",{className:"text-sm font-medium text-[#36342E] mb-1",children:u(e.name)}),t.jsx("p",{className:"text-xs text-[#6B6960]",children:e.filename})]},e.filename))}):t.jsx("p",{className:"text-sm text-[#6B6960]",children:"Loading templates..."})]})}export{k as default};
@@ -1,51 +1,46 @@
1
- import{c as o,r as m,j as e}from"./index-iESYbzQ8.js";/**
1
+ import{c as i,r as m,j as e}from"./index-B5T4poQo.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const j=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],v=o("arrow-down",j);/**
6
+ */const j=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],v=i("arrow-down",j);/**
7
7
  * @license lucide-react v0.577.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const b=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],N=o("chevron-down",b);/**
11
+ */const b=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],N=i("chevron-down",b);/**
12
12
  * @license lucide-react v0.577.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const S=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],_=o("chevron-right",S);/**
16
+ */const S=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],_=i("chevron-right",S);/**
17
17
  * @license lucide-react v0.577.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const E=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],L=o("lock",E);/**
21
+ */const E=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],L=i("lock",E);/**
22
22
  * @license lucide-react v0.577.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */const C=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],V=o("pause",C);/**
26
+ */const C=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],P=i("pause",C);/**
27
27
  * @license lucide-react v0.577.0 - ISC
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const $=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],F=o("play",$);/**
31
+ */const M=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],V=i("play",M);/**
32
32
  * @license lucide-react v0.577.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const q=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],M=o("radio",q);/**
36
+ */const T=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],$=i("radio",T);/**
37
37
  * @license lucide-react v0.577.0 - ISC
38
38
  *
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
- */const T=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],z=o("rotate-cw",T);/**
41
+ */const q=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],z=i("rotate-cw",q);/**
42
42
  * @license lucide-react v0.577.0 - ISC
43
43
  *
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
- */const R=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],I=o("square",R);/**
47
- * @license lucide-react v0.577.0 - ISC
48
- *
49
- * This source code is licensed under the ISC license.
50
- * See the LICENSE file in the root directory of this source tree.
51
- */const A=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],D=o("triangle-alert",A);function H({error:s}){const[r,d]=m.useState(!1);return s?e.jsxs("div",{className:"mt-3 text-left w-full max-w-sm mx-auto",children:[e.jsxs("button",{onClick:()=>d(!r),className:"flex items-center gap-1 text-xs text-muted hover:text-ink transition-colors",children:[r?e.jsx(N,{size:12}):e.jsx(_,{size:12}),"Show Details"]}),r&&e.jsx("pre",{className:"mt-2 p-3 text-[11px] font-mono text-danger/80 bg-danger/5 border border-danger/10 rounded-btn overflow-x-auto max-h-40 overflow-y-auto whitespace-pre-wrap",children:s.stack||s.message})]}):null}class J extends m.Component{constructor(r){super(r),this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,d){console.error(`[${this.props.name||"Component"}] render error:`,r,d)}render(){var r;return this.state.hasError?this.props.fallback?this.props.fallback:e.jsxs("div",{className:"flex flex-col items-center justify-center p-6 h-full min-h-[120px]",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-danger/10 flex items-center justify-center mb-3",children:e.jsx(D,{size:20,className:"text-danger"})}),e.jsx("p",{className:"text-sm font-medium text-ink",children:"Something went wrong"}),e.jsx("p",{className:"text-xs text-muted mt-1 max-w-xs text-center",children:((r=this.state.error)==null?void 0:r.message)||"An unexpected error occurred in this section."}),e.jsxs("button",{onClick:()=>this.setState({hasError:!1,error:null}),className:"mt-3 inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-btn border border-primary/20 text-primary hover:bg-primary/5 transition-colors",children:[e.jsx(z,{size:12}),"Try Again"]}),e.jsx(H,{error:this.state.error})]}):this.props.children}}const B={info:"text-info",error:"text-danger",warning:"text-warning",debug:"text-muted",critical:"text-danger font-bold"};function O(s){if(!s)return"";if(s.includes("T")||s.includes("-"))try{return new Date(s).toLocaleTimeString("en-US",{hour12:!1})}catch{return s}return s}function U({logs:s,loading:r,subscribe:d}){const c=m.useRef(null),[l,f]=m.useState(!1),[g,k]=m.useState([]);m.useEffect(()=>d?d("log",a=>{const i=a;i!=null&&i.line&&k(h=>{const n=[...h,{message:i.line,timestamp:i.timestamp||""}];return n.length>500?n.slice(-500):n})}):void 0,[d]);const x=(()=>{const t=g.map(n=>{let u="info";const p=n.message.toLowerCase();return p.includes("error")||p.includes("fail")?u="error":p.includes("warn")?u="warning":p.includes("debug")&&(u="debug"),{timestamp:n.timestamp,level:u,message:n.message,source:"ws"}}),a=s||[];if(t.length===0)return a;if(a.length===0)return t;const i=new Set(t.map(n=>n.message));return[...a.filter(n=>!i.has(n.message)),...t]})();m.useEffect(()=>{!l&&c.current&&(c.current.scrollTop=c.current.scrollHeight)},[x,l]);const y=()=>{if(!c.current)return;const{scrollTop:t,scrollHeight:a,clientHeight:i}=c.current,h=a-t-i<50;f(!h)},w=()=>{var t;f(!1),(t=c.current)==null||t.scrollTo({top:c.current.scrollHeight,behavior:"smooth"})};return e.jsxs("div",{className:"card p-0 overflow-hidden flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border flex-shrink-0",children:[e.jsx("h3",{className:"text-sm font-semibold text-ink uppercase tracking-wider",children:"Terminal"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"font-mono text-xs text-muted",children:[x.length," lines"]}),e.jsxs("button",{onClick:l?w:()=>f(!0),className:`flex items-center gap-1.5 text-xs font-medium px-3 py-1.5 rounded-lg border transition-colors ${l?"border-warning/40 text-warning bg-warning/5 hover:bg-warning/10":"border-primary/20 text-primary hover:bg-primary/5"}`,title:l?"Scroll locked -- click to resume auto-scroll":"Auto-scrolling -- click to lock",children:[l?e.jsx(L,{size:14}):e.jsx(M,{size:14}),l?"Locked":"Live"]}),l&&e.jsxs("button",{onClick:w,className:"flex items-center gap-1.5 text-xs text-primary hover:text-primary transition-colors font-medium",children:[e.jsx(v,{size:14}),"Jump to bottom"]})]})]}),e.jsxs("div",{ref:c,onScroll:y,className:"flex-1 overflow-y-auto terminal-scroll bg-ink/[0.03] p-4 font-mono text-xs leading-relaxed",children:[r&&!s&&g.length===0&&e.jsx("div",{className:"text-muted animate-pulse",children:"Connecting to log stream..."}),x.length===0&&!r&&e.jsxs("div",{className:"text-muted/60",children:[e.jsx("p",{children:"No log output yet."}),e.jsx("p",{className:"mt-1",children:"Start a build to see terminal output here."})]}),x.map((t,a)=>e.jsxs("div",{className:"flex gap-2 hover:bg-hover rounded px-1 -mx-1",children:[e.jsx("span",{className:"text-muted flex-shrink-0 select-none w-16 text-right",children:O(t.timestamp)}),e.jsx("span",{className:`flex-shrink-0 w-12 text-right uppercase text-xs font-semibold ${B[t.level]||"text-muted"}`,children:t.level}),e.jsx("span",{className:`flex-1 break-all ${t.level==="error"||t.level==="critical"?"text-danger":"text-ink"}`,children:t.message})]},a)),x.length>0&&e.jsx("div",{className:"terminal-cursor mt-1"})]})]})}export{N as C,J as E,F as P,z as R,I as S,U as T,V as a,_ as b,D as c};
46
+ */const R=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],A=i("triangle-alert",R);function D({error:s}){const[r,d]=m.useState(!1);return s?e.jsxs("div",{className:"mt-3 text-left w-full max-w-sm mx-auto",children:[e.jsxs("button",{onClick:()=>d(!r),className:"flex items-center gap-1 text-xs text-muted hover:text-ink transition-colors",children:[r?e.jsx(N,{size:12}):e.jsx(_,{size:12}),"Show Details"]}),r&&e.jsx("pre",{className:"mt-2 p-3 text-[11px] font-mono text-danger/80 bg-danger/5 border border-danger/10 rounded-btn overflow-x-auto max-h-40 overflow-y-auto whitespace-pre-wrap",children:s.stack||s.message})]}):null}class F extends m.Component{constructor(r){super(r),this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,d){console.error(`[${this.props.name||"Component"}] render error:`,r,d)}render(){var r;return this.state.hasError?this.props.fallback?this.props.fallback:e.jsxs("div",{className:"flex flex-col items-center justify-center p-6 h-full min-h-[120px]",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-danger/10 flex items-center justify-center mb-3",children:e.jsx(A,{size:20,className:"text-danger"})}),e.jsx("p",{className:"text-sm font-medium text-ink",children:"Something went wrong"}),e.jsx("p",{className:"text-xs text-muted mt-1 max-w-xs text-center",children:((r=this.state.error)==null?void 0:r.message)||"An unexpected error occurred in this section."}),e.jsxs("button",{onClick:()=>this.setState({hasError:!1,error:null}),className:"mt-3 inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-btn border border-primary/20 text-primary hover:bg-primary/5 transition-colors",children:[e.jsx(z,{size:12}),"Try Again"]}),e.jsx(D,{error:this.state.error})]}):this.props.children}}const H={info:"text-info",error:"text-danger",warning:"text-warning",debug:"text-muted",critical:"text-danger font-bold"};function B(s){if(!s)return"";if(s.includes("T")||s.includes("-"))try{return new Date(s).toLocaleTimeString("en-US",{hour12:!1})}catch{return s}return s}function I({logs:s,loading:r,subscribe:d}){const l=m.useRef(null),[c,f]=m.useState(!1),[g,k]=m.useState([]);m.useEffect(()=>d?d("log",o=>{const a=o;a!=null&&a.line&&k(h=>{const n=[...h,{message:a.line,timestamp:a.timestamp||""}];return n.length>500?n.slice(-500):n})}):void 0,[d]);const x=(()=>{const t=g.map(n=>{let u="info";const p=n.message.toLowerCase();return p.includes("error")||p.includes("fail")?u="error":p.includes("warn")?u="warning":p.includes("debug")&&(u="debug"),{timestamp:n.timestamp,level:u,message:n.message,source:"ws"}}),o=s||[];if(t.length===0)return o;if(o.length===0)return t;const a=new Set(t.map(n=>n.message));return[...o.filter(n=>!a.has(n.message)),...t]})();m.useEffect(()=>{!c&&l.current&&(l.current.scrollTop=l.current.scrollHeight)},[x,c]);const y=()=>{if(!l.current)return;const{scrollTop:t,scrollHeight:o,clientHeight:a}=l.current,h=o-t-a<50;f(!h)},w=()=>{var t;f(!1),(t=l.current)==null||t.scrollTo({top:l.current.scrollHeight,behavior:"smooth"})};return e.jsxs("div",{className:"card p-0 overflow-hidden flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border flex-shrink-0",children:[e.jsx("h3",{className:"text-sm font-semibold text-ink uppercase tracking-wider",children:"Terminal"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"font-mono text-xs text-muted",children:[x.length," lines"]}),e.jsxs("button",{onClick:c?w:()=>f(!0),className:`flex items-center gap-1.5 text-xs font-medium px-3 py-1.5 rounded-lg border transition-colors ${c?"border-warning/40 text-warning bg-warning/5 hover:bg-warning/10":"border-primary/20 text-primary hover:bg-primary/5"}`,title:c?"Scroll locked -- click to resume auto-scroll":"Auto-scrolling -- click to lock",children:[c?e.jsx(L,{size:14}):e.jsx($,{size:14}),c?"Locked":"Live"]}),c&&e.jsxs("button",{onClick:w,className:"flex items-center gap-1.5 text-xs text-primary hover:text-primary transition-colors font-medium",children:[e.jsx(v,{size:14}),"Jump to bottom"]})]})]}),e.jsxs("div",{ref:l,onScroll:y,className:"flex-1 overflow-y-auto terminal-scroll bg-ink/[0.03] p-4 font-mono text-xs leading-relaxed",children:[r&&!s&&g.length===0&&e.jsx("div",{className:"text-muted animate-pulse",children:"Connecting to log stream..."}),x.length===0&&!r&&e.jsxs("div",{className:"text-muted/60",children:[e.jsx("p",{children:"No log output yet."}),e.jsx("p",{className:"mt-1",children:"Start a build to see terminal output here."})]}),x.map((t,o)=>e.jsxs("div",{className:"flex gap-2 hover:bg-hover rounded px-1 -mx-1",children:[e.jsx("span",{className:"text-muted flex-shrink-0 select-none w-16 text-right",children:B(t.timestamp)}),e.jsx("span",{className:`flex-shrink-0 w-12 text-right uppercase text-xs font-semibold ${H[t.level]||"text-muted"}`,children:t.level}),e.jsx("span",{className:`flex-1 break-all ${t.level==="error"||t.level==="critical"?"text-danger":"text-ink"}`,children:t.message})]},o)),x.length>0&&e.jsx("div",{className:"terminal-cursor mt-1"})]})]})}export{N as C,F as E,V as P,z as R,I as T,P as a,_ as b,A as c};
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-iESYbzQ8.js";/**
1
+ import{c as o}from"./index-B5T4poQo.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-iESYbzQ8.js";/**
1
+ import{c}from"./index-B5T4poQo.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-iESYbzQ8.js";/**
1
+ import{c as a}from"./index-B5T4poQo.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.