clankie 0.2.10 → 0.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{c as b,S as T,m as u,q,A as z,r as x,p as L,j as e,H as E,L as B,B as p,C as j,s as g,t as f,P as R,v as N,w as v,F as d,I as H}from"./main-DUT2mAkp.js";import{F as V,a as $,C as G}from"./field-DndVA7U4.js";import{L as J}from"./loader-circle-CO83p2nq.js";const K=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],y=b("circle-alert",K);const O=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],F=b("package",O);const Q=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],U=b("sparkles",Q),W={extensions:[],extensionErrors:[],skills:[],skillDiagnostics:[],isLoading:!1,installStatus:{isInstalling:!1,output:"",exitCode:null}},r=new T(W);function P(i){r.setState(t=>({...t,isLoading:i}))}function X(i,t){r.setState(c=>({...c,extensions:i,extensionErrors:t,isLoading:!1}))}function Y(i,t){r.setState(c=>({...c,skills:i,skillDiagnostics:t,isLoading:!1}))}function k(i){r.setState(t=>({...t,installStatus:{...t.installStatus,...i}}))}function Z(){r.setState(i=>({...i,installStatus:{isInstalling:!1,output:"",exitCode:null,error:void 0}}))}function te(){const{status:i}=u(q,s=>({status:s.status})),{activeSessionId:t}=u(z,s=>({activeSessionId:s.activeSessionId})),{extensions:c,extensionErrors:w,skills:S,skillDiagnostics:C,isLoading:A,installStatus:n}=u(r,s=>s),[o,M]=x.useState(""),[I,_]=x.useState(!1),m=i==="connected",h=x.useCallback(async()=>{const s=L.getClient();if(!(!s||!t)){P(!0);try{await s.reload(t);const[a,l]=await Promise.all([s.getExtensions(t),s.getSkills(t)]);X(a.extensions,a.errors),Y(l.skills,l.diagnostics)}catch(a){console.error("Failed to load extensions and skills:",a),P(!1)}}},[t]);x.useEffect(()=>{m&&t&&h()},[m,t,h]);const D=async()=>{const s=L.getClient();if(!(!s||!t||!o.trim())){k({isInstalling:!0,output:"",exitCode:null,error:void 0});try{const a=await s.installPackage(t,o.trim(),I);k({isInstalling:!1,output:a.output,exitCode:a.exitCode}),a.exitCode===0&&await h()}catch(a){k({isInstalling:!1,error:a instanceof Error?a.message:String(a)})}}};return m?A?e.jsx("div",{className:"flex h-full items-center justify-center chat-background",children:e.jsxs("div",{className:"text-center space-y-3",children:[e.jsxs("div",{className:"inline-flex gap-1 mb-2",children:[e.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"}),e.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"}),e.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading extensions and skills..."})]})}):e.jsx("div",{className:"h-full overflow-y-auto chat-background",children:e.jsxs("div",{className:"container max-w-4xl py-8 px-4 space-y-6",children:[e.jsxs(j,{className:"card-depth",children:[e.jsxs(g,{children:[e.jsxs(f,{className:"flex items-center gap-2",children:[e.jsx(R,{className:"h-5 w-5"}),"Extensions"]}),e.jsx(N,{children:"Loaded extensions with their registered tools and commands"})]}),e.jsxs(v,{children:[w.length>0&&e.jsx("div",{className:"mb-4 rounded-md border border-destructive/50 bg-destructive/10 p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(y,{className:"h-4 w-4 text-destructive mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-destructive",children:"Extension Load Errors"}),e.jsx("div",{className:"mt-2 space-y-2",children:w.map((s,a)=>e.jsxs("div",{className:"text-xs",children:[e.jsx("p",{className:"font-mono text-muted-foreground",children:s.path}),e.jsx("p",{className:"text-destructive",children:s.error})]},a))})]})]})}),c.length===0?e.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No extensions loaded."}):e.jsx("div",{className:"space-y-3",children:c.map((s,a)=>e.jsx("div",{className:"rounded-lg border p-3",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium font-mono break-all",children:s.path}),s.resolvedPath!==s.path&&e.jsxs("p",{className:"text-xs text-muted-foreground font-mono mt-1 break-all",children:["→ ",s.resolvedPath]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.tools.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Tools:"}),s.tools.map(l=>e.jsx(d,{variant:"secondary",className:"text-xs",children:l},l))]}),s.commands.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Commands:"}),s.commands.map(l=>e.jsxs(d,{variant:"default",className:"text-xs",children:["/",l]},l))]}),s.flags.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Flags:"}),s.flags.map(l=>e.jsxs(d,{variant:"outline",className:"text-xs",children:["--",l]},l))]}),s.shortcuts.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Shortcuts:"}),s.shortcuts.map(l=>e.jsx(d,{variant:"outline",className:"text-xs font-mono",children:l},l))]})]})]})},a))})]})]}),e.jsxs(j,{className:"card-depth",children:[e.jsxs(g,{children:[e.jsxs(f,{className:"flex items-center gap-2",children:[e.jsx(U,{className:"h-5 w-5"}),"Skills"]}),e.jsx(N,{children:"Available skills for the agent"})]}),e.jsxs(v,{children:[C.length>0&&e.jsx("div",{className:"mb-4 rounded-md border border-yellow-500/50 bg-yellow-500/10 p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(y,{className:"h-4 w-4 text-yellow-600 mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-yellow-600",children:"Skill Diagnostics"}),e.jsx("div",{className:"mt-2 space-y-1",children:C.map((s,a)=>e.jsxs("p",{className:"text-xs text-yellow-700",children:[s.path&&e.jsxs("span",{className:"font-mono",children:[s.path,": "]}),s.message]},a))})]})]})}),S.length===0?e.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No skills loaded."}):e.jsx("div",{className:"space-y-3",children:S.map((s,a)=>e.jsx("div",{className:"rounded-lg border p-3",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-start justify-between gap-2",children:e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-sm font-medium",children:s.name}),s.disableModelInvocation&&e.jsx(d,{variant:"outline",className:"text-xs",children:"Manual only"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s.description})]})}),e.jsxs("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:[e.jsxs("span",{children:[e.jsx("span",{className:"font-medium",children:"Source:"})," ",s.source]}),e.jsx("span",{children:"•"}),e.jsx("span",{className:"font-mono break-all",children:s.filePath})]})]})},a))})]})]}),e.jsxs(j,{className:"card-depth",children:[e.jsxs(g,{children:[e.jsxs(f,{className:"flex items-center gap-2",children:[e.jsx(F,{className:"h-5 w-5"}),"Install Package"]}),e.jsx(N,{children:"Install a Pi package from npm, git, or a local path"})]}),e.jsxs(v,{className:"space-y-4",children:[e.jsxs(V,{children:[e.jsx($,{htmlFor:"package-source",children:"Package Source"}),e.jsx(H,{id:"package-source",type:"text",placeholder:"npm:@foo/bar@1.0.0, git:github.com/user/repo, or /path/to/package",value:o,onChange:s=>M(s.target.value),disabled:n.isInstalling}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Examples: ",e.jsx("code",{className:"text-xs",children:"npm:package-name"}),","," ",e.jsx("code",{className:"text-xs",children:"git:github.com/user/repo"}),","," ",e.jsx("code",{className:"text-xs",children:"/absolute/path"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"install-local",checked:I,onChange:s=>_(s.target.checked),disabled:n.isInstalling,className:"h-4 w-4"}),e.jsx("label",{htmlFor:"install-local",className:"text-sm cursor-pointer",children:"Install to project settings (.pi/settings.json) instead of global"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(p,{onClick:D,disabled:n.isInstalling||!o.trim(),className:"flex-1",children:n.isInstalling?e.jsxs(e.Fragment,{children:[e.jsx(J,{className:"mr-2 h-4 w-4 animate-spin"}),"Installing..."]}):e.jsxs(e.Fragment,{children:[e.jsx(F,{className:"mr-2 h-4 w-4"}),"Install"]})}),(n.output||n.error)&&e.jsx(p,{variant:"outline",onClick:Z,children:"Clear"})]}),n.error&&e.jsxs("div",{className:"rounded-md border border-destructive/50 bg-destructive/10 p-3 text-sm text-destructive",children:[e.jsx("p",{className:"font-medium",children:"Error"}),e.jsx("p",{className:"text-xs mt-1",children:n.error})]}),n.output&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center gap-2",children:n.exitCode===0?e.jsxs(e.Fragment,{children:[e.jsx(G,{className:"h-4 w-4 text-green-600"}),e.jsx("p",{className:"text-sm font-medium text-green-600",children:"Installation Successful"})]}):e.jsxs(e.Fragment,{children:[e.jsx(y,{className:"h-4 w-4 text-destructive"}),e.jsxs("p",{className:"text-sm font-medium text-destructive",children:["Installation Failed (exit code: ",n.exitCode,")"]})]})}),e.jsx("div",{className:"rounded-md bg-muted p-3 text-xs font-mono whitespace-pre-wrap break-all max-h-60 overflow-y-auto",children:n.output})]})]})]})]})}):e.jsx("div",{className:"flex h-full items-center justify-center chat-background",children:e.jsxs("div",{className:"text-center space-y-4 max-w-md p-8",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-destructive/10 border border-destructive/20 mb-2",children:e.jsx(E,{className:"h-8 w-8 text-destructive"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:"Not Connected"}),e.jsx("p",{className:"text-muted-foreground",children:"Configure your connection to get started"})]}),e.jsx(B,{to:"/settings",children:e.jsxs(p,{className:"transition-transform hover:scale-105 active:scale-95",children:[e.jsx(E,{className:"mr-2 h-4 w-4"}),"Go to Settings"]})})]})})}export{te as component};
1
+ import{c as b,S as T,m as u,q,A as z,r as x,p as L,j as e,H as E,L as B,B as p,C as j,s as g,t as f,P as R,v as N,w as v,F as d,I as H}from"./main-UkFzTTck.js";import{F as V,a as $,C as G}from"./field-omFPry7c.js";import{L as J}from"./loader-circle-DJwIWnWV.js";const K=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],y=b("circle-alert",K);const O=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],F=b("package",O);const Q=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],U=b("sparkles",Q),W={extensions:[],extensionErrors:[],skills:[],skillDiagnostics:[],isLoading:!1,installStatus:{isInstalling:!1,output:"",exitCode:null}},r=new T(W);function P(i){r.setState(t=>({...t,isLoading:i}))}function X(i,t){r.setState(c=>({...c,extensions:i,extensionErrors:t,isLoading:!1}))}function Y(i,t){r.setState(c=>({...c,skills:i,skillDiagnostics:t,isLoading:!1}))}function k(i){r.setState(t=>({...t,installStatus:{...t.installStatus,...i}}))}function Z(){r.setState(i=>({...i,installStatus:{isInstalling:!1,output:"",exitCode:null,error:void 0}}))}function te(){const{status:i}=u(q,s=>({status:s.status})),{activeSessionId:t}=u(z,s=>({activeSessionId:s.activeSessionId})),{extensions:c,extensionErrors:w,skills:S,skillDiagnostics:C,isLoading:A,installStatus:n}=u(r,s=>s),[o,M]=x.useState(""),[I,_]=x.useState(!1),m=i==="connected",h=x.useCallback(async()=>{const s=L.getClient();if(!(!s||!t)){P(!0);try{await s.reload(t);const[a,l]=await Promise.all([s.getExtensions(t),s.getSkills(t)]);X(a.extensions,a.errors),Y(l.skills,l.diagnostics)}catch(a){console.error("Failed to load extensions and skills:",a),P(!1)}}},[t]);x.useEffect(()=>{m&&t&&h()},[m,t,h]);const D=async()=>{const s=L.getClient();if(!(!s||!t||!o.trim())){k({isInstalling:!0,output:"",exitCode:null,error:void 0});try{const a=await s.installPackage(t,o.trim(),I);k({isInstalling:!1,output:a.output,exitCode:a.exitCode}),a.exitCode===0&&await h()}catch(a){k({isInstalling:!1,error:a instanceof Error?a.message:String(a)})}}};return m?A?e.jsx("div",{className:"flex h-full items-center justify-center chat-background",children:e.jsxs("div",{className:"text-center space-y-3",children:[e.jsxs("div",{className:"inline-flex gap-1 mb-2",children:[e.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"}),e.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"}),e.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading extensions and skills..."})]})}):e.jsx("div",{className:"h-full overflow-y-auto chat-background",children:e.jsxs("div",{className:"container max-w-4xl py-8 px-4 space-y-6",children:[e.jsxs(j,{className:"card-depth",children:[e.jsxs(g,{children:[e.jsxs(f,{className:"flex items-center gap-2",children:[e.jsx(R,{className:"h-5 w-5"}),"Extensions"]}),e.jsx(N,{children:"Loaded extensions with their registered tools and commands"})]}),e.jsxs(v,{children:[w.length>0&&e.jsx("div",{className:"mb-4 rounded-md border border-destructive/50 bg-destructive/10 p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(y,{className:"h-4 w-4 text-destructive mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-destructive",children:"Extension Load Errors"}),e.jsx("div",{className:"mt-2 space-y-2",children:w.map((s,a)=>e.jsxs("div",{className:"text-xs",children:[e.jsx("p",{className:"font-mono text-muted-foreground",children:s.path}),e.jsx("p",{className:"text-destructive",children:s.error})]},a))})]})]})}),c.length===0?e.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No extensions loaded."}):e.jsx("div",{className:"space-y-3",children:c.map((s,a)=>e.jsx("div",{className:"rounded-lg border p-3",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium font-mono break-all",children:s.path}),s.resolvedPath!==s.path&&e.jsxs("p",{className:"text-xs text-muted-foreground font-mono mt-1 break-all",children:["→ ",s.resolvedPath]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.tools.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Tools:"}),s.tools.map(l=>e.jsx(d,{variant:"secondary",className:"text-xs",children:l},l))]}),s.commands.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Commands:"}),s.commands.map(l=>e.jsxs(d,{variant:"default",className:"text-xs",children:["/",l]},l))]}),s.flags.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Flags:"}),s.flags.map(l=>e.jsxs(d,{variant:"outline",className:"text-xs",children:["--",l]},l))]}),s.shortcuts.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Shortcuts:"}),s.shortcuts.map(l=>e.jsx(d,{variant:"outline",className:"text-xs font-mono",children:l},l))]})]})]})},a))})]})]}),e.jsxs(j,{className:"card-depth",children:[e.jsxs(g,{children:[e.jsxs(f,{className:"flex items-center gap-2",children:[e.jsx(U,{className:"h-5 w-5"}),"Skills"]}),e.jsx(N,{children:"Available skills for the agent"})]}),e.jsxs(v,{children:[C.length>0&&e.jsx("div",{className:"mb-4 rounded-md border border-yellow-500/50 bg-yellow-500/10 p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(y,{className:"h-4 w-4 text-yellow-600 mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-yellow-600",children:"Skill Diagnostics"}),e.jsx("div",{className:"mt-2 space-y-1",children:C.map((s,a)=>e.jsxs("p",{className:"text-xs text-yellow-700",children:[s.path&&e.jsxs("span",{className:"font-mono",children:[s.path,": "]}),s.message]},a))})]})]})}),S.length===0?e.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No skills loaded."}):e.jsx("div",{className:"space-y-3",children:S.map((s,a)=>e.jsx("div",{className:"rounded-lg border p-3",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-start justify-between gap-2",children:e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-sm font-medium",children:s.name}),s.disableModelInvocation&&e.jsx(d,{variant:"outline",className:"text-xs",children:"Manual only"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s.description})]})}),e.jsxs("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:[e.jsxs("span",{children:[e.jsx("span",{className:"font-medium",children:"Source:"})," ",s.source]}),e.jsx("span",{children:"•"}),e.jsx("span",{className:"font-mono break-all",children:s.filePath})]})]})},a))})]})]}),e.jsxs(j,{className:"card-depth",children:[e.jsxs(g,{children:[e.jsxs(f,{className:"flex items-center gap-2",children:[e.jsx(F,{className:"h-5 w-5"}),"Install Package"]}),e.jsx(N,{children:"Install a Pi package from npm, git, or a local path"})]}),e.jsxs(v,{className:"space-y-4",children:[e.jsxs(V,{children:[e.jsx($,{htmlFor:"package-source",children:"Package Source"}),e.jsx(H,{id:"package-source",type:"text",placeholder:"npm:@foo/bar@1.0.0, git:github.com/user/repo, or /path/to/package",value:o,onChange:s=>M(s.target.value),disabled:n.isInstalling}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Examples: ",e.jsx("code",{className:"text-xs",children:"npm:package-name"}),","," ",e.jsx("code",{className:"text-xs",children:"git:github.com/user/repo"}),","," ",e.jsx("code",{className:"text-xs",children:"/absolute/path"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"install-local",checked:I,onChange:s=>_(s.target.checked),disabled:n.isInstalling,className:"h-4 w-4"}),e.jsx("label",{htmlFor:"install-local",className:"text-sm cursor-pointer",children:"Install to project settings (.pi/settings.json) instead of global"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(p,{onClick:D,disabled:n.isInstalling||!o.trim(),className:"flex-1",children:n.isInstalling?e.jsxs(e.Fragment,{children:[e.jsx(J,{className:"mr-2 h-4 w-4 animate-spin"}),"Installing..."]}):e.jsxs(e.Fragment,{children:[e.jsx(F,{className:"mr-2 h-4 w-4"}),"Install"]})}),(n.output||n.error)&&e.jsx(p,{variant:"outline",onClick:Z,children:"Clear"})]}),n.error&&e.jsxs("div",{className:"rounded-md border border-destructive/50 bg-destructive/10 p-3 text-sm text-destructive",children:[e.jsx("p",{className:"font-medium",children:"Error"}),e.jsx("p",{className:"text-xs mt-1",children:n.error})]}),n.output&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center gap-2",children:n.exitCode===0?e.jsxs(e.Fragment,{children:[e.jsx(G,{className:"h-4 w-4 text-green-600"}),e.jsx("p",{className:"text-sm font-medium text-green-600",children:"Installation Successful"})]}):e.jsxs(e.Fragment,{children:[e.jsx(y,{className:"h-4 w-4 text-destructive"}),e.jsxs("p",{className:"text-sm font-medium text-destructive",children:["Installation Failed (exit code: ",n.exitCode,")"]})]})}),e.jsx("div",{className:"rounded-md bg-muted p-3 text-xs font-mono whitespace-pre-wrap break-all max-h-60 overflow-y-auto",children:n.output})]})]})]})]})}):e.jsx("div",{className:"flex h-full items-center justify-center chat-background",children:e.jsxs("div",{className:"text-center space-y-4 max-w-md p-8",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-destructive/10 border border-destructive/20 mb-2",children:e.jsx(E,{className:"h-8 w-8 text-destructive"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:"Not Connected"}),e.jsx("p",{className:"text-muted-foreground",children:"Configure your connection to get started"})]}),e.jsx(B,{to:"/settings",children:e.jsxs(p,{className:"transition-transform hover:scale-105 active:scale-95",children:[e.jsx(E,{className:"mr-2 h-4 w-4"}),"Go to Settings"]})})]})})}export{te as component};
@@ -1 +1 @@
1
- import{c as o,j as t,f as l,J as r}from"./main-DUT2mAkp.js";const i=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],f=o("circle-check-big",i);function s({className:a,...e}){return t.jsx("label",{"data-slot":"label",className:l("gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",a),...e})}const c=r("data-[invalid=true]:text-destructive gap-2 group/field flex w-full",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:*:data-[slot=field-label]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function u({className:a,orientation:e="vertical",...d}){return t.jsx("div",{role:"group","data-slot":"field","data-orientation":e,className:l(c({orientation:e}),a),...d})}function p({className:a,...e}){return t.jsx(s,{"data-slot":"field-label",className:l("has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 group/field-label peer/field-label flex w-fit leading-snug","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",a),...e})}export{f as C,u as F,p as a};
1
+ import{c as o,j as t,f as l,J as r}from"./main-UkFzTTck.js";const i=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],f=o("circle-check-big",i);function s({className:a,...e}){return t.jsx("label",{"data-slot":"label",className:l("gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",a),...e})}const c=r("data-[invalid=true]:text-destructive gap-2 group/field flex w-full",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:*:data-[slot=field-label]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function u({className:a,orientation:e="vertical",...d}){return t.jsx("div",{role:"group","data-slot":"field","data-orientation":e,className:l(c({orientation:e}),a),...d})}function p({className:a,...e}){return t.jsx(s,{"data-slot":"field-label",className:l("has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 group/field-label peer/field-label flex w-fit leading-snug","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",a),...e})}export{f as C,u as F,p as a};
@@ -1 +1 @@
1
- import{K as o,m as a,q as l,A as d,r as m,j as s,H as c,L as x,B as u}from"./main-DUT2mAkp.js";function h(){const i=o(),{status:r}=a(l,n=>({status:n.status})),{activeSessionId:e}=a(d,n=>({activeSessionId:n.activeSessionId})),t=r==="connected";return m.useEffect(()=>{t&&e&&(console.log(`[index] Redirecting to active session: ${e}`),i({to:"/sessions/$sessionId",params:{sessionId:e}}))},[e,t,i]),t?s.jsx("div",{className:"flex h-full items-center justify-center chat-background",children:s.jsxs("div",{className:"text-center space-y-3",children:[s.jsxs("div",{className:"inline-flex gap-1 mb-2",children:[s.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"}),s.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"}),s.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading sessions..."})]})}):s.jsx("div",{className:"flex h-full items-center justify-center chat-background",children:s.jsxs("div",{className:"text-center space-y-4 max-w-md p-8",children:[s.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-destructive/10 border border-destructive/20 mb-2",children:s.jsx(c,{className:"h-8 w-8 text-destructive"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"text-2xl font-semibold",children:"Not Connected"}),s.jsx("p",{className:"text-muted-foreground",children:"Configure your connection to get started"})]}),s.jsx(x,{to:"/settings",children:s.jsxs(u,{className:"transition-transform hover:scale-105 active:scale-95",children:[s.jsx(c,{className:"mr-2 h-4 w-4"}),"Go to Settings"]})})]})})}export{h as component};
1
+ import{K as o,m as a,q as l,A as d,r as m,j as s,H as c,L as x,B as u}from"./main-UkFzTTck.js";function h(){const i=o(),{status:r}=a(l,n=>({status:n.status})),{activeSessionId:e}=a(d,n=>({activeSessionId:n.activeSessionId})),t=r==="connected";return m.useEffect(()=>{t&&e&&(console.log(`[index] Redirecting to active session: ${e}`),i({to:"/sessions/$sessionId",params:{sessionId:e}}))},[e,t,i]),t?s.jsx("div",{className:"flex h-full items-center justify-center chat-background",children:s.jsxs("div",{className:"text-center space-y-3",children:[s.jsxs("div",{className:"inline-flex gap-1 mb-2",children:[s.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"}),s.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"}),s.jsx("span",{className:"typing-dot inline-block h-3 w-3 rounded-full bg-primary"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading sessions..."})]})}):s.jsx("div",{className:"flex h-full items-center justify-center chat-background",children:s.jsxs("div",{className:"text-center space-y-4 max-w-md p-8",children:[s.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-destructive/10 border border-destructive/20 mb-2",children:s.jsx(c,{className:"h-8 w-8 text-destructive"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"text-2xl font-semibold",children:"Not Connected"}),s.jsx("p",{className:"text-muted-foreground",children:"Configure your connection to get started"})]}),s.jsx(x,{to:"/settings",children:s.jsxs(u,{className:"transition-transform hover:scale-105 active:scale-95",children:[s.jsx(c,{className:"mr-2 h-4 w-4"}),"Go to Settings"]})})]})})}export{h as component};
@@ -1 +1 @@
1
- import{c}from"./main-DUT2mAkp.js";const e=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],a=c("loader-circle",e);export{a as L};
1
+ import{c}from"./main-UkFzTTck.js";const e=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],a=c("loader-circle",e);export{a as L};