@alwith/module-chat 0.6.18 → 0.6.20
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-z6e4ydvm.js → chunk-3tvct295.js} +1 -1
- package/dist/{chunk-0rte5dh6.js → chunk-3w6dv0nx.js} +1 -1
- package/dist/{chunk-d2m4xmt4.js → chunk-55ya3102.js} +1 -1
- package/dist/{chunk-p14j9ckg.js → chunk-62wxvxsg.js} +1 -1
- package/dist/{chunk-ehpaw624.js → chunk-bcdw682e.js} +1 -1
- package/dist/{chunk-6w5gfh01.js → chunk-e7me5e6n.js} +1 -1
- package/dist/{chunk-3rmwcar7.js → chunk-fvwrc97h.js} +1 -1
- package/dist/chunk-sjtfxn55.js +2 -0
- package/dist/{chunk-2ee48v0d.js → chunk-t9e1sj53.js} +2 -2
- package/dist/{chunk-f7m5zdkp.js → chunk-v4qzxq4v.js} +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/desktop/desktop-composer.js +1 -1
- package/dist/desktop/desktop.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/plugin-detail-page.js +1 -1
- package/dist/plugins/plugins-page.js +1 -1
- package/dist/plugins/plugins.js +1 -1
- package/dist/plugins/skill-document.js +1 -1
- package/dist/plugins/skills-tab.js +1 -1
- package/dist/plugins/store.d.ts +1 -0
- package/dist/plugins/store.js +1 -1
- package/native/win32-x64/alwith_native_chat.dll +0 -0
- package/native/win32-x64/artifact.json +1 -1
- package/package.json +1 -1
- package/dist/chunk-mg7kraha.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d,i}from"./chunk-
|
|
1
|
+
import{d,i}from"./chunk-3w6dv0nx.js";import{k}from"./chunk-qk1yqepm.js";import{B}from"./chunk-nrzkzvr0.js";import{ke}from"./chunk-55ya3102.js";import{Q,Pe,Ie}from"./chunk-e04g26qm.js";import{ExternalLinkIcon as M,PlusIcon as W}from"lucide-react";import{useEffect as _,useState as y}from"react";import{Badge as L}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as q,DialogContent as F,DialogDescription as G,DialogHeader as J,DialogTitle as K}from"@nyssance/shadcn/vega/components/ui/dialog";import{Spinner as S}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as X}from"@nyssance/shadcn/vega/components/ui/switch";import{jsx as e,jsxs as s,Fragment as O}from"react/jsx-runtime";function Qt({entry:o,onBack:p}){let u=d(),{t:l}=u,P=i((a)=>a.readPlugin),C=i((a)=>a.installed.find(({plugin:g})=>g.id===o.plugin.id)),v=i((a)=>a.busyIds[o.plugin.id]),T=i((a)=>a.install),H=i((a)=>a.uninstall),V=i((a)=>a.setPluginEnabled),[n,U]=y(null),[D,I]=y(null),[j,R]=y(0),[r,z]=y(null);_(()=>{let a=!0;return I(null),U(null),P(o).then((g)=>{if(a)U(g)},(g)=>{if(a)I(g instanceof Error?g.message:String(g))}),()=>{a=!1}},[o,P,j]);let m=n?.summary??o.plugin,c=C?.plugin??m,t=m.interface,h=t?.displayName??m.name,b=c.availability!=="AVAILABLE"||c.installPolicy==="NOT_AVAILABLE",E=t?.longDescription??n?.description??t?.shortDescription,A=[...u.assetUrl?t?.screenshots.map((a)=>u.assetUrl(a))??[]:[],...t?.screenshotUrls??[]];return s("div",{className:"toolbox-surface flex min-h-0 flex-1 flex-col overflow-hidden",children:[e(Ie,{children:s("header",{className:"flex min-w-0 flex-col gap-4",children:[s("nav",{"aria-label":l("plugins.detail.root"),className:"flex min-w-0 items-center gap-2 text-[13px]",children:[e(f,{variant:"link",size:"sm",className:"text-muted-foreground hover:text-foreground px-2 hover:no-underline",onClick:p,children:l("plugins.detail.root")}),e("span",{"aria-hidden":"true",className:"text-muted-foreground/50 text-sm",children:"/"}),e("span",{"aria-current":"page",className:"truncate",children:h})]}),s("div",{className:"flex min-h-9 flex-wrap items-center justify-between gap-4",children:[s("div",{className:"flex min-w-0 items-center gap-3",children:[e(B,{name:m.name,className:"size-9 shrink-0 rounded-lg"}),e("h1",{className:"min-w-0 text-2xl leading-8 font-semibold break-words",children:h})]}),e("div",{className:"flex shrink-0 items-center gap-3",children:C?s(O,{children:[e(X,{checked:c.enabled,disabled:!!v||b,"aria-label":l(c.enabled?"plugins.card.disable":"plugins.card.enable",{pluginName:h}),onCheckedChange:(a)=>void V(c,a)}),e(f,{variant:"outline",size:"sm",disabled:!!v,onClick:()=>void H(c),children:v?e(S,{}):l("plugins.detail.uninstall")})]}):e(f,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0","aria-label":l(b?"plugins.detail.unavailable":"plugins.detail.install"),title:l(b?"plugins.detail.unavailable":"plugins.detail.install"),disabled:!!v||b,onClick:()=>void T({...o,plugin:m}).catch(()=>{}),children:v?e(S,{"aria-hidden":"true"}):e(W,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})})]})]})}),e(k,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${Q} pt-2`,children:[t?.shortDescription&&e("p",{className:"text-muted-foreground text-sm leading-6",children:t.shortDescription}),m.keywords.length>0&&e("div",{className:"mt-3 flex flex-wrap gap-2",children:[...new Set(m.keywords)].map((a)=>e(L,{variant:"secondary",className:"text-xs font-normal",children:a},a))}),s("div",{className:"mt-6 flex items-stretch overflow-x-auto border-y py-4",children:[t?.developerName&&e(x,{label:l("plugins.detail.developer"),children:t.developerName}),t?.category&&e(x,{label:l("plugins.detail.category"),children:t.category}),(c.localVersion??c.version)&&e(x,{label:l("plugins.detail.version"),children:c.localVersion??c.version}),e(x,{label:l("plugins.headings.marketplace"),children:o.marketplace.interface?.displayName??o.marketplace.name}),t?.websiteUrl&&e(x,{label:l("plugins.detail.website"),children:e(w,{url:t.websiteUrl,label:l("plugins.detail.website")})})]}),!n&&!D&&s("div",{role:"status",className:"text-muted-foreground mt-8 flex items-center gap-2 text-sm",children:[e(S,{}),l("plugins.detail.loading")]}),D&&s("div",{role:"alert",className:"mt-8 space-y-2",children:[s("p",{className:"text-destructive text-sm",children:[l("plugins.detail.errorTitle"),": ",D]}),e(f,{variant:"outline",size:"sm",className:"h-9",onClick:()=>R((a)=>a+1),children:l("plugins.loadError.retry")})]}),E&&e("p",{className:"mt-8 text-sm leading-6 whitespace-pre-wrap",children:E}),A.length>0&&e("div",{className:"mt-6 flex gap-3 overflow-x-auto",children:[...new Set(A)].map((a)=>e("img",{src:a,alt:h,loading:"lazy",className:"max-h-72 max-w-full rounded-xl border object-contain"},a))}),t&&t.capabilities.length>0&&e(N,{label:l("plugins.detail.capabilities"),count:t.capabilities.length,children:t.capabilities.map((a)=>e(L,{variant:"secondary",className:"me-2",children:a},a))}),n&&n.mcpServers.length>0&&e(N,{label:l("plugins.detail.mcpServers"),count:n.mcpServers.length,children:n.mcpServers.map((a)=>s("div",{className:"flex items-center gap-3 py-1",children:[e(B,{name:m.name,className:"size-6 rounded-md"}),e("span",{className:"text-sm font-medium",children:a})]},a))}),n&&n.skills.length>0&&e(N,{label:l("plugins.detail.skills"),count:n.skills.length,children:n.skills.map((a)=>s(f,{variant:"ghost",className:"h-auto w-full justify-start gap-3 rounded-xl px-3 py-3 text-start whitespace-normal",onClick:()=>z(a),children:[e(B,{name:a.name,className:"size-8"}),s("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block text-sm font-medium",children:a.interface?.displayName??a.name}),e("span",{className:"text-muted-foreground mt-1 block truncate text-[13px] leading-5 font-normal",children:a.interface?.shortDescription??a.shortDescription??a.description})]})]},a.path??a.name))}),n&&n.apps.length>0&&e(N,{label:l("plugins.detail.apps"),count:n.apps.length,children:n.apps.map((a)=>s("div",{className:"rounded-xl px-3 py-3",children:[e("div",{className:"text-sm font-medium",children:a.name}),a.description&&e("p",{className:"text-muted-foreground mt-1 text-[13px] leading-5",children:a.description}),a.installUrl&&e(w,{url:a.installUrl,label:l("plugins.installModal.connect")})]},a.id))}),n&&n.hooks.length>0&&e(N,{label:l("plugins.detail.hooks"),count:n.hooks.length,children:n.hooks.map((a)=>e("p",{className:"text-sm",children:a.eventName},a.key))}),(t?.privacyPolicyUrl||t?.termsOfServiceUrl)&&s("div",{className:"mt-10 flex flex-wrap gap-4 border-t pt-4",children:[t.privacyPolicyUrl&&e(w,{url:t.privacyPolicyUrl,label:l("plugins.detail.privacyPolicy")}),t.termsOfServiceUrl&&e(w,{url:t.termsOfServiceUrl,label:l("plugins.detail.termsOfService")})]})]})}),e(q,{open:r!==null,onOpenChange:(a)=>{if(!a)z(null)},children:e(F,{className:Pe,children:r&&s(O,{children:[e("div",{className:"shrink-0 pr-8",children:e(B,{name:r.name,className:"size-10"})}),s("div",{className:"min-h-0 space-y-6 overflow-y-auto overscroll-contain",children:[s(J,{className:"gap-3",children:[e(K,{className:"text-2xl leading-8 font-semibold break-words",children:r.interface?.displayName??r.name}),e(G,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:r.description})]}),e(ke,{path:r.path,description:r.description},r.path??r.name)]})]})})})]})}function x({label:o,children:p}){return s("div",{className:"flex min-w-28 shrink-0 flex-col items-center justify-between gap-1.5 border-e px-6 first:ps-2 last:border-e-0",children:[e("span",{className:"text-muted-foreground text-xs",children:o}),e("span",{className:"flex items-center text-sm font-normal",children:p})]})}function N({label:o,count:p,children:u}){return s("section",{className:"mt-8",children:[s("h2",{className:"text-base font-medium",children:[o," ",e("span",{className:"text-muted-foreground font-normal",children:p})]}),e("div",{className:"mt-3 flex flex-col gap-2",children:u})]})}function w({url:o,label:p}){let{openLink:u}=d();if(!/^https?:\/\//i.test(o))return null;return s(f,{variant:"link",className:"text-muted-foreground h-auto p-0 text-xs",title:o,onClick:()=>u(o),children:[p,e(M,{className:"size-3.5"})]})}
|
|
2
2
|
export{Qt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{tn}from"./chunk-
|
|
1
|
+
import{tn}from"./chunk-sjtfxn55.js";import{createContext as l,useContext as a,useEffect as p,useSyncExternalStore as u}from"react";import{jsx as o}from"react/jsx-runtime";var g=l(null),P=l(null),r=new WeakMap;function We(e){let t=r.get(e);if(!t)t=tn(e),r.set(e,t);return t}function Ds({host:e,client:t,children:n}){let s=We(t);return s.bindHost(e),p(()=>s.bindHost(e),[s,e]),o(g,{value:e,children:o(P,{value:t,children:n})})}function d(){let e=a(g);if(e===null)throw Error("Plugins host is missing");return e}function Ze(){let e=a(P);if(e===null)throw Error("Plugins client is missing");return e}function ut(e){let t=Ze();return u((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=We(Ze());return u((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function Qe(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
2
|
export{We,Ds,d,Ze,ut,i,Qe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Dt}from"./chunk-bydxp3zj.js";import{d,Qe}from"./chunk-
|
|
1
|
+
import{Dt}from"./chunk-bydxp3zj.js";import{d,Qe}from"./chunk-3w6dv0nx.js";import{k}from"./chunk-qk1yqepm.js";import{MoreHorizontalIcon as y}from"lucide-react";import{useEffect as D,useState as p}from"react";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as P,DropdownMenuContent as b,DropdownMenuItem as g,DropdownMenuTrigger as z}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Skeleton as u}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as o,jsxs as i,Fragment as F}from"react/jsx-runtime";function ci(n){return n.replace(/^\uFEFF?---\r?\n[\s\S]*?\r?\n(?:---|\.\.\.)[ \t]*(?:\r?\n|$)/,"")}function C(n){let s=n.replaceAll("\\","/"),t=s.lastIndexOf("/");return t<=0?"/":s.slice(0,t)}function I(n){let s=/^(\/\/[^/]+\/[^/]+|[A-Za-z]:\/|\/)/.exec(n)?.[0]??"",t=[];for(let e of n.slice(s.length).split("/")){if(!e||e===".")continue;if(e==="..")t.pop();else t.push(e)}return`${s.replace(/\/$/,"")}/${t.join("/")}`}function ke({path:n,renderHeader:s,description:t}){let e=d(),{t:l}=e,c=e.readFile,[a,f]=p(null),[v,w]=p(null),[M,N]=p(0);D(()=>{let r=!1;return f(null),w(null),(n===null||!c?Promise.resolve(t??""):c(n)).then((m)=>{if(!r)f(m)},(m)=>{if(!r)w(String(m))}),()=>{r=!0}},[n,t,M,c]);let x=n===null||!e.openPath&&!e.revealPath&&!e.copyText?null:i(P,{children:[o(z,{render:o(h,{variant:"ghost",size:"icon-sm","aria-label":l("plugins.card.moreActions")}),children:o(y,{})}),i(b,{align:"end",children:[e.openPath&&o(g,{onClick:()=>void Qe(e,e.openPath(n)),children:l("plugins.skills.document.open")}),e.revealPath&&o(g,{onClick:()=>void Qe(e,e.revealPath(n)),children:l("plugins.skills.document.reveal")}),e.copyText&&o(g,{disabled:a===null,onClick:()=>{if(a!==null)Qe(e,e.copyText(a))},children:l("plugins.skills.document.copy")})]})]});return i(F,{children:[s?s(x):o("div",{className:"flex justify-end",children:x}),o(k,{className:"skill-document bg-muted/50 h-[45dvh] min-h-32 min-w-0 flex-none rounded-xl pe-0",viewportClassName:"overscroll-contain p-5 text-sm leading-6",viewportProps:{role:"region",tabIndex:0,"aria-label":l("plugins.skills.document.content")},children:v?i("div",{role:"alert",className:"space-y-3",children:[i("p",{className:"text-destructive text-sm break-words",children:[l("plugins.skills.document.error"),": ",v]}),o(h,{variant:"outline",size:"sm",onClick:()=>N((r)=>r+1),children:l("plugins.loadError.retry")})]}):a===null?i("div",{role:"status","aria-label":l("plugins.skills.loading"),className:"space-y-3",children:[o(u,{className:"h-6 w-1/3"}),o(u,{className:"h-4 w-full"}),o(u,{className:"h-4 w-full"}),o(u,{className:"h-4 w-2/3"})]}):o(Dt,{text:ci(a),host:{theme:e.theme,copyLabel:l("plugins.copy"),openLink:(r)=>e.openLink(/^(?:[a-z][a-z\d+.-]*:|\/|#)/i.test(r)||n===null?r:I(`${C(n)}/${r}`))}})})]})}
|
|
2
2
|
export{ci,ke};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d}from"./chunk-
|
|
1
|
+
import{d}from"./chunk-3w6dv0nx.js";import{q,K,W,Z}from"./chunk-p2tm6tv8.js";import{Item as i}from"@nyssance/shadcn/vega/components/ui/item";import{Skeleton as s}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as e,jsxs as a}from"react/jsx-runtime";function Se({skills:l=!1}){let{t:o}=d();return a("div",{role:"status","aria-label":o(l?"plugins.skills.loading":"plugins.loading"),className:"my-3 flex flex-col gap-4",children:[e(s,{className:"h-4 w-36"}),e(Z,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2","aria-hidden":"true",children:[1,2,3,4,5,6,7,8].map((t)=>a(i,{size:"xs",className:"toolbox-row",children:[e(W,{children:e(s,{className:"size-10 rounded-xl"})}),a(K,{className:"min-w-0 group-data-[size=xs]/item:gap-2",children:[e(s,{className:"h-4 w-2/3"}),e(s,{className:"h-3 w-full"}),e(s,{className:"h-3 w-1/3"})]}),e(q,{children:e(s,{className:"size-8 rounded-full"})})]},t))})]})}
|
|
2
2
|
export{Se};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Ar}from"./chunk-86821qec.js";import{Mr}from"./chunk-n3sm0834.js";import{ns}from"./chunk-rx84h0c2.js";import{p,_,Ct}from"./chunk-qdcznn2t.js";import{Fe}from"./chunk-gyw21vnb.js";import{br,Cr,wr,kr,Sr}from"./chunk-8y706gz3.js";import{ir,rr}from"./chunk-g7cc7gdn.js";import{U}from"./chunk-2cfhvb3k.js";import{mo}from"./chunk-r8expjyy.js";import{fo}from"./chunk-1gv49jt9.js";import{o}from"./chunk-pdmayjan.js";import{e}from"./chunk-abgdqy92.js";import{uo,Vi}from"./chunk-e7ndpy02.js";import{co}from"./chunk-y6p8xspr.js";import{r,zi,J,mn}from"./chunk-dtgbgwby.js";import{cn}from"./chunk-rkejggyx.js";import{Ye,un}from"./chunk-81jejgvs.js";import{on,sn}from"./chunk-jq6qs3s6.js";import{Oi}from"./chunk-gdavg2hq.js";import{gn}from"./chunk-1hmt6w4w.js";import{Bi}from"./chunk-jm6y0edw.js";import{dn}from"./chunk-wjd2hpnd.js";import{an}from"./chunk-rtbpfasb.js";import{Hi}from"./chunk-x20dy83s.js";import{Ui}from"./chunk-23r426sm.js";import{fn}from"./chunk-2nb1475h.js";import{hasFuzzyFileSearch as Kt}from"@nyssance/codex-acp-v2/client";import{useCallback as w,useEffect as jt,useLayoutEffect as rt,useMemo as lt,useRef as k,useState as M}from"react";import{jsx as m,jsxs as R}from"react/jsx-runtime";var qt=["image/png","image/jpeg","image/webp","image/gif"],pt=[];async function Gt(n){let T=await(await fetch(n.url)).blob();return new Promise((I,S)=>{let E=new FileReader;E.onerror=()=>S(E.error),E.onload=()=>{let q=E.result;I(q.slice(q.indexOf(",")+1))},E.readAsDataURL(T)})}function Ne({session:n,onSubmit:T,onShellCommand:I,onHandOff:S,modelSelector:E,modelMenu:q,inputHeader:st,actions:Mt,leadingTools:Rt,agentControls:G=!0,placeholder:Et,children:Dt,attachmentPolicy:Nt,predictions:kt=!0,disabled:St=!1,preparing:mt=!1,allowPendingInput:Ft=!1}){let{host:F,client:O}=e(),{t:g}=F,B=w((t)=>{if(F.reportError)F.reportError(t);else console.error(t)},[F]),[dt,H]=M(()=>({text:r.get(n.id)?.text??"",revision:0})),{text:v}=dt,[C,Ot]=M(()=>r.get(n.id)?.attachments??pt),[y,Q]=M(()=>r.get(n.id)?.mentions??[]),[d,L]=M(()=>r.get(n.id)?.apps??[]),[ut,K]=M(()=>(r.get(n.id)?.apps?.length??0)>0||U(v,n.commands.map((t)=>t.name)).length>0),W=k(void 0),z=k(void 0);rt(()=>{if(d.length>0)K(!0)},[d.length]);let nt=C.some((t)=>Ye(t)&&t.pastedText.status!=="ready"),[D,ft]=M(!1),[Y,_t]=M(!1),[ot,Lt]=M(!1),it=k(null),f=k(null),ht=k(null),c=k(dt),P=w((t)=>{ht.current?.(),c.current={text:t,revision:c.current.revision+1},H(c.current)},[]),gt=w((t)=>{let i=f.current;if(i?.insertApplication){i.insertApplication(t);return}let a=c.current.text,u=i?.getTextarea()?.selectionStart??a.length;z.current={text:a,apps:[]},W.current=u+1,K(!0),P(a),L((l)=>l.some((h)=>h.id===t.id)?l:[...l,{...t,offset:u}])},[P]),Wt=w((t)=>{let i=f.current;if(i?.insertInvocation){i.insertInvocation(t);return}let a=c.current.text,u=i?.getTextarea(),l=u?.selectionStart??a.length,h=u?.selectionEnd??l,ct=`${a.slice(0,l)}${t} ${a.slice(h)}`;z.current={text:a,apps:[]},W.current=l+t.length+1,P(ct),K(!0)},[P]),xt=w(()=>(f.current?.focus(),f.current?.getTextarea()??null),[]),$t=Hi(n,P,L,d.length>0||y.length>0||C.length>0),yt=lt(()=>({read:()=>{let i=f.current?.getTextarea(),a=i===null||i===void 0?[c.current.text.length,c.current.text.length]:[i.selectionStart,i.selectionEnd];return{target:n.id,...c.current,selection:a}},compareAndSet(i,a,u){if(f.current?.isComposing())return null;if(i.target!==n.id||i.revision!==c.current.revision)return null;c.current={text:a,revision:c.current.revision+1},H(c.current);let l=f.current?.getTextarea();if(l!==null&&l!==void 0)l.value=a,l.setSelectionRange(u[0],u[1]);return{target:n.id,...c.current,selection:u}}}),[n.id]),j=k(null),bt=w((t)=>(j.current=t,()=>{if(j.current===t)j.current=null}),[]),V=n.state!=="idle",x=I!==void 0&&d.length===0&&v.startsWith("!"),X=(ut||d.length>0)&&!x,b=!St&&!mt&&n.attached&&!n.restoring&&!n.readOnly,N=!n.readOnly&&(Ft||b),Z=an(n,b&&!D&&!Y&&!nt&&!ot,v.length>0||C.length>0||y.length>0||d.length>0,kt&&!x),vt=Z.invalidate;rt(()=>{r.set(n.id,{text:v,attachments:C,mentions:y,...d.length>0?{apps:d}:{},modelId:r.get(n.id)?.modelId??null})},[n.id,v,C,y,d]),rt(()=>zi(n.id,Ot),[n.id]),rt(()=>mn(n.id,(t)=>{if(!N||D)throw Error("The composer cannot take text now; try again later");if(v.length||C.length||y.length||d.length)throw Error("The composer already has a draft; send or clear it first");P(t)}),[n.id,N,D,v,C,y,d,P]);let Pt=o((t)=>Kt(t.agent)),Ut=lt(()=>Pt&&b?async(t)=>cn((await O.fuzzyFileSearch({query:t,roots:[n.cwd],cancellationToken:null})).files):void 0,[O,Pt,b,n.cwd]),at=w((t)=>{Q((i)=>i.includes(t)?i:[...i,t])},[]);jt(()=>{f.current?.focus()},[]);let It=w(async({text:t,files:i})=>{let a=I!==void 0&&d.length===0&&t.startsWith("!")?t.slice(1):null;if(a!==null){if(a.trim().length===0)return;if(i.length||y.length||d.length)throw Error("Shell commands cannot include file references or attachments");if(n.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let u=t.trim();if(u.length===0&&i.length===0&&y.length===0&&d.length===0)return;let l=j.current;ft(!0);let h=r.get(n.id),ct=c.current.revision,tt=null;try{let A=d.map((s)=>({type:"resource_link",name:s.name,uri:`app://${s.id}`}));for(let s of y){let et={kind:"file",absPath:s};A.push({type:"resource_link",uri:on(et),name:sn(et)})}let Tt=ns(u,d);if(Tt.length>0)A.push({type:"text",text:Tt});for(let s of i)if(Ye(s)){if(s.pastedText.status!=="ready")throw Error("Text attachment is not ready");A.push({type:"resource_link",uri:s.url,name:s.filename??"pasted-text.txt"})}else A.push({type:"image",data:await Gt(s),mimeType:s.mediaType});if(c.current.revision===ct&&r.get(n.id)===h)c.current={text:"",revision:c.current.revision+1},tt=c.current.revision,H(c.current),Q([]),L([]),W.current=void 0,z.current=void 0,J(n.id,()=>pt),r.set(n.id,{text:"",attachments:pt,mentions:[],apps:[],modelId:h?.modelId??null}),f.current?.resetHeight();if(a!==null&&I)await I(a);else if(T)if(l===null)await T(A);else await T(A,(s)=>{if(l.signal.aborted||j.current!==l)return;l.accept(s),S?.(n.id,s)});else if(l===null)await O.prompt(n.id,A);else{let s=await O.prompt(n.id,A);l.accept(s)}vt();for(let s of h?.attachments??[])if(s.url.startsWith("blob:")&&!r.get(n.id)?.attachments.some((et)=>et.id===s.id))URL.revokeObjectURL(s.url)}catch(A){if(h&&tt!==null&&c.current.revision===tt&&r.get(n.id)?.attachments.length===0&&r.get(n.id)?.mentions.length===0&&!r.get(n.id)?.apps?.length)c.current={text:h.text,revision:tt+1},H(c.current),Q(h.mentions),L(h.apps??[]),r.set(n.id,h),J(n.id,()=>h.attachments);throw A}finally{ft(!1),f.current?.focus()}},[O,n.id,n.state,y,d,T,I,S,vt]),zt=()=>{O.cancel(n.id).catch(B)},Bt=w((t)=>{let i=t.code==="max_total_size"?Object.assign(Error(g("composer.imageTooLargeTitle")),{description:g("composer.imageTooLargeDescription",{mb:Fe})}):Object.assign(Error(g("composer.unsupportedAttachmentTitle")),{description:g("composer.unsupportedAttachmentDescription")});B(i)},[B,g]),Ht=lt(()=>({session:n,ready:b,inputReady:N,sending:D,textareaRef:f,draft:yt,interruptRef:ht,observeReceipts:bt,addMention:at,setAdding:_t,shellMode:x,handsFree:!x&&(T===void 0||S!==void 0)}),[n,b,N,D,yt,bt,at,T,S,x]),At=F.writeTextAttachment,wt={className:"min-h-10 bg-transparent text-sm font-normal",ref:f,rows:2,onKeyDown:$t,bashMode:I!==void 0,disabled:!N,"aria-label":g("composer.placeholder"),placeholder:x?"! command":Z.text||Et||(V?g("composer.steerPlaceholder"):g("composer.placeholder")),onPasteCapture:(t)=>{if(!X&&!x&&!t.currentTarget.disabled&&![...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/"))){let i=Ct(t.clipboardData);if(i?.apps.length){t.preventDefault();let a=t.currentTarget,u=p(i),l=_([...a.value.slice(0,a.selectionStart).split(""),...u,...a.value.slice(a.selectionEnd).split("")]);z.current={text:v,apps:[]},W.current=a.selectionStart+u.length,K(!0),L(l.apps),P(l.text);return}}if(At)un(t,n.id,g("composer.pastedTextFilename"),At)}};return m(co,{value:Ht,children:m("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:R("div",{className:"relative",children:[st&&m("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:st}),m(Ar,{attachmentPolicy:Nt,value:v,revision:c.current.revision,onValueChange:P,onSubmittedClear:()=>{c.current={text:"",revision:c.current.revision+1},H(c.current)},attachments:C,onAttachmentsChange:(t)=>J(n.id,()=>t),children:R("div",{ref:it,className:"relative",children:[G&&!ot&&m(Mr,{bashMode:I!==void 0,handleRef:f,commands:n.commands,renderSlashMenu:(t)=>m(uo,{anchorRef:it,commands:n.commands,query:t.query,includeAttachment:!1,disabled:!N,agentDisabled:!b||x,open:!0,onClose:t.close,onCommand:(i)=>t.replaceQuery(()=>Wt(i.startsWith("$")?i:`/${i}`)),onApp:(i)=>t.replaceQuery(()=>gt(i)),focusInput:xt}),searchFiles:Ut,onMention:at,onSearchError:B,emptyLabel:g("composer.noCommands"),fileStatusLabels:{loading:g("composer.searchingFiles"),empty:g("composer.noMatchingFiles")}},X?"inline":"textarea"),R(br,{"data-shell-mode":x||void 0,bashMode:I!==void 0,globalDrop:!0,multiple:!0,accept:qt.join(","),onError:Bt,onSubmit:It,onSubmitAsync:It,onSubmitError:B,canSubmit:()=>b&&!D&&!Y&&!nt&&(!x||!V&&v.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[Dt,R(wr,{className:"px-3 pt-3 pb-0 empty:hidden",children:[Y&&m("span",{role:"status",className:"text-muted-foreground text-xs",children:g("composer.addingFiles")}),m(Oi,{mentions:y,onRemove:(t)=>Q((i)=>i.filter((a)=>a!==t))}),m(rr,{children:(t)=>Ye(t)?m(Bi,{data:t,sessionId:n.id}):m(ir,{data:t,t:g})})]}),R(Cr,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(t)=>{if(!Z.text||f.current?.isComposing()||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||t.shiftKey||t.ctrlKey||t.altKey||t.metaKey||t.target!==f.current?.getTextarea())return;if(t.key==="Tab")t.preventDefault(),t.stopPropagation(),P(Z.text)},children:[x&&m("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),X?m(mo,{...wt,skillIcon:F.skillIcon,skillNames:n.commands.map((t)=>t.name),applications:d,onApplicationsChange:L,initialCaret:W.current,initialUndo:z.current}):m(fo,{...wt,autoFocus:ut&&x})]}),m(kr,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:R("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[R("div",{className:"flex min-w-0 items-center gap-[5px]",children:[m(Vi,{anchorRef:it,commands:n.commands,disabled:!N,agentDisabled:!b||x,agentControls:G,open:ot,onOpenChange:Lt,focusInput:xt,onCommand:(t)=>{let i=c.current.text,a=i.length===0||i.endsWith(`
|
|
1
|
+
import{Ar}from"./chunk-86821qec.js";import{Mr}from"./chunk-n3sm0834.js";import{ns}from"./chunk-rx84h0c2.js";import{p,_,Ct}from"./chunk-qdcznn2t.js";import{Fe}from"./chunk-gyw21vnb.js";import{br,Cr,wr,kr,Sr}from"./chunk-8y706gz3.js";import{ir,rr}from"./chunk-g7cc7gdn.js";import{U}from"./chunk-2cfhvb3k.js";import{mo}from"./chunk-r8expjyy.js";import{fo}from"./chunk-1gv49jt9.js";import{o}from"./chunk-pdmayjan.js";import{e}from"./chunk-abgdqy92.js";import{uo,Vi}from"./chunk-e7ndpy02.js";import{co}from"./chunk-y6p8xspr.js";import{r,zi,J,mn}from"./chunk-dtgbgwby.js";import{cn}from"./chunk-rkejggyx.js";import{Ye,un}from"./chunk-81jejgvs.js";import{on,sn}from"./chunk-jq6qs3s6.js";import{Oi}from"./chunk-gdavg2hq.js";import{gn}from"./chunk-1hmt6w4w.js";import{Bi}from"./chunk-jm6y0edw.js";import{dn}from"./chunk-wjd2hpnd.js";import{an}from"./chunk-rtbpfasb.js";import{Hi}from"./chunk-x20dy83s.js";import{Ui}from"./chunk-23r426sm.js";import{fn}from"./chunk-2nb1475h.js";import{hasFuzzyFileSearch as Kt}from"@nyssance/codex-acp-v2/client";import{useCallback as w,useEffect as jt,useLayoutEffect as rt,useMemo as lt,useRef as N,useState as M}from"react";import{jsx as m,jsxs as R}from"react/jsx-runtime";var qt=["image/png","image/jpeg","image/webp","image/gif"],pt=[];async function Gt(n){let T=await(await fetch(n.url)).blob();return new Promise((I,S)=>{let E=new FileReader;E.onerror=()=>S(E.error),E.onload=()=>{let q=E.result;I(q.slice(q.indexOf(",")+1))},E.readAsDataURL(T)})}function Ne({session:n,onSubmit:T,onShellCommand:I,onHandOff:S,modelSelector:E,modelMenu:q,inputHeader:st,actions:Mt,leadingTools:Rt,agentControls:G=!0,placeholder:Et,children:Dt,attachmentPolicy:kt,predictions:Nt=!0,disabled:St=!1,preparing:mt=!1,allowPendingInput:Ft=!1}){let{host:F,client:O}=e(),{t:g}=F,B=w((t)=>{if(F.reportError)F.reportError(t);else console.error(t)},[F]),[dt,H]=M(()=>({text:r.get(n.id)?.text??"",revision:0})),{text:v}=dt,[C,Ot]=M(()=>r.get(n.id)?.attachments??pt),[y,Q]=M(()=>r.get(n.id)?.mentions??[]),[d,L]=M(()=>r.get(n.id)?.apps??[]),[ut,K]=M(()=>(r.get(n.id)?.apps?.length??0)>0||U(v,n.commands.map((t)=>t.name)).length>0),W=N(void 0),z=N(void 0);rt(()=>{if(d.length>0)K(!0)},[d.length]);let nt=C.some((t)=>Ye(t)&&t.pastedText.status!=="ready"),[D,ft]=M(!1),[Y,_t]=M(!1),[ot,Lt]=M(!1),it=N(null),f=N(null),ht=N(null),c=N(dt),P=w((t)=>{ht.current?.(),c.current={text:t,revision:c.current.revision+1},H(c.current)},[]),gt=w((t)=>{let i=f.current;if(i?.insertApplication){i.insertApplication(t);return}let a=c.current.text,u=i?.getTextarea()?.selectionStart??a.length;z.current={text:a,apps:[]},W.current=u+1,K(!0),P(a),L((l)=>l.some((h)=>h.id===t.id)?l:[...l,{...t,offset:u}])},[P]),Wt=w((t)=>{let i=f.current;if(i?.insertInvocation){i.insertInvocation(t);return}let a=c.current.text,u=i?.getTextarea(),l=u?.selectionStart??a.length,h=u?.selectionEnd??l,ct=`${a.slice(0,l)}${t} ${a.slice(h)}`;z.current={text:a,apps:[]},W.current=l+t.length+1,P(ct),K(!0)},[P]),xt=w(()=>(f.current?.focus(),f.current?.getTextarea()??null),[]),$t=Hi(n,P,L,d.length>0||y.length>0||C.length>0),yt=lt(()=>({read:()=>{let i=f.current?.getTextarea(),a=i===null||i===void 0?[c.current.text.length,c.current.text.length]:[i.selectionStart,i.selectionEnd];return{target:n.id,...c.current,selection:a}},compareAndSet(i,a,u){if(f.current?.isComposing())return null;if(i.target!==n.id||i.revision!==c.current.revision)return null;c.current={text:a,revision:c.current.revision+1},H(c.current);let l=f.current?.getTextarea();if(l!==null&&l!==void 0)l.value=a,l.setSelectionRange(u[0],u[1]);return{target:n.id,...c.current,selection:u}}}),[n.id]),j=N(null),bt=w((t)=>(j.current=t,()=>{if(j.current===t)j.current=null}),[]),V=n.state!=="idle",x=I!==void 0&&d.length===0&&v.startsWith("!"),X=(ut||d.length>0)&&!x,b=!St&&!mt&&n.attached&&!n.restoring&&!n.readOnly,k=!n.readOnly&&(Ft||b),Z=an(n,b&&!D&&!Y&&!nt&&!ot,v.length>0||C.length>0||y.length>0||d.length>0,Nt&&!x),vt=Z.invalidate;rt(()=>{r.set(n.id,{text:v,attachments:C,mentions:y,...d.length>0?{apps:d}:{},modelId:r.get(n.id)?.modelId??null})},[n.id,v,C,y,d]),rt(()=>zi(n.id,Ot),[n.id]),rt(()=>mn(n.id,(t)=>{if(!k||D)throw Error("The composer cannot take text now; try again later");if(v.length||C.length||y.length||d.length)throw Error("The composer already has a draft; send or clear it first");P(t)}),[n.id,k,D,v,C,y,d,P]);let Pt=o((t)=>Kt(t.agent)),Ut=lt(()=>Pt&&b?async(t)=>cn((await O.fuzzyFileSearch({query:t,roots:[n.cwd],cancellationToken:null})).files):void 0,[O,Pt,b,n.cwd]),at=w((t)=>{Q((i)=>i.includes(t)?i:[...i,t])},[]);jt(()=>{f.current?.focus()},[]);let It=w(async({text:t,files:i})=>{let a=I!==void 0&&d.length===0&&t.startsWith("!")?t.slice(1):null;if(a!==null){if(a.trim().length===0)return;if(i.length||y.length||d.length)throw Error("Shell commands cannot include file references or attachments");if(n.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let u=t.trim();if(u.length===0&&i.length===0&&y.length===0&&d.length===0)return;let l=j.current;ft(!0);let h=r.get(n.id),ct=c.current.revision,tt=null;try{let A=d.map((s)=>({type:"resource_link",name:s.name,uri:`app://${s.id}`}));for(let s of y){let et={kind:"file",absPath:s};A.push({type:"resource_link",uri:on(et),name:sn(et)})}let Tt=ns(u,d);if(Tt.length>0)A.push({type:"text",text:Tt});for(let s of i)if(Ye(s)){if(s.pastedText.status!=="ready")throw Error("Text attachment is not ready");A.push({type:"resource_link",uri:s.url,name:s.filename??"pasted-text.txt"})}else A.push({type:"image",data:await Gt(s),mimeType:s.mediaType});if(c.current.revision===ct&&r.get(n.id)===h)c.current={text:"",revision:c.current.revision+1},tt=c.current.revision,H(c.current),Q([]),L([]),W.current=void 0,z.current=void 0,J(n.id,()=>pt),r.set(n.id,{text:"",attachments:pt,mentions:[],apps:[],modelId:h?.modelId??null}),f.current?.resetHeight();if(a!==null&&I)await I(a);else if(T)if(l===null)await T(A);else await T(A,(s)=>{if(l.signal.aborted||j.current!==l)return;l.accept(s),S?.(n.id,s)});else if(l===null)await O.prompt(n.id,A);else{let s=await O.prompt(n.id,A);l.accept(s)}vt();for(let s of h?.attachments??[])if(s.url.startsWith("blob:")&&!r.get(n.id)?.attachments.some((et)=>et.id===s.id))URL.revokeObjectURL(s.url)}catch(A){if(h&&tt!==null&&c.current.revision===tt&&r.get(n.id)?.attachments.length===0&&r.get(n.id)?.mentions.length===0&&!r.get(n.id)?.apps?.length)c.current={text:h.text,revision:tt+1},H(c.current),Q(h.mentions),L(h.apps??[]),r.set(n.id,h),J(n.id,()=>h.attachments);throw A}finally{ft(!1),f.current?.focus()}},[O,n.id,n.state,y,d,T,I,S,vt]),zt=()=>{O.cancel(n.id).catch(B)},Bt=w((t)=>{let i=t.code==="max_total_size"?Object.assign(Error(g("composer.imageTooLargeTitle")),{description:g("composer.imageTooLargeDescription",{mb:Fe})}):Object.assign(Error(g("composer.unsupportedAttachmentTitle")),{description:g("composer.unsupportedAttachmentDescription")});B(i)},[B,g]),Ht=lt(()=>({session:n,ready:b,inputReady:k,sending:D,textareaRef:f,draft:yt,interruptRef:ht,observeReceipts:bt,addMention:at,setAdding:_t,shellMode:x,handsFree:!x&&(T===void 0||S!==void 0)}),[n,b,k,D,yt,bt,at,T,S,x]),At=F.writeTextAttachment,wt={className:"min-h-10 bg-transparent text-sm font-normal",ref:f,rows:2,onKeyDown:$t,bashMode:I!==void 0,disabled:!k,"aria-label":g("composer.placeholder"),placeholder:x?"! command":Z.text||Et||(V?g("composer.steerPlaceholder"):g("composer.placeholder")),onPasteCapture:(t)=>{if(!X&&!x&&!t.currentTarget.disabled&&![...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/"))){let i=Ct(t.clipboardData);if(i?.apps.length){t.preventDefault();let a=t.currentTarget,u=p(i),l=_([...a.value.slice(0,a.selectionStart).split(""),...u,...a.value.slice(a.selectionEnd).split("")]);z.current={text:v,apps:[]},W.current=a.selectionStart+u.length,K(!0),L(l.apps),P(l.text);return}}if(At)un(t,n.id,g("composer.pastedTextFilename"),At)}};return m(co,{value:Ht,children:m("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:R("div",{className:"relative",children:[st&&m("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:st}),m(Ar,{attachmentPolicy:kt,value:v,revision:c.current.revision,onValueChange:P,onSubmittedClear:()=>{c.current={text:"",revision:c.current.revision+1},H(c.current)},attachments:C,onAttachmentsChange:(t)=>J(n.id,()=>t),children:R("div",{ref:it,className:"relative",children:[G&&!ot&&m(Mr,{bashMode:I!==void 0,handleRef:f,commands:n.commands,renderSlashMenu:(t)=>m(uo,{anchorRef:it,commands:n.commands,query:t.query,includeAttachment:!1,disabled:!k,agentDisabled:!b||x,open:!0,onClose:t.close,onCommand:(i)=>t.replaceQuery(()=>Wt(i.startsWith("$")?i:`/${i}`)),onApp:(i)=>t.replaceQuery(()=>gt(i)),focusInput:xt}),searchFiles:Ut,onMention:at,onSearchError:B,emptyLabel:g("composer.noCommands"),fileStatusLabels:{loading:g("composer.searchingFiles"),empty:g("composer.noMatchingFiles")}},X?"inline":"textarea"),R(br,{"data-shell-mode":x||void 0,bashMode:I!==void 0,globalDrop:!0,multiple:!0,accept:qt.join(","),onError:Bt,onSubmit:It,onSubmitAsync:It,onSubmitError:B,canSubmit:()=>b&&!D&&!Y&&!nt&&(!x||!V&&v.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[Dt,R(wr,{className:"px-3 pt-3 pb-0 empty:hidden",children:[Y&&m("span",{role:"status",className:"text-muted-foreground text-xs",children:g("composer.addingFiles")}),m(Oi,{mentions:y,onRemove:(t)=>Q((i)=>i.filter((a)=>a!==t))}),m(rr,{children:(t)=>Ye(t)?m(Bi,{data:t,sessionId:n.id}):m(ir,{data:t,t:g})})]}),R(Cr,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(t)=>{if(!Z.text||f.current?.isComposing()||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||t.shiftKey||t.ctrlKey||t.altKey||t.metaKey||t.target!==f.current?.getTextarea())return;if(t.key==="Tab"||t.key==="ArrowRight")t.preventDefault(),t.stopPropagation(),P(Z.text)},children:[x&&m("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),X?m(mo,{...wt,skillIcon:F.skillIcon,skillNames:n.commands.map((t)=>t.name),applications:d,onApplicationsChange:L,initialCaret:W.current,initialUndo:z.current}):m(fo,{...wt,autoFocus:ut&&x})]}),m(kr,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:R("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[R("div",{className:"flex min-w-0 items-center gap-[5px]",children:[m(Vi,{anchorRef:it,commands:n.commands,disabled:!k,agentDisabled:!b||x,agentControls:G,open:ot,onOpenChange:Lt,focusInput:xt,onCommand:(t)=>{let i=c.current.text,a=i.length===0||i.endsWith(`
|
|
2
2
|
`)?i:`${i}
|
|
3
3
|
`,u=t.startsWith("$")?t:`/${t}`,l=`${a}${u} `;if(!X)z.current={text:i,apps:[]},W.current=l.length,K(!0);P(l),requestAnimationFrame(()=>{let h=f.current?.getTextarea();h?.focus(),h?.setSelectionRange(l.length,l.length)})},onApp:gt}),Rt,G&&m(dn,{sessionId:n.id,options:n.configOptions,disabled:!b})]}),R(Sr,{className:"w-full min-w-0 items-center justify-end gap-1",children:[G&&m(fn,{session:n}),E??m(gn,{...q,sessionId:n.id,options:n.configOptions,disabled:!b}),Mt,m(Ui,{active:V,sending:D||mt||Y,ready:b&&!nt&&(!x||!V&&v.slice(1).trim().length>0),hasMentions:y.length>0||d.length>0,onStop:zt})]})]})})]})]})})]})})})}
|
|
4
4
|
export{Ne};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d,i}from"./chunk-
|
|
1
|
+
import{d,i}from"./chunk-3w6dv0nx.js";import{q,K,le,W,Z,_e}from"./chunk-p2tm6tv8.js";import{Se}from"./chunk-62wxvxsg.js";import{k}from"./chunk-qk1yqepm.js";import{ke}from"./chunk-55ya3102.js";import{Q,Pe}from"./chunk-e04g26qm.js";import{CheckIcon as O,SparklesIcon as A,XIcon as U}from"lucide-react";import{useDeferredValue as V,useState as y}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as F,DialogClose as X,DialogContent as _,DialogDescription as J,DialogHeader as R,DialogTitle as Y}from"@nyssance/shadcn/vega/components/ui/dialog";import{ItemTitle as ee}from"@nyssance/shadcn/vega/components/ui/item";import{Spinner as te}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as ae}from"@nyssance/shadcn/vega/components/ui/switch";import{Tabs as se,TabsContent as ne,TabsList as ie,TabsTrigger as oe}from"@nyssance/shadcn/vega/components/ui/tabs";import{jsx as t,jsxs as n,Fragment as S}from"react/jsx-runtime";function T({skill:r}){let{assetUrl:p}=d(),[u,s]=y(!1),l=r.interface?.iconSmall,h=l&&p?p(l):r.interface?.iconSmallUrl;return t("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:h&&!u?t("img",{src:h,alt:"",onError:()=>s(!0),className:"size-6 rounded object-contain"}):t(A,{className:"text-muted-foreground size-6"})})}function re({skill:r}){let{t:p}=d(),u=i((l)=>l.setSkillEnabled),s=i((l)=>(r.path in l.busySkills));return n("div",{className:"flex items-center gap-2",children:[s&&t(te,{className:"text-muted-foreground size-3.5"}),t(ae,{checked:r.enabled,disabled:s,"aria-label":`${p(r.enabled?"plugins.skills.disable":"plugins.skills.enable")}: ${r.interface?.displayName??r.name}`,onCheckedChange:(l)=>void u(r,l)})]})}function Yt({query:r,ready:p,onOpenPlugin:u}){let{t:s}=d(),l=i((e)=>e.skills),h=i((e)=>e.skillErrors),P=i((e)=>e.loading)||!p,j=i((e)=>e.installed),z=i((e)=>e.skillProjects),[M,E]=y(null),[v,L]=y(!1),[B,C]=y(null),b=V(r.trim().toLowerCase()),o=l.find((e)=>e.path===B),x=j.find(({plugin:e})=>e.id===o?.pluginId),c=l.filter((e)=>[e.name,e.interface?.displayName,e.description,e.shortDescription,e.interface?.shortDescription,e.pluginId].filter(Boolean).join(" ").toLowerCase().includes(b)).toSorted((e,a)=>(e.interface?.displayName??e.name).localeCompare(a.interface?.displayName??a.name)),m=[...["user","system","admin"].flatMap((e)=>{let a=l.filter((f)=>f.scope===e);return a.length?[{id:e,label:s(e==="user"?"plugins.catalog.personal":`plugins.skills.scope.${e}`),paths:new Set(a.map((f)=>f.path)),path:null}]:[]}),...Object.entries(z).flatMap(([e,a])=>{if(!l.some((I)=>I.scope==="repo"&&a.includes(I.path)))return[];let f=e.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)||e;return[{id:`project:${e}`,label:f,paths:new Set(a),path:e}]})],H=m.map((e)=>e.label);for(let e of m)if(e.path&&H.filter((a)=>a===e.label).length>1)e.label=e.path;let g=m.find((e)=>e.id===M)??m[0],D=g?c.filter((e)=>g.paths.has(e.path)):[],G=v||b?c:c.slice(0,6),w=(e)=>t(Z,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:e.map((a)=>n(_e,{className:"toolbox-row relative [contain-intrinsic-size:auto_80px] [content-visibility:auto]",children:[t(N,{variant:"ghost",className:"absolute inset-0 z-0 size-full","aria-label":a.interface?.displayName??a.name,onClick:()=>C(a.path)}),t(W,{className:"pointer-events-none relative translate-none! self-center!",children:t(T,{skill:a})}),n(K,{className:"pointer-events-none relative min-w-0",children:[t(ee,{className:"block truncate",children:a.interface?.displayName??a.name}),t(le,{className:"line-clamp-1",title:a.interface?.shortDescription??a.shortDescription??a.description,children:a.interface?.shortDescription??a.shortDescription??a.description})]}),t(q,{className:"text-muted-foreground pointer-events-none relative",children:a.enabled?t(O,{className:"size-4","aria-label":s("plugins.skills.enabledStatus")}):t("span",{className:"text-xs",children:s("plugins.skills.disabledBadge")})})]},a.path))});return n("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[t(k,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${Q} space-y-8 pt-6`,children:[h.map((e)=>n("p",{role:"alert",className:"text-destructive text-xs break-words",children:[e.path,": ",e.message]},e.path)),P?t(Se,{skills:!0}):n(S,{children:[n("section",{"aria-label":s("plugins.skills.installed"),children:[n("div",{className:"mb-4 flex items-center justify-between gap-3",children:[t("h2",{className:"text-base font-medium",children:s("plugins.skills.installed")}),t("span",{role:"status",className:"text-muted-foreground text-xs",children:s("plugins.catalog.skillCount",{count:c.length})})]}),c.length?w(G):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s(b?"plugins.skills.filteredEmpty":"plugins.skills.empty")}),!b&&c.length>6&&t(N,{variant:"ghost",className:"text-muted-foreground mt-3 max-w-full justify-start","aria-expanded":v,onClick:()=>L((e)=>!e),children:v?s("plugins.sections.showLess"):s("plugins.catalog.showMore",{count:c.length-6})})]}),g&&n(se,{value:g.id,onValueChange:(e)=>{if(typeof e==="string")E(e)},className:"gap-6",children:[t(ie,{"aria-label":s("plugins.catalog.scope"),className:"h-auto max-w-full flex-wrap justify-start gap-2 bg-transparent",children:m.map((e)=>t(oe,{value:e.id,title:e.path??e.label,className:"data-active:bg-muted! h-8 flex-none rounded-lg px-3 text-[13px] font-medium shadow-none! after:hidden dark:data-active:border-transparent",children:e.label},e.id))}),m.map((e)=>t(ne,{value:e.id,children:e.id===g.id&&(D.length?w(D):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s("plugins.skills.filteredEmpty")}))},e.id))]})]})]})}),t(F,{open:!!o,onOpenChange:(e)=>{if(!e)C(null)},children:t(_,{showCloseButton:!1,className:Pe,children:o&&n(S,{children:[t(ke,{path:o.path,renderHeader:(e)=>n(S,{children:[n("div",{className:"flex items-center justify-between gap-4",children:[t(T,{skill:o}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(re,{skill:o}),e,t(X,{render:t(N,{variant:"ghost",size:"icon-sm","aria-label":s("plugins.close")}),children:t(U,{})})]})]}),n(R,{className:"gap-3",children:[t(Y,{className:"text-2xl leading-8 font-semibold break-words",children:o.interface?.displayName??o.name}),t(J,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:o.description})]})]})},o.path),o.pluginId&&n("div",{className:"text-sm",children:[n("span",{className:"text-muted-foreground",children:[s("plugins.catalog.fromPlugin")," "]}),x?t(N,{variant:"link",className:"h-auto p-0",onClick:()=>{C(null),u(x)},children:x.plugin.interface?.displayName??x.plugin.name}):o.pluginId]})]})})})]})}
|
|
2
2
|
export{Yt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o}from"./chunk-pdmayjan.js";import{wn,e,x}from"./chunk-abgdqy92.js";import{Ne}from"./chunk-
|
|
1
|
+
import{o}from"./chunk-pdmayjan.js";import{wn,e,x}from"./chunk-abgdqy92.js";import{Ne}from"./chunk-bcdw682e.js";import{Bt}from"./chunk-bej9z041.js";import{Gt}from"./chunk-04frqm59.js";import{zt,Vt}from"./chunk-7ac4g54f.js";import{jt}from"./chunk-04c5k3qr.js";import{LockIcon as H,UnplugIcon as k}from"lucide-react";import{useMemo as O,useRef as S}from"react";import{Alert as C,AlertDescription as N,AlertTitle as h}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as w}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as M,EmptyDescription as P,EmptyHeader as z,EmptyTitle as B}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as r,jsxs as i}from"react/jsx-runtime";function _s({host:t,client:c,...s}){let m=O(()=>t.openDiff?t:{...t,openDiff:zt},[t]);return i(wn,{host:m,client:c,children:[r(I,{...s}),!t.openDiff&&r(Vt,{})]})}function I({session:t,header:c,overlay:s,timeline:m,composer:D,readOnlyActions:g,welcome:E,children:T,rootRef:l,search:A=!0}){let{host:d,client:R}=e(),p=S(null),b=(a)=>{if(p.current=a,typeof l==="function")l(a);else if(l)l.current=a},{t:n}=d,f=o((a)=>a.connection==="ready"),v=o((a)=>a.historyPages[t.id]?.error),y=()=>x(d,R.open(t.id,t.cwd)),u=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return i("div",{"data-chat-drop-zone":!0,ref:b,className:"flex h-full min-h-0 flex-col",children:[c,i("div",{className:"relative flex min-h-0 flex-1 flex-col","data-chat-content":!0,children:[A&&!u&&r(Gt,{sessionId:t.id,rootRef:p}),s,f&&!t.attached&&!t.restoring&&!t.readOnly&&r("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:i(C,{children:[r(k,{}),r(h,{children:n("conversation.stopped")}),r(N,{children:r(w,{size:"sm",variant:"outline",onClick:y,children:n("conversation.reconnect")})})]})}),u?E??r(M,{className:"flex-1",children:i(z,{children:[r(B,{className:"text-[28px] font-normal",children:n("conversation.welcomeTitle")}),r(P,{children:n("conversation.welcomeDescription")})]})}):r(Bt,{session:t,timeline:m}),r(jt,{sessionId:t.id}),t.readOnly?r("div",{className:"mx-auto w-full max-w-3xl shrink-0 px-6 pb-5","data-readonly-composer":!0,children:i(C,{className:"flex items-center justify-between gap-4 rounded-3xl px-5 py-4",children:[i("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[r(H,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("div",{className:"min-w-0 space-y-1",children:[r(h,{children:n("conversation.readOnlyTitle")}),r(N,{children:n("conversation.readOnlyDescription")}),v&&r("p",{role:"alert",className:"text-destructive break-words",children:v})]})]}),i("div",{className:"border-border flex shrink-0 items-center gap-1 border-s ps-3","data-readonly-actions":!0,children:[r(w,{size:"sm",variant:"outline",className:"text-foreground cursor-pointer disabled:cursor-not-allowed",onClick:y,disabled:!f||t.restoring,children:n(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")}),g]})]})}):D??r(Ne,{session:t})]}),T]})}
|
|
2
2
|
export{_s};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createStore as I}from"@alwith/api/client";function k(t){return t instanceof Error?t.message:String(t)}function R(t){return t.interface?.displayName??t.name}function v(t){let u={},i=new Map,l=new Map;for(let c of t.data){for(let o of c.skills)if(i.set(o.path,o),o.scope==="repo"){let m=u[c.cwd]??[];if(!m.includes(o.path))m.push(o.path);u[c.cwd]=m}for(let o of c.errors)l.set(o.path,o)}return{skills:[...i.values()],errors:[...l.values()],projects:u}}function A(t){let u=[];for(let i of t.marketplaces)for(let l of i.plugins)if(l.installed)u.push({plugin:l,marketplace:i});return u.toSorted((i,l)=>(l.plugin.installedAt??0)-(i.plugin.installedAt??0))}function di(t){let{plugin:u,marketplace:i}=t;return{installAttemptId:crypto.randomUUID(),pluginName:i.path===null?u.remotePluginId??u.name:u.name,...i.path===null?{remoteMarketplaceName:i.name}:{marketplacePath:i.path}}}function N(t){let{plugin:u,marketplace:i}=t;return{pluginName:i.path===null?u.remotePluginId??u.name:u.name,...i.path===null?{remoteMarketplaceName:i.name}:{marketplacePath:i.path}}}function tn(t,u){let i=u??{t:(e)=>e},l=(e,r)=>i.t(e,r),c=(e)=>i.notify?.(e),o=(e)=>{if(i.reportError)i.reportError(Error(e));else console.error(e)},m=null,b=null,g=(e)=>S.setState(e),P=()=>S.getState(),y=async(e=!1)=>{if(await P().refresh(void 0,{forceRefetch:e,background:!0}),P().error)throw Error(l("plugins.toast.syncError",{message:P().error}))},f=(e,r)=>g((n)=>{let s={...n.busyIds};if(r===null)delete s[e];else s[e]=r;return{busyIds:s}}),h=(e,r)=>g((n)=>{let s={...n.busyMarketplaces};if(r)s[e]=!0;else delete s[e];return{busyMarketplaces:s}}),M=I({loading:!1,loadedScope:null,upgrading:!1,error:null,cwds:[],marketplaces:[],marketplaceLoadErrors:[],featuredPluginIds:[],installed:[],skills:[],skillProjects:{},skillErrors:[],busyIds:{},busySkills:{},busyMarketplaces:{},refresh:(e=P().cwds,r={})=>{let n=r.forceRefetch===!0||m?.forceRefetch===!0,s=r.catalog!==!1||n||m?.catalog===!0;if(m={cwds:e,forceRefetch:n,catalog:s},g({cwds:e,...!r.background?{loading:!0}:{}}),b)return b;return b=(async()=>{while(m){let a=m;m=null,g({error:null});try{let[d,p,E]=await Promise.all([t.listSkills(a.cwds,a.forceRefetch),a.catalog?t.listPlugins({...a.cwds.length>0?{cwds:a.cwds}:{},...a.forceRefetch?{forceRefetch:!0}:{}}):null,t.installedPlugins(a.cwds)]);if(m)continue;let w=v(d);g({loadedScope:JSON.stringify(a.cwds),skills:w.skills,skillProjects:w.projects,skillErrors:w.errors,...p?{marketplaces:p.marketplaces,marketplaceLoadErrors:p.marketplaceLoadErrors,featuredPluginIds:p.featuredPluginIds}:{},installed:A(E)})}catch(d){if(!m)g({error:k(d)})}}})().finally(()=>{b=null,g({loading:!1})}),b},install:async(e)=>{if(e.plugin.id in P().busyIds)throw Error("Plugin operation already in progress");let r=R(e.plugin);f(e.plugin.id,"installing");try{let n=await t.installPlugin(di(e));return await y(),f(e.plugin.id,null),c(l("plugins.toast.installed",{pluginName:r})),n}catch(n){throw o(`${l("plugins.toast.installError")}: ${k(n)}`),n}finally{f(e.plugin.id,null)}},setPluginEnabled:async(e,r)=>{if(e.id in P().busyIds)return;f(e.id,"toggling");let n=(a)=>g((d)=>({installed:d.installed.map((p)=>p.plugin.id===e.id?{...p,plugin:{...p.plugin,enabled:a}}:p)}));n(r);let s=e.enabled;try{let a=e.source.type==="remote"?e.remotePluginId:void 0;if(a===null)throw Error("Remote plugin ID is missing");let d=await t.setPluginEnabled(e.id,r,a);s=d.enabled,n(d.enabled),await y();let p=P().installed.find((E)=>E.plugin.id===e.id);if(p)s=p.plugin.enabled;if(!p||s!==r)throw Error(l("plugins.toast.toggleNotApplied"));f(e.id,null),c(l(r?"plugins.toast.enabled":"plugins.toast.disabled",{pluginName:R(e)}))}catch(a){n(s),o(`${l("plugins.toast.toggleError")}: ${k(a)}`)}finally{f(e.id,null)}},uninstall:async(e)=>{if(e.id in P().busyIds)return;let r=R(e);f(e.id,"uninstalling");try{let n=e.source.type==="remote"?e.remotePluginId:e.id;if(!n)throw Error("Remote plugin ID is missing");if(await t.uninstallPlugin(n),await y(),P().installed.some((s)=>s.plugin.id===e.id))throw Error(l("plugins.toast.uninstallNotApplied"));f(e.id,null),c(l("plugins.toast.uninstalled",{pluginName:r}))}catch(n){o(`${l("plugins.toast.uninstallError")}: ${k(n)}`)}finally{f(e.id,null)}},readPlugin:async(e)=>(await t.readPlugin(N(e))).plugin,setSkillEnabled:async(e,r)=>{if(e.path in P().busySkills)return;g((s)=>({busySkills:{...s.busySkills,[e.path]:!0}})),g((s)=>({skills:s.skills.map((a)=>a.path===e.path?{...a,enabled:r}:a)}));let n=e.interface?.displayName??e.name;try{let s=await t.setSkillEnabled({path:e.path,enabled:r});if(g((a)=>({skills:a.skills.map((d)=>d.path===e.path?{...d,enabled:s.effectiveEnabled}:d)})),s.effectiveEnabled!==r){o(l("plugins.catalog.toggleNotApplied"));return}c(l(r?"plugins.skills.enabledToast":"plugins.skills.disabledToast",{skillName:n}))}catch(s){g((a)=>({skills:a.skills.map((d)=>d.path===e.path?{...d,enabled:e.enabled}:d)})),o(`${l("plugins.skills.toggleError")}: ${k(s)}`)}finally{g((s)=>{let a={...s.busySkills};return delete a[e.path],{busySkills:a}})}},addMarketplace:async(e)=>{let r=await t.addMarketplace(e);return await y(!0),c(r.alreadyAdded?l("plugins.marketplace.alreadyAdded",{marketplaceName:r.marketplaceName}):l("plugins.marketplace.added",{marketplaceName:r.marketplaceName})),r},removeMarketplace:async(e)=>{h(e,!0);try{await t.removeMarketplace(e),await y(),h(e,!1),c(l("plugins.marketplace.removed",{marketplaceName:e}))}catch(r){o(`${l("plugins.marketplace.removeError")}: ${k(r)}`)}finally{h(e,!1)}},upgradeMarketplace:async(e)=>{h(e,!0);try{let r=await t.upgradeMarketplaces(e);if(await y(!0),h(e,!1),r.errors.length>0)o(`${l("plugins.marketplace.upgradeError")}: ${r.errors.map((n)=>n.message).join("; ")}`);else c(l("plugins.marketplace.upgraded",{marketplaceName:e}))}catch(r){o(`${l("plugins.marketplace.upgradeError")}: ${k(r)}`)}finally{h(e,!1)}},upgradeAll:async()=>{if(P().upgrading)return;g({upgrading:!0});try{let e=await t.upgradeMarketplaces();if(await y(!0),g({upgrading:!1}),e.errors.length>0)o(l("plugins.marketplace.upgradeAllError"));else c(l("plugins.marketplace.upgradedAll"))}catch(e){o(`${l("plugins.marketplace.upgradeAllRequestError")}: ${k(e)}`)}finally{g({upgrading:!1})}}}),S=Object.assign(M,{bindHost:(e)=>{i=e}});return S}
|
|
2
|
+
export{di,tn};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{m}from"./chunk-sgbn37kz.js";import{R,f}from"./chunk-6tj5e7fc.js";import{Jt}from"./chunk-hzhcajx1.js";import{We,d,Ze,ut,i}from"./chunk-
|
|
2
|
-
`).toLowerCase()}))})),[a]),o=G(()=>{let n=new Set(g);return c.map(({marketplace:v,entries:x})=>({marketplace:v,plugins:x.filter(({plugin:y,text:b})=>r===""?v.path!==null||n.has(y.id):b.includes(r)).map(({plugin:y})=>y)}))},[c,g,r]);return s(X,{children:[o.map(({marketplace:n,plugins:v})=>e(Me,{marketplace:n,plugins:v,onOpen:u},JSON.stringify([n.name,n.path,r]))),o.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:p("plugins.empty")})]})});function ze(){let{t}=d(),r=L(),u=i((h)=>h.addMarketplace),p=i((h)=>h.upgradeAll),a=i((h)=>h.upgrading),[g,c]=C(""),[o,n]=C(!1),[v,x]=C(!1),[y,b]=C(null),z=async()=>{let h=g.trim();if(!h||o)return;n(!0),b(null);try{await u({source:h}),c(""),x(!1)}catch(I){b(I instanceof Error?I.message:String(I))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(N,{size:"sm",className:"h-9",variant:"outline",disabled:!r||a,"aria-busy":a,onClick:()=>void p(),children:[a?e(M,{}):e(se,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(ge,{open:v,onOpenChange:(h)=>{if(!o)x(h)},children:[s(Ne,{render:e(N,{size:"sm",className:"h-9",variant:"outline",disabled:!r}),children:[e(_,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(fe,{children:[s(xe,{children:[e(he,{children:t("plugins.marketplace.addTitle")}),e(ve,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(h)=>{h.preventDefault(),z()},children:[e(we,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(U,{id:"marketplace-source",value:g,disabled:o,onChange:(h)=>c(h.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),y&&e("p",{role:"alert",className:"text-destructive text-sm",children:y}),s("div",{className:"flex justify-end gap-2",children:[e(N,{type:"button",variant:"ghost",disabled:o,onClick:()=>x(!1),children:t("plugins.marketplace.addCancel")}),s(N,{type:"submit",disabled:o||g.trim()==="",children:[o&&e(M,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Oe({onOpen:t,query:r}){let u=L(),p=i((c)=>c.marketplaceLoadErrors),a=i((c)=>c.loading)||!u,g=pe(r.trim().toLowerCase());return e(k,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${Q} flex flex-col gap-8`,children:[p.map((c)=>s("p",{className:"text-destructive px-2 text-xs",children:[c.marketplacePath,": ",c.message]},c.marketplacePath)),a?e(Se,{}):e(Ee,{query:g,onOpen:t})]})})}function Ls({cwd:t,active:r,extensions:u,onOpenCatalog:p}){let{t:a}=d(),g=Ze(),c=We(g),o=i((l)=>l.refresh),n=i((l)=>l.loading),v=i((l)=>l.error),[x,y]=C("plugins"),[b,z]=C({plugins:"",skills:""}),h=x==="skills"?b.skills:b.plugins,I=(l)=>z((D)=>({...D,[x]:l})),Y=ut((l)=>JSON.stringify([...new Set(l.sessionList.map((D)=>pt(D.cwd,l.projectContext)).filter((D)=>D!==null))].toSorted())),O=JSON.stringify([...new Set([pt(t,g.state.projectContext),...JSON.parse(Y)].filter((l)=>l!==null))].toSorted()),T=i((l)=>l.installed),H=a(x==="skills"?"plugins.skills.search":"plugins.search"),[P,j]=C(null),w=L();V(()=>{if(!r||!w)return;if(c.getState().loadedScope!==O)o(JSON.parse(O))},[r,w,o,O,c]),V(()=>{if(!w)return;return g.onSkillsChanged(()=>void o(void 0,{background:!0}))},[w,o,g]);let A=(l)=>{p?.(),y("plugins"),j(l)},J=(l)=>{p?.(),y(l),j(null)};return s("div",{className:"plugins-page @container flex h-full min-h-0 overflow-hidden [--navigation-row-height:30px] [--spacing:4px]",children:[e(Xt,{}),s("aside",{className:"bg-sidebar/40 flex w-44 shrink-0 flex-col border-e sm:w-60","aria-label":a("plugins.catalog.navigation"),children:[e("div",{className:"shrink-0 px-3 pt-3",children:e("div",{className:"flex h-9 items-center","data-plugin-sidebar-header":"",children:e("h2",{className:"text-sm leading-8 font-semibold",children:a("plugins.catalog.customize")})})}),s("nav",{"aria-label":a("plugins.manageTabs.aria"),className:"flex shrink-0 flex-col gap-1 px-2 pb-1",children:[u&&s(f,{className:`${m} h-8 gap-2 px-2`,active:u.active,onClick:u.onOpen,children:[e(te,{className:"size-4"}),e("span",{children:a("plugins.extensions")})]}),["plugins","skills"].map((l)=>s(f,{className:`${m} h-8 gap-2 px-2`,active:!u?.active&&x===l&&P===null,onClick:()=>J(l),children:[l==="plugins"?e(oe,{className:"size-4"}):e(ae,{className:"size-4"}),e("span",{children:a(`plugins.headings.${l}`)})]},l))]}),e("h3",{className:"text-muted-foreground mx-2 mt-1 mb-2 flex h-8 shrink-0 items-center px-2 text-xs font-medium",children:a("plugins.sections.installed")}),e(k,{className:"min-h-0 flex-1 pe-0",viewportClassName:"pe-0",children:e("nav",{"aria-label":a("plugins.sections.installed"),className:"px-2 pb-4",children:e(R,{children:!w||n&&T.length===0?s("div",{role:"status",className:"text-muted-foreground flex items-center gap-2 px-3 py-2 text-xs",children:[e(M,{className:"size-3.5",role:"presentation","aria-hidden":"true"}),a("plugins.detail.loading")]}):T.length===0?e("p",{className:"text-muted-foreground px-3 py-2 text-xs",children:a("plugins.sections.installedEmpty")}):T.map((l)=>s(f,{title:E(l.plugin),className:`${m} gap-2 px-2`,active:!u?.active&&P?.plugin.id===l.plugin.id,onClick:()=>A(l),children:[e(B,{name:l.plugin.name,className:"size-4 shrink-0"}),e("span",{className:"truncate",children:E(l.plugin)})]},l.plugin.id))})})})]}),e("main",{className:"toolbox-surface @container flex min-h-0 min-w-0 flex-1 flex-col","aria-label":a("plugins.catalog.content"),children:u?.active?u.content:s(X,{children:[P&&e(Qt,{entry:P,onBack:()=>J("plugins")},JSON.stringify([P.marketplace.name,P.marketplace.path,P.plugin.id,t])),s("div",{hidden:P!==null,className:P?"hidden":"flex min-h-0 flex-1 flex-col",children:[e(Ie,{children:e(Jt,{title:a(`plugins.headings.${x}`),children:s("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[s("div",{className:"relative w-52 max-w-full",children:[e(ce,{className:"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2"}),e(U,{className:"h-9 rounded-full ps-9 pe-9","aria-label":H,value:h,onChange:(l)=>I(l.target.value),placeholder:H}),h&&e(N,{className:"toolbox-search-clear absolute end-1 top-1/2 -translate-y-1/2",variant:"ghost",size:"icon-xs","aria-label":a("plugins.catalog.clearSearch"),onClick:()=>I(""),children:e(me,{})})]}),e(N,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":a("plugins.skills.refresh"),disabled:!w||n,onClick:()=>void o(void 0,{forceRefetch:!0}),children:n?e(M,{}):e(re,{})}),x==="plugins"&&e(ze,{})]})})}),(x==="plugins"||v)&&s("div",{className:"toolbox-content flex shrink-0 flex-col gap-4 pt-2 pb-6",children:[x==="plugins"&&e("p",{className:"text-muted-foreground text-sm",children:a("plugins.catalog.description")}),v&&s("div",{role:"alert",className:"text-destructive flex items-center justify-between gap-2 text-sm",children:[s("p",{children:[a("plugins.loadError.title"),": ",v]}),e(N,{size:"sm",className:"h-9",variant:"outline",disabled:n||!w,onClick:()=>void o(),children:a("plugins.loadError.retry")})]})]}),s("div",{className:"flex min-h-0 flex-1 flex-col",children:[e("div",{hidden:x!=="plugins",className:x==="plugins"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Oe,{query:b.plugins,onOpen:A})}),e("div",{hidden:x!=="skills",className:x==="skills"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Yt,{query:b.skills,ready:w,onOpenPlugin:A})})]})]})]})})]})}
|
|
1
|
+
import{m}from"./chunk-sgbn37kz.js";import{R,f}from"./chunk-6tj5e7fc.js";import{Jt}from"./chunk-hzhcajx1.js";import{We,d,Ze,ut,i}from"./chunk-3w6dv0nx.js";import{q,K,le,W,Z,_e,en}from"./chunk-p2tm6tv8.js";import{Se}from"./chunk-62wxvxsg.js";import{pt}from"./chunk-8v53bkyr.js";import{k}from"./chunk-qk1yqepm.js";import{Xt,B}from"./chunk-nrzkzvr0.js";import{Q,Ie}from"./chunk-e04g26qm.js";import{Qt}from"./chunk-3tvct295.js";import{Yt}from"./chunk-e7me5e6n.js";import{hasPluginStore as ee}from"@nyssance/codex-acp-v2/client";import{BlocksIcon as te,BookOpenIcon as ae,CheckIcon as ne,CircleArrowUpIcon as se,MoreVerticalIcon as ie,PlusIcon as _,PuzzleIcon as oe,RefreshCwIcon as re,SearchIcon as ce,Trash2Icon as de,XIcon as me}from"lucide-react";import{memo as ue,useDeferredValue as pe,useEffect as V,useMemo as G,useState as C}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as ge,DialogContent as fe,DialogDescription as ve,DialogHeader as xe,DialogTitle as he,DialogTrigger as Ne}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as ke,DropdownMenuContent as ye,DropdownMenuItem as be,DropdownMenuTrigger as Pe}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as U}from"@nyssance/shadcn/vega/components/ui/input";import{Label as we}from"@nyssance/shadcn/vega/components/ui/label";import{Spinner as M}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as e,jsxs as s,Fragment as X}from"react/jsx-runtime";function E(t){return t.interface?.displayName??t.name}function F(t){return t.interface?.shortDescription??""}function Ce({plugin:t,marketplace:r}){let{t:u}=d(),p=i((n)=>(t.id in n.busyIds)),a=i((n)=>n.installed.some((v)=>v.plugin.id===t.id)),g=i((n)=>n.install),c=t.availability!=="AVAILABLE"||t.installPolicy==="NOT_AVAILABLE",o=u(p?"plugins.card.installing":a?"plugins.sections.installed":"plugins.card.install");if(a&&!p)return e(ne,{className:"text-muted-foreground size-4 shrink-0","aria-label":o});return e(N,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0 rounded-full",disabled:p||a||c,"aria-label":o,title:c?u("plugins.disabledReason.unknown"):o,onClick:()=>void g({plugin:t,marketplace:r}).catch(()=>{}),children:p?e(M,{"aria-hidden":"true"}):e(_,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})}function De({plugin:t,marketplace:r,actions:u,onOpen:p}){let a=F(t),g=t.interface?.developerName,c=t.localVersion??t.version,o=[g,c?`v${c}`:null].filter(Boolean).join(" · ");return s(_e,{className:"toolbox-row relative",children:[e(N,{variant:"ghost",className:"absolute inset-0 z-0 size-full","data-hover-background":"none","aria-label":E(t),onClick:()=>p({plugin:t,marketplace:r})}),e(W,{className:"pointer-events-none relative translate-none! self-center!",children:e("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:e(B,{name:t.name})})}),s(K,{className:"pointer-events-none relative min-w-0",children:[e(en,{className:"mb-0.5",children:E(t)}),e(le,{className:"line-clamp-1",title:a,children:a||r.interface?.displayName||r.name}),o&&e(le,{"data-toolbox-metadata":"",children:o})]}),e(q,{className:"relative w-8 shrink-0 justify-center",children:u})]})}function L(){return ut((t)=>t.connection==="ready"&&ee(t.agent))}var S=48;function Me({marketplace:t,plugins:r,onOpen:u}){let{t:p}=d(),a=i((n)=>n.removeMarketplace),[g,c]=C(0),o=Math.min(g,Math.max(0,Math.ceil(r.length/S)-1));if(r.length===0)return null;return s("section",{className:"flex flex-col gap-4",children:[s("div",{className:"flex items-center gap-2",children:[e("h2",{className:"text-base font-medium",children:t.interface?.displayName??t.name}),e("span",{className:"text-muted-foreground text-xs",children:r.length}),t.path!==null&&s(ke,{children:[e(Pe,{render:e(N,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground ms-auto","aria-label":p("plugins.pageActions")}),children:e(ie,{})}),e(ye,{align:"end",className:"w-max min-w-[140px] whitespace-nowrap",children:s(be,{className:"text-destructive",onClick:()=>void a(t.name),children:[e(de,{className:"size-3.5"}),p("plugins.marketplace.remove")]})})]})]}),e(Z,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:r.slice(o*S,(o+1)*S).map((n)=>e(De,{onOpen:u,plugin:n,marketplace:t,actions:e(Ce,{plugin:n,marketplace:t})},n.remotePluginId??n.id))}),r.length>S&&s("div",{className:"flex items-center justify-end gap-2 px-2",children:[e(N,{variant:"outline",size:"sm",className:"h-9",disabled:o===0,onClick:()=>c(o-1),children:p("plugins.previousPage")}),s("span",{className:"text-muted-foreground text-xs",children:[o+1," / ",Math.ceil(r.length/S)]}),e(N,{variant:"outline",size:"sm",className:"h-9",disabled:(o+1)*S>=r.length,onClick:()=>c(o+1),children:p("plugins.nextPage")})]})]},t.name)}var Ee=ue(function({query:r,onOpen:u}){let{t:p}=d(),a=i((n)=>n.marketplaces),g=i((n)=>n.featuredPluginIds),c=G(()=>a.map((n)=>({marketplace:n,entries:n.plugins.map((v)=>({plugin:v,text:[v.name,E(v),F(v),v.interface?.developerName??"",...v.keywords].join(`
|
|
2
|
+
`).toLowerCase()}))})),[a]),o=G(()=>{let n=new Set(g);return c.map(({marketplace:v,entries:x})=>({marketplace:v,plugins:x.filter(({plugin:y,text:b})=>r===""?v.path!==null||n.has(y.id):b.includes(r)).map(({plugin:y})=>y)}))},[c,g,r]);return s(X,{children:[o.map(({marketplace:n,plugins:v})=>e(Me,{marketplace:n,plugins:v,onOpen:u},JSON.stringify([n.name,n.path,r]))),o.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:p("plugins.empty")})]})});function ze(){let{t}=d(),r=L(),u=i((h)=>h.addMarketplace),p=i((h)=>h.upgradeAll),a=i((h)=>h.upgrading),[g,c]=C(""),[o,n]=C(!1),[v,x]=C(!1),[y,b]=C(null),z=async()=>{let h=g.trim();if(!h||o)return;n(!0),b(null);try{await u({source:h}),c(""),x(!1)}catch(I){b(I instanceof Error?I.message:String(I))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(N,{size:"sm",className:"h-9",variant:"outline",disabled:!r||a,"aria-busy":a,onClick:()=>void p(),children:[a?e(M,{}):e(se,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(ge,{open:v,onOpenChange:(h)=>{if(!o)x(h)},children:[s(Ne,{render:e(N,{size:"sm",className:"h-9",variant:"outline",disabled:!r}),children:[e(_,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(fe,{children:[s(xe,{children:[e(he,{children:t("plugins.marketplace.addTitle")}),e(ve,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(h)=>{h.preventDefault(),z()},children:[e(we,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(U,{id:"marketplace-source",value:g,disabled:o,onChange:(h)=>c(h.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),y&&e("p",{role:"alert",className:"text-destructive text-sm",children:y}),s("div",{className:"flex justify-end gap-2",children:[e(N,{type:"button",variant:"ghost",disabled:o,onClick:()=>x(!1),children:t("plugins.marketplace.addCancel")}),s(N,{type:"submit",disabled:o||g.trim()==="",children:[o&&e(M,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Oe({onOpen:t,query:r}){let u=L(),p=i((c)=>c.marketplaceLoadErrors),a=i((c)=>c.loading)||!u,g=pe(r.trim().toLowerCase());return e(k,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${Q} flex flex-col gap-8`,children:[p.map((c)=>s("p",{className:"text-destructive px-2 text-xs",children:[c.marketplacePath,": ",c.message]},c.marketplacePath)),a?e(Se,{}):e(Ee,{query:g,onOpen:t})]})})}function Ls({cwd:t,active:r,extensions:u,onOpenCatalog:p}){let{t:a}=d(),g=Ze(),c=We(g),o=i((l)=>l.refresh),n=i((l)=>l.loading),v=i((l)=>l.error),[x,y]=C("plugins"),[b,z]=C({plugins:"",skills:""}),h=x==="skills"?b.skills:b.plugins,I=(l)=>z((D)=>({...D,[x]:l})),Y=ut((l)=>JSON.stringify([...new Set(l.sessionList.map((D)=>pt(D.cwd,l.projectContext)).filter((D)=>D!==null))].toSorted())),O=JSON.stringify([...new Set([pt(t,g.state.projectContext),...JSON.parse(Y)].filter((l)=>l!==null))].toSorted()),T=i((l)=>l.installed),H=a(x==="skills"?"plugins.skills.search":"plugins.search"),[P,j]=C(null),w=L();V(()=>{if(!r||!w)return;if(c.getState().loadedScope!==O)o(JSON.parse(O))},[r,w,o,O,c]),V(()=>{if(!w)return;return g.onSkillsChanged(()=>void o(void 0,{background:!0,catalog:!1}))},[w,o,g]);let A=(l)=>{p?.(),y("plugins"),j(l)},J=(l)=>{p?.(),y(l),j(null)};return s("div",{className:"plugins-page @container flex h-full min-h-0 overflow-hidden [--navigation-row-height:30px] [--spacing:4px]",children:[e(Xt,{}),s("aside",{className:"bg-sidebar/40 flex w-44 shrink-0 flex-col border-e sm:w-60","aria-label":a("plugins.catalog.navigation"),children:[e("div",{className:"shrink-0 px-3 pt-3",children:e("div",{className:"flex h-9 items-center","data-plugin-sidebar-header":"",children:e("h2",{className:"text-sm leading-8 font-semibold",children:a("plugins.catalog.customize")})})}),s("nav",{"aria-label":a("plugins.manageTabs.aria"),className:"flex shrink-0 flex-col gap-1 px-2 pb-1",children:[u&&s(f,{className:`${m} h-8 gap-2 px-2`,active:u.active,onClick:u.onOpen,children:[e(te,{className:"size-4"}),e("span",{children:a("plugins.extensions")})]}),["plugins","skills"].map((l)=>s(f,{className:`${m} h-8 gap-2 px-2`,active:!u?.active&&x===l&&P===null,onClick:()=>J(l),children:[l==="plugins"?e(oe,{className:"size-4"}):e(ae,{className:"size-4"}),e("span",{children:a(`plugins.headings.${l}`)})]},l))]}),e("h3",{className:"text-muted-foreground mx-2 mt-1 mb-2 flex h-8 shrink-0 items-center px-2 text-xs font-medium",children:a("plugins.sections.installed")}),e(k,{className:"min-h-0 flex-1 pe-0",viewportClassName:"pe-0",children:e("nav",{"aria-label":a("plugins.sections.installed"),className:"px-2 pb-4",children:e(R,{children:!w||n&&T.length===0?s("div",{role:"status",className:"text-muted-foreground flex items-center gap-2 px-3 py-2 text-xs",children:[e(M,{className:"size-3.5",role:"presentation","aria-hidden":"true"}),a("plugins.detail.loading")]}):T.length===0?e("p",{className:"text-muted-foreground px-3 py-2 text-xs",children:a("plugins.sections.installedEmpty")}):T.map((l)=>s(f,{title:E(l.plugin),className:`${m} gap-2 px-2`,active:!u?.active&&P?.plugin.id===l.plugin.id,onClick:()=>A(l),children:[e(B,{name:l.plugin.name,className:"size-4 shrink-0"}),e("span",{className:"truncate",children:E(l.plugin)})]},l.plugin.id))})})})]}),e("main",{className:"toolbox-surface @container flex min-h-0 min-w-0 flex-1 flex-col","aria-label":a("plugins.catalog.content"),children:u?.active?u.content:s(X,{children:[P&&e(Qt,{entry:P,onBack:()=>J("plugins")},JSON.stringify([P.marketplace.name,P.marketplace.path,P.plugin.id,t])),s("div",{hidden:P!==null,className:P?"hidden":"flex min-h-0 flex-1 flex-col",children:[e(Ie,{children:e(Jt,{title:a(`plugins.headings.${x}`),children:s("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[s("div",{className:"relative w-52 max-w-full",children:[e(ce,{className:"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2"}),e(U,{className:"h-9 rounded-full ps-9 pe-9","aria-label":H,value:h,onChange:(l)=>I(l.target.value),placeholder:H}),h&&e(N,{className:"toolbox-search-clear absolute end-1 top-1/2 -translate-y-1/2",variant:"ghost",size:"icon-xs","aria-label":a("plugins.catalog.clearSearch"),onClick:()=>I(""),children:e(me,{})})]}),e(N,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":a("plugins.skills.refresh"),disabled:!w||n,onClick:()=>void o(void 0,{forceRefetch:!0}),children:n?e(M,{}):e(re,{})}),x==="plugins"&&e(ze,{})]})})}),(x==="plugins"||v)&&s("div",{className:"toolbox-content flex shrink-0 flex-col gap-4 pt-2 pb-6",children:[x==="plugins"&&e("p",{className:"text-muted-foreground text-sm",children:a("plugins.catalog.description")}),v&&s("div",{role:"alert",className:"text-destructive flex items-center justify-between gap-2 text-sm",children:[s("p",{children:[a("plugins.loadError.title"),": ",v]}),e(N,{size:"sm",className:"h-9",variant:"outline",disabled:n||!w,onClick:()=>void o(),children:a("plugins.loadError.retry")})]})]}),s("div",{className:"flex min-h-0 flex-1 flex-col",children:[e("div",{hidden:x!=="plugins",className:x==="plugins"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Oe,{query:b.plugins,onOpen:A})}),e("div",{hidden:x!=="skills",className:x==="skills"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Yt,{query:b.skills,ready:w,onOpenPlugin:A})})]})]})]})})]})}
|
|
3
3
|
export{Ls};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{me}from"./chunk-29s4mnfw.js";import{b}from"./chunk-3g9qb7vq.js";import{w}from"./chunk-pdmayjan.js";import{ln}from"./chunk-y6p8xspr.js";import{Ne}from"./chunk-
|
|
1
|
+
import{me}from"./chunk-29s4mnfw.js";import{b}from"./chunk-3g9qb7vq.js";import{w}from"./chunk-pdmayjan.js";import{ln}from"./chunk-y6p8xspr.js";import{Ne}from"./chunk-bcdw682e.js";import{xn}from"./chunk-3gnn1v68.js";import{Le}from"./chunk-wnydsth6.js";import{Re}from"./chunk-vvkp0jqa.js";import{yn}from"./chunk-npvcy4tw.js";import{hn,vn}from"./chunk-gnctm097.js";import{jsx as t,jsxs as d,Fragment as f}from"react/jsx-runtime";var n;function C(){return n??=xn(),n}function P(){let o=ln();return t(vn,{sessionId:o.session.id,enabled:o.inputReady&&!o.sending&&!o.shellMode,onMention:o.addMention,onBusyChange:o.setAdding})}function zs({client:o,providers:m,catalog:i,shellCommands:p=!0,modelMenu:l,children:a,...s}){let{session:e}=s,c=w(o.store,(r)=>r.modelRecovery[e.id]??!1);return d(f,{children:[c&&!me(e.error?.error)&&t(yn,{client:o,session:e,providers:m??C(),catalog:i},e.id),d(Ne,{modelMenu:l??{defaultGroup:b,catalog:(r)=>Le(r,i),headerAction:t(Re,{})},...s,attachmentPolicy:hn,onShellCommand:p?(r)=>o.executeShell(e.id,r):void 0,children:[t(P,{}),a]})]})}
|
|
2
2
|
export{zs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ne}from"../../chunk-
|
|
1
|
+
import{Ne}from"../../chunk-bcdw682e.js";import"../../chunk-gdavg2hq.js";import"../../chunk-jq6qs3s6.js";import"../../chunk-x20dy83s.js";import"../../chunk-rtbpfasb.js";import"../../chunk-y6p8xspr.js";import"../../chunk-rkejggyx.js";import"../../chunk-23r426sm.js";import"../../chunk-wjd2hpnd.js";import"../../chunk-jm6y0edw.js";import"../../chunk-81jejgvs.js";import"../../chunk-dtgbgwby.js";import"../../chunk-1hmt6w4w.js";import"../../chunk-e7ndpy02.js";import"../../chunk-2nb1475h.js";import"../../chunk-p781sb6h.js";import"../../chunk-ffs5nkt0.js";import"../../chunk-abgdqy92.js";import"../../chunk-g7cc7gdn.js";import"../../chunk-933h9gnv.js";import"../../chunk-r8expjyy.js";import"../../chunk-1gv49jt9.js";import"../../chunk-z1qcgb6b.js";import"../../chunk-qdcznn2t.js";import"../../chunk-pk931bpm.js";import"../../chunk-jg4c3zg4.js";import"../../chunk-6xap6hvz.js";import"../../chunk-41yz7txv.js";import"../../chunk-q5qqhqw4.js";import"../../chunk-8y706gz3.js";import"../../chunk-3a3ecayr.js";import"../../chunk-78vckhxt.js";import"../../chunk-gyw21vnb.js";import"../../chunk-n3sm0834.js";import"../../chunk-df9aqj1m.js";import"../../chunk-s6y31dcb.js";import"../../chunk-9q6hz47j.js";import"../../chunk-6283nzqs.js";import"../../chunk-86821qec.js";import"../../chunk-26w51q10.js";import"../../chunk-rx84h0c2.js";import"../../chunk-56rx2rmj.js";import"../../chunk-2cfhvb3k.js";import"../../chunk-pdmayjan.js";import"../../chunk-wf7kfk3p.js";export{Ne as Composer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_s}from"../chunk-
|
|
1
|
+
import{_s}from"../chunk-fvwrc97h.js";import"../chunk-bej9z041.js";import"../chunk-85tzkdsj.js";import"../chunk-04frqm59.js";import"../chunk-b4kh5nns.js";import"../chunk-rh2yx0xq.js";import"../chunk-gea1q14z.js";import"../chunk-7ac4g54f.js";import"../chunk-04c5k3qr.js";import"../chunk-bane0xc8.js";import"../chunk-8q9hq3mg.js";import"../chunk-ayademz2.js";import"../chunk-tc3t2sgb.js";import"../chunk-c8wdf20g.js";import"../chunk-8ngg5vs4.js";import"../chunk-8y60kexq.js";import"../chunk-tec9yhsm.js";import"../chunk-csfqkzmr.js";import"../chunk-tcs1a1hk.js";import"../chunk-evygj5ka.js";import"../chunk-c1pvvk0x.js";import"../chunk-g61xf0ma.js";import"../chunk-kh3af9mq.js";import"../chunk-62qtrk0p.js";import"../chunk-2dm51ksz.js";import"../chunk-vgscp6dr.js";import"../chunk-rr9kc3n8.js";import"../chunk-16db8fh2.js";import"../chunk-rb4p3h5b.js";import"../chunk-gawrkkbf.js";import"../chunk-3hjcpcnv.js";import"../chunk-6dnb0t84.js";import"../chunk-v8x5atmn.js";import"../chunk-5s85tvas.js";import"../chunk-bcdw682e.js";import"../chunk-gdavg2hq.js";import"../chunk-jq6qs3s6.js";import"../chunk-x20dy83s.js";import"../chunk-rtbpfasb.js";import"../chunk-y6p8xspr.js";import"../chunk-rkejggyx.js";import"../chunk-23r426sm.js";import"../chunk-wjd2hpnd.js";import"../chunk-jm6y0edw.js";import"../chunk-81jejgvs.js";import"../chunk-dtgbgwby.js";import"../chunk-1hmt6w4w.js";import"../chunk-e7ndpy02.js";import"../chunk-2nb1475h.js";import"../chunk-p781sb6h.js";import"../chunk-ffs5nkt0.js";import"../chunk-easm0z49.js";import"../chunk-swt6dntp.js";import"../chunk-k4xsxxy7.js";import"../chunk-6ehhap9k.js";import"../chunk-abgdqy92.js";import"../chunk-g7cc7gdn.js";import"../chunk-933h9gnv.js";import"../chunk-r8expjyy.js";import"../chunk-1gv49jt9.js";import"../chunk-z1qcgb6b.js";import"../chunk-qdcznn2t.js";import"../chunk-pk931bpm.js";import"../chunk-jg4c3zg4.js";import"../chunk-6xap6hvz.js";import"../chunk-41yz7txv.js";import"../chunk-b42vv8f2.js";import"../chunk-q5qqhqw4.js";import"../chunk-8y706gz3.js";import"../chunk-3a3ecayr.js";import"../chunk-78vckhxt.js";import"../chunk-gyw21vnb.js";import"../chunk-n3sm0834.js";import"../chunk-df9aqj1m.js";import"../chunk-s6y31dcb.js";import"../chunk-9q6hz47j.js";import"../chunk-6283nzqs.js";import"../chunk-86821qec.js";import"../chunk-2zy75522.js";import"../chunk-s8djv2dy.js";import"../chunk-at75m9hq.js";import"../chunk-y8fmawc6.js";import"../chunk-bydxp3zj.js";import"../chunk-m8pkmbtf.js";import"../chunk-86r89vrt.js";import"../chunk-mhv75thj.js";import"../chunk-wkrnbk0p.js";import"../chunk-ztrfygh5.js";import"../chunk-djd3sjp9.js";import"../chunk-26w51q10.js";import"../chunk-1qjhvkg0.js";import"../chunk-s6b28p84.js";import"../chunk-rx84h0c2.js";import"../chunk-56rx2rmj.js";import"../chunk-f73x23f9.js";import"../chunk-1ycyexae.js";import"../chunk-2cfhvb3k.js";import"../chunk-tzczzqde.js";import"../chunk-q46z21zs.js";import"../chunk-814h2ja2.js";import"../chunk-38bpmgjd.js";import"../chunk-6my4ybpw.js";import"../chunk-1r4y3pfg.js";import"../chunk-tj4b0s68.js";import"../chunk-61awcdaq.js";import"../chunk-d8f6avcz.js";import"../chunk-hygvdjq6.js";import"../chunk-5hk3k14h.js";import"../chunk-pxv38ttf.js";import"../chunk-vhxr0c4c.js";import"../chunk-g8w06bdx.js";import"../chunk-pdmayjan.js";import"../chunk-wf7kfk3p.js";import"../chunk-2a4pq98d.js";import"../chunk-nmd5x501.js";export{_s as ConversationView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-wf7kfk3p.js";import"../chunk-pdmayjan.js";import"../chunk-s6y31dcb.js";import"../chunk-df9aqj1m.js";import"../chunk-9q6hz47j.js";import"../chunk-6283nzqs.js";import"../chunk-86821qec.js";import"../chunk-n3sm0834.js";import"../chunk-56rx2rmj.js";import"../chunk-rx84h0c2.js";import"../chunk-qdcznn2t.js";import"../chunk-gyw21vnb.js";import"../chunk-78vckhxt.js";import"../chunk-3a3ecayr.js";import"../chunk-8y706gz3.js";import"../chunk-26w51q10.js";import"../chunk-q5qqhqw4.js";import"../chunk-g7cc7gdn.js";import"../chunk-2cfhvb3k.js";import"../chunk-z1qcgb6b.js";import"../chunk-41yz7txv.js";import"../chunk-r8expjyy.js";import"../chunk-1gv49jt9.js";import{wn,e}from"../chunk-abgdqy92.js";import"../chunk-e7ndpy02.js";import{ln}from"../chunk-y6p8xspr.js";import{r,J,pn,Vs,js,mn,$s}from"../chunk-dtgbgwby.js";import{cn}from"../chunk-rkejggyx.js";import"../chunk-ffs5nkt0.js";import{Gi,Ye,vt,un}from"../chunk-81jejgvs.js";import{on,sn}from"../chunk-jq6qs3s6.js";import"../chunk-gdavg2hq.js";import"../chunk-6xap6hvz.js";import"../chunk-jg4c3zg4.js";import"../chunk-pk931bpm.js";import{X,y,Y}from"../chunk-p781sb6h.js";import{gn}from"../chunk-1hmt6w4w.js";import"../chunk-jm6y0edw.js";import"../chunk-933h9gnv.js";import{dn}from"../chunk-wjd2hpnd.js";import{an}from"../chunk-rtbpfasb.js";import"../chunk-x20dy83s.js";import"../chunk-23r426sm.js";import{et,fn}from"../chunk-2nb1475h.js";import{Ne}from"../chunk-
|
|
1
|
+
import"../chunk-wf7kfk3p.js";import"../chunk-pdmayjan.js";import"../chunk-s6y31dcb.js";import"../chunk-df9aqj1m.js";import"../chunk-9q6hz47j.js";import"../chunk-6283nzqs.js";import"../chunk-86821qec.js";import"../chunk-n3sm0834.js";import"../chunk-56rx2rmj.js";import"../chunk-rx84h0c2.js";import"../chunk-qdcznn2t.js";import"../chunk-gyw21vnb.js";import"../chunk-78vckhxt.js";import"../chunk-3a3ecayr.js";import"../chunk-8y706gz3.js";import"../chunk-26w51q10.js";import"../chunk-q5qqhqw4.js";import"../chunk-g7cc7gdn.js";import"../chunk-2cfhvb3k.js";import"../chunk-z1qcgb6b.js";import"../chunk-41yz7txv.js";import"../chunk-r8expjyy.js";import"../chunk-1gv49jt9.js";import{wn,e}from"../chunk-abgdqy92.js";import"../chunk-e7ndpy02.js";import{ln}from"../chunk-y6p8xspr.js";import{r,J,pn,Vs,js,mn,$s}from"../chunk-dtgbgwby.js";import{cn}from"../chunk-rkejggyx.js";import"../chunk-ffs5nkt0.js";import{Gi,Ye,vt,un}from"../chunk-81jejgvs.js";import{on,sn}from"../chunk-jq6qs3s6.js";import"../chunk-gdavg2hq.js";import"../chunk-6xap6hvz.js";import"../chunk-jg4c3zg4.js";import"../chunk-pk931bpm.js";import{X,y,Y}from"../chunk-p781sb6h.js";import{gn}from"../chunk-1hmt6w4w.js";import"../chunk-jm6y0edw.js";import"../chunk-933h9gnv.js";import{dn}from"../chunk-wjd2hpnd.js";import{an}from"../chunk-rtbpfasb.js";import"../chunk-x20dy83s.js";import"../chunk-23r426sm.js";import{et,fn}from"../chunk-2nb1475h.js";import{Ne}from"../chunk-bcdw682e.js";import"../chunk-nmd5x501.js";import"../chunk-2a4pq98d.js";import"../chunk-hygvdjq6.js";import"../chunk-38bpmgjd.js";import"../chunk-d8f6avcz.js";import"../chunk-pxv38ttf.js";import"../chunk-g8w06bdx.js";import"../chunk-5hk3k14h.js";import"../chunk-vhxr0c4c.js";import"../chunk-61awcdaq.js";import"../chunk-6my4ybpw.js";import"../chunk-tj4b0s68.js";import"../chunk-1r4y3pfg.js";import"../chunk-814h2ja2.js";import"../chunk-s8djv2dy.js";import"../chunk-b42vv8f2.js";import"../chunk-62qtrk0p.js";import"../chunk-1ycyexae.js";import"../chunk-f73x23f9.js";import"../chunk-s6b28p84.js";import"../chunk-3hjcpcnv.js";import"../chunk-evygj5ka.js";import"../chunk-v8x5atmn.js";import"../chunk-g61xf0ma.js";import"../chunk-6dnb0t84.js";import"../chunk-vgscp6dr.js";import"../chunk-c1pvvk0x.js";import"../chunk-tcs1a1hk.js";import"../chunk-at75m9hq.js";import"../chunk-2dm51ksz.js";import"../chunk-kh3af9mq.js";import"../chunk-rb4p3h5b.js";import"../chunk-csfqkzmr.js";import"../chunk-5s85tvas.js";import"../chunk-ztrfygh5.js";import"../chunk-djd3sjp9.js";import"../chunk-wkrnbk0p.js";import"../chunk-mhv75thj.js";import"../chunk-1qjhvkg0.js";import"../chunk-m8pkmbtf.js";import"../chunk-86r89vrt.js";import"../chunk-bydxp3zj.js";import"../chunk-2zy75522.js";import"../chunk-q46z21zs.js";import"../chunk-tzczzqde.js";import"../chunk-gawrkkbf.js";import"../chunk-rr9kc3n8.js";import"../chunk-tec9yhsm.js";import"../chunk-16db8fh2.js";import"../chunk-8y60kexq.js";import"../chunk-8ngg5vs4.js";import"../chunk-c8wdf20g.js";import"../chunk-bane0xc8.js";import{Jo}from"../chunk-85tzkdsj.js";import{Bt}from"../chunk-bej9z041.js";import"../chunk-ayademz2.js";import"../chunk-rh2yx0xq.js";import"../chunk-gea1q14z.js";import"../chunk-8q9hq3mg.js";import"../chunk-b4kh5nns.js";import{Ps,Gt}from"../chunk-04frqm59.js";import"../chunk-y8fmawc6.js";import{zt,ei,Vt}from"../chunk-7ac4g54f.js";import"../chunk-6ehhap9k.js";import"../chunk-k4xsxxy7.js";import"../chunk-swt6dntp.js";import"../chunk-easm0z49.js";import{Ke,dt,we}from"../chunk-tc3t2sgb.js";import{jt}from"../chunk-04c5k3qr.js";import{_s}from"../chunk-fvwrc97h.js";import{Ss}from"../chunk-m944rgn9.js";import{Is}from"../chunk-5aqqqsa3.js";export{we as ActionCard,Ne as Composer,Is as ConnectionNotice,Bt as ConversationBody,wn as ConversationProvider,Gt as ConversationSearch,_s as ConversationView,Vt as DiffModal,Ss as DraftProjectPicker,dt as ElicitationForm,Gi as LONG_TEXT_LENGTH,gn as ModelMenu,dn as PermissionModeMenu,jt as SessionActions,Jo as SubagentSessions,fn as UsageMeter,Y as currentName,r as drafts,Vs as exportDraft,cn as fileItems,ei as filePatch,X as flattenSelectOptions,on as formatMentionUri,js as importDraft,Ke as isFormAction,Ye as isPastedTextAttachment,et as limitWindowLabel,sn as mentionDisplayName,Ps as openConversationSearch,zt as openDiffModal,un as pasteLongText,mn as registerComposerWriter,y as selectOption,$s as setComposerDraft,pn as trackDraftAttachmentWrite,J as updateDraftAttachments,ln as useComposer,an as useComposerPrediction,e as useConversation,vt as writePastedTextAttachment};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{zs}from"../chunk-
|
|
1
|
+
import{zs}from"../chunk-v4qzxq4v.js";import"../chunk-bcdw682e.js";import"../chunk-gdavg2hq.js";import"../chunk-jq6qs3s6.js";import"../chunk-x20dy83s.js";import"../chunk-rtbpfasb.js";import"../chunk-y6p8xspr.js";import"../chunk-rkejggyx.js";import"../chunk-23r426sm.js";import"../chunk-wjd2hpnd.js";import"../chunk-jm6y0edw.js";import"../chunk-81jejgvs.js";import"../chunk-dtgbgwby.js";import"../chunk-1hmt6w4w.js";import"../chunk-e7ndpy02.js";import"../chunk-2nb1475h.js";import"../chunk-p781sb6h.js";import"../chunk-ffs5nkt0.js";import"../chunk-gnctm097.js";import"../chunk-npvcy4tw.js";import"../chunk-3gnn1v68.js";import"../chunk-kj3t4mqf.js";import"../chunk-n6dqwdg5.js";import"../chunk-vvkp0jqa.js";import"../chunk-abgdqy92.js";import"../chunk-wnydsth6.js";import"../chunk-38hvm5ca.js";import"../chunk-2easwd1n.js";import"../chunk-g7cc7gdn.js";import"../chunk-933h9gnv.js";import"../chunk-r8expjyy.js";import"../chunk-1gv49jt9.js";import"../chunk-z1qcgb6b.js";import"../chunk-qdcznn2t.js";import"../chunk-pk931bpm.js";import"../chunk-jg4c3zg4.js";import"../chunk-6xap6hvz.js";import"../chunk-41yz7txv.js";import"../chunk-3g9qb7vq.js";import"../chunk-29s4mnfw.js";import"../chunk-ecaedwda.js";import"../chunk-6wkcqhkk.js";import"../chunk-kztrgv9y.js";import"../chunk-q9mh8x4r.js";import"../chunk-bv14x0e8.js";import"../chunk-r6c9r5yy.js";import"../chunk-bfwft1b8.js";import"../chunk-q9y0wjwp.js";import"../chunk-nh56sb8e.js";import"../chunk-e2qjbqq2.js";import"../chunk-r6ns1457.js";import"../chunk-3chhwwwy.js";import"../chunk-cvx7r35k.js";import"../chunk-fhjk81r9.js";import"../chunk-b42vv8f2.js";import"../chunk-q5qqhqw4.js";import"../chunk-8y706gz3.js";import"../chunk-3a3ecayr.js";import"../chunk-78vckhxt.js";import"../chunk-gyw21vnb.js";import"../chunk-n3sm0834.js";import"../chunk-df9aqj1m.js";import"../chunk-s6y31dcb.js";import"../chunk-9q6hz47j.js";import"../chunk-6283nzqs.js";import"../chunk-86821qec.js";import"../chunk-26w51q10.js";import"../chunk-rx84h0c2.js";import"../chunk-56rx2rmj.js";import"../chunk-2cfhvb3k.js";import"../chunk-pdmayjan.js";import"../chunk-wf7kfk3p.js";export{zs as DesktopComposer};
|
package/dist/desktop/desktop.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-b42vv8f2.js";import"../chunk-fhjk81r9.js";import"../chunk-cvx7r35k.js";import"../chunk-3chhwwwy.js";import"../chunk-ecaedwda.js";import"../chunk-r6ns1457.js";import"../chunk-6wkcqhkk.js";import"../chunk-bv14x0e8.js";import"../chunk-q9mh8x4r.js";import"../chunk-kztrgv9y.js";import"../chunk-nh56sb8e.js";import"../chunk-bfwft1b8.js";import"../chunk-q9y0wjwp.js";import"../chunk-r6c9r5yy.js";import"../chunk-e2qjbqq2.js";import"../chunk-29s4mnfw.js";import"../chunk-3g9qb7vq.js";import"../chunk-s6y31dcb.js";import"../chunk-df9aqj1m.js";import"../chunk-9q6hz47j.js";import"../chunk-6283nzqs.js";import"../chunk-86821qec.js";import"../chunk-n3sm0834.js";import"../chunk-56rx2rmj.js";import"../chunk-rx84h0c2.js";import"../chunk-qdcznn2t.js";import"../chunk-gyw21vnb.js";import"../chunk-78vckhxt.js";import"../chunk-3a3ecayr.js";import"../chunk-8y706gz3.js";import"../chunk-26w51q10.js";import"../chunk-q5qqhqw4.js";import"../chunk-g7cc7gdn.js";import"../chunk-2cfhvb3k.js";import"../chunk-z1qcgb6b.js";import"../chunk-41yz7txv.js";import"../chunk-r8expjyy.js";import"../chunk-1gv49jt9.js";import"../chunk-wf7kfk3p.js";import"../chunk-pdmayjan.js";import"../chunk-abgdqy92.js";import"../chunk-e7ndpy02.js";import"../chunk-y6p8xspr.js";import"../chunk-dtgbgwby.js";import"../chunk-rkejggyx.js";import"../chunk-ffs5nkt0.js";import"../chunk-81jejgvs.js";import"../chunk-jq6qs3s6.js";import"../chunk-gdavg2hq.js";import"../chunk-6xap6hvz.js";import"../chunk-jg4c3zg4.js";import"../chunk-pk931bpm.js";import"../chunk-p781sb6h.js";import"../chunk-1hmt6w4w.js";import"../chunk-jm6y0edw.js";import"../chunk-933h9gnv.js";import"../chunk-wjd2hpnd.js";import"../chunk-rtbpfasb.js";import"../chunk-x20dy83s.js";import"../chunk-23r426sm.js";import"../chunk-2nb1475h.js";import"../chunk-
|
|
1
|
+
import"../chunk-b42vv8f2.js";import"../chunk-fhjk81r9.js";import"../chunk-cvx7r35k.js";import"../chunk-3chhwwwy.js";import"../chunk-ecaedwda.js";import"../chunk-r6ns1457.js";import"../chunk-6wkcqhkk.js";import"../chunk-bv14x0e8.js";import"../chunk-q9mh8x4r.js";import"../chunk-kztrgv9y.js";import"../chunk-nh56sb8e.js";import"../chunk-bfwft1b8.js";import"../chunk-q9y0wjwp.js";import"../chunk-r6c9r5yy.js";import"../chunk-e2qjbqq2.js";import"../chunk-29s4mnfw.js";import"../chunk-3g9qb7vq.js";import"../chunk-s6y31dcb.js";import"../chunk-df9aqj1m.js";import"../chunk-9q6hz47j.js";import"../chunk-6283nzqs.js";import"../chunk-86821qec.js";import"../chunk-n3sm0834.js";import"../chunk-56rx2rmj.js";import"../chunk-rx84h0c2.js";import"../chunk-qdcznn2t.js";import"../chunk-gyw21vnb.js";import"../chunk-78vckhxt.js";import"../chunk-3a3ecayr.js";import"../chunk-8y706gz3.js";import"../chunk-26w51q10.js";import"../chunk-q5qqhqw4.js";import"../chunk-g7cc7gdn.js";import"../chunk-2cfhvb3k.js";import"../chunk-z1qcgb6b.js";import"../chunk-41yz7txv.js";import"../chunk-r8expjyy.js";import"../chunk-1gv49jt9.js";import"../chunk-wf7kfk3p.js";import"../chunk-pdmayjan.js";import"../chunk-abgdqy92.js";import"../chunk-e7ndpy02.js";import"../chunk-y6p8xspr.js";import"../chunk-dtgbgwby.js";import"../chunk-rkejggyx.js";import"../chunk-ffs5nkt0.js";import"../chunk-81jejgvs.js";import"../chunk-jq6qs3s6.js";import"../chunk-gdavg2hq.js";import"../chunk-6xap6hvz.js";import"../chunk-jg4c3zg4.js";import"../chunk-pk931bpm.js";import"../chunk-p781sb6h.js";import"../chunk-1hmt6w4w.js";import"../chunk-jm6y0edw.js";import"../chunk-933h9gnv.js";import"../chunk-wjd2hpnd.js";import"../chunk-rtbpfasb.js";import"../chunk-x20dy83s.js";import"../chunk-23r426sm.js";import"../chunk-2nb1475h.js";import"../chunk-bcdw682e.js";import"../chunk-kj3t4mqf.js";import"../chunk-2easwd1n.js";import"../chunk-38hvm5ca.js";import"../chunk-3gnn1v68.js";import{Xi,kn,Le}from"../chunk-wnydsth6.js";import{Re}from"../chunk-vvkp0jqa.js";import{Cn}from"../chunk-n6dqwdg5.js";import{yn}from"../chunk-npvcy4tw.js";import{hn,vn}from"../chunk-gnctm097.js";import{zs}from"../chunk-v4qzxq4v.js";import{Qs}from"../chunk-2c2a1wvg.js";export{zs as DesktopComposer,Cn as DraftModelSelect,Xi as ModelIcon,yn as ModelRecovery,Re as ModelSettingsAction,vn as NativeFileDrop,Qs as desktopLoadImage,kn as modelTriggerLabel,hn as nativeAttachmentPolicy,Le as presentModelCatalog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Se}from"../chunk-
|
|
1
|
+
import{Se}from"../chunk-62wxvxsg.js";import"../chunk-p2tm6tv8.js";import"../chunk-3w6dv0nx.js";import"../chunk-sjtfxn55.js";import"../chunk-8hygfx41.js";import"../chunk-sgbn37kz.js";export{Se as CatalogSkeleton};
|
package/dist/plugins/host.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{We,Ds,d,Ze,ut,i,Qe}from"../chunk-
|
|
1
|
+
import{We,Ds,d,Ze,ut,i,Qe}from"../chunk-3w6dv0nx.js";import"../chunk-sjtfxn55.js";export{Ds as PluginsProvider,We as pluginsStore,Qe as report,Ze as usePluginsClient,ut as usePluginsClientState,d as usePluginsHost,i as usePluginsStore};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Qt}from"../chunk-
|
|
1
|
+
import{Qt}from"../chunk-3tvct295.js";import"../chunk-nrzkzvr0.js";import"../chunk-55ya3102.js";import"../chunk-3w6dv0nx.js";import"../chunk-e04g26qm.js";import"../chunk-sjtfxn55.js";import"../chunk-qk1yqepm.js";import"../chunk-wxh1m3gg.js";import"../chunk-bydxp3zj.js";import"../chunk-m8pkmbtf.js";import"../chunk-86r89vrt.js";import"../chunk-mhv75thj.js";import"../chunk-wkrnbk0p.js";import"../chunk-ztrfygh5.js";import"../chunk-djd3sjp9.js";import"../chunk-26w51q10.js";import"../chunk-1qjhvkg0.js";import"../chunk-s6b28p84.js";import"../chunk-rx84h0c2.js";import"../chunk-56rx2rmj.js";import"../chunk-f73x23f9.js";import"../chunk-1ycyexae.js";import"../chunk-2cfhvb3k.js";import"../chunk-g8w06bdx.js";import"../chunk-pdmayjan.js";import"../chunk-wf7kfk3p.js";export{Qt as PluginDetailPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ls}from"../chunk-
|
|
1
|
+
import{Ls}from"../chunk-t9e1sj53.js";import"../chunk-3tvct295.js";import"../chunk-hzhcajx1.js";import"../chunk-nrzkzvr0.js";import"../chunk-e7me5e6n.js";import"../chunk-55ya3102.js";import"../chunk-62wxvxsg.js";import"../chunk-p2tm6tv8.js";import"../chunk-3w6dv0nx.js";import"../chunk-e04g26qm.js";import"../chunk-8v53bkyr.js";import"../chunk-sjtfxn55.js";import"../chunk-qk1yqepm.js";import"../chunk-wxh1m3gg.js";import"../chunk-6tj5e7fc.js";import"../chunk-8hygfx41.js";import"../chunk-sgbn37kz.js";import"../chunk-q01vmp9m.js";import"../chunk-ykz0h1r0.js";import"../chunk-f4h84pav.js";import"../chunk-bydxp3zj.js";import"../chunk-m8pkmbtf.js";import"../chunk-86r89vrt.js";import"../chunk-mhv75thj.js";import"../chunk-wkrnbk0p.js";import"../chunk-ztrfygh5.js";import"../chunk-djd3sjp9.js";import"../chunk-26w51q10.js";import"../chunk-1qjhvkg0.js";import"../chunk-s6b28p84.js";import"../chunk-rx84h0c2.js";import"../chunk-56rx2rmj.js";import"../chunk-f73x23f9.js";import"../chunk-1ycyexae.js";import"../chunk-2cfhvb3k.js";import"../chunk-g8w06bdx.js";import"../chunk-pdmayjan.js";import"../chunk-wf7kfk3p.js";export{Ls as PluginsPage};
|
package/dist/plugins/plugins.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Jt}from"../chunk-hzhcajx1.js";import{di,tn}from"../chunk-
|
|
1
|
+
import{Jt}from"../chunk-hzhcajx1.js";import{di,tn}from"../chunk-sjtfxn55.js";import{We,Ds,d,Ze,ut,i,Qe}from"../chunk-3w6dv0nx.js";import"../chunk-sgbn37kz.js";import"../chunk-8hygfx41.js";import{q,K,le,W,Z,_e,en}from"../chunk-p2tm6tv8.js";import{Se}from"../chunk-62wxvxsg.js";import{pt}from"../chunk-8v53bkyr.js";import{k}from"../chunk-qk1yqepm.js";import"../chunk-wxh1m3gg.js";import{Xt,li,B}from"../chunk-nrzkzvr0.js";import"../chunk-2cfhvb3k.js";import"../chunk-1ycyexae.js";import"../chunk-f73x23f9.js";import"../chunk-56rx2rmj.js";import"../chunk-rx84h0c2.js";import"../chunk-g8w06bdx.js";import"../chunk-wf7kfk3p.js";import"../chunk-pdmayjan.js";import"../chunk-s6b28p84.js";import"../chunk-ztrfygh5.js";import"../chunk-26w51q10.js";import"../chunk-djd3sjp9.js";import"../chunk-wkrnbk0p.js";import"../chunk-mhv75thj.js";import"../chunk-1qjhvkg0.js";import"../chunk-m8pkmbtf.js";import"../chunk-86r89vrt.js";import"../chunk-bydxp3zj.js";import{ci,ke}from"../chunk-55ya3102.js";import{Q,Pe,Ie}from"../chunk-e04g26qm.js";import{Qt}from"../chunk-3tvct295.js";import"../chunk-ykz0h1r0.js";import"../chunk-f4h84pav.js";import"../chunk-q01vmp9m.js";import"../chunk-6tj5e7fc.js";import{Yt}from"../chunk-e7me5e6n.js";import{Ls}from"../chunk-t9e1sj53.js";import"../chunk-kj3t4mqf.js";import{Fs}from"../chunk-qejm75d7.js";export{Jt as CatalogHeader,Se as CatalogSkeleton,q as ItemActions,K as ItemContent,le as ItemDescription,W as ItemMedia,k as Pane,_e as PanelItem,en as PanelItemTitle,Z as PanelList,Qt as PluginDetailPage,B as PluginIcon,Xt as PluginIconDefinitions,Ls as PluginsPage,Ds as PluginsProvider,ke as SkillDocument,Yt as SkillsTab,Ie as ToolboxPageHeader,tn as createPluginsStore,di as installParams,pt as newChatDirectory,li as pluginIconSrc,We as pluginsStore,Fs as readSkillDocument,Qe as report,ci as skillMarkdownBody,Q as toolboxContentClassName,Pe as toolboxDialogClassName,Ze as usePluginsClient,ut as usePluginsClientState,d as usePluginsHost,i as usePluginsStore};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ci,ke}from"../chunk-
|
|
1
|
+
import{ci,ke}from"../chunk-55ya3102.js";import"../chunk-3w6dv0nx.js";import"../chunk-sjtfxn55.js";import"../chunk-qk1yqepm.js";import"../chunk-bydxp3zj.js";import"../chunk-m8pkmbtf.js";import"../chunk-86r89vrt.js";import"../chunk-mhv75thj.js";import"../chunk-wkrnbk0p.js";import"../chunk-ztrfygh5.js";import"../chunk-djd3sjp9.js";import"../chunk-26w51q10.js";import"../chunk-1qjhvkg0.js";import"../chunk-s6b28p84.js";import"../chunk-rx84h0c2.js";import"../chunk-56rx2rmj.js";import"../chunk-f73x23f9.js";import"../chunk-1ycyexae.js";import"../chunk-2cfhvb3k.js";import"../chunk-g8w06bdx.js";import"../chunk-pdmayjan.js";import"../chunk-wf7kfk3p.js";export{ke as SkillDocument,ci as skillMarkdownBody};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Yt}from"../chunk-
|
|
1
|
+
import{Yt}from"../chunk-e7me5e6n.js";import"../chunk-55ya3102.js";import"../chunk-62wxvxsg.js";import"../chunk-p2tm6tv8.js";import"../chunk-3w6dv0nx.js";import"../chunk-e04g26qm.js";import"../chunk-sjtfxn55.js";import"../chunk-qk1yqepm.js";import"../chunk-8hygfx41.js";import"../chunk-sgbn37kz.js";import"../chunk-bydxp3zj.js";import"../chunk-m8pkmbtf.js";import"../chunk-86r89vrt.js";import"../chunk-mhv75thj.js";import"../chunk-wkrnbk0p.js";import"../chunk-ztrfygh5.js";import"../chunk-djd3sjp9.js";import"../chunk-26w51q10.js";import"../chunk-1qjhvkg0.js";import"../chunk-s6b28p84.js";import"../chunk-rx84h0c2.js";import"../chunk-56rx2rmj.js";import"../chunk-f73x23f9.js";import"../chunk-1ycyexae.js";import"../chunk-2cfhvb3k.js";import"../chunk-g8w06bdx.js";import"../chunk-pdmayjan.js";import"../chunk-wf7kfk3p.js";export{Yt as SkillsTab};
|
package/dist/plugins/store.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export type PluginsState = {
|
|
|
44
44
|
refresh: (cwds?: string[], options?: {
|
|
45
45
|
forceRefetch?: boolean;
|
|
46
46
|
background?: boolean;
|
|
47
|
+
catalog?: boolean;
|
|
47
48
|
}) => Promise<void>;
|
|
48
49
|
install: (entry: PluginEntry) => Promise<PluginInstallResponse>;
|
|
49
50
|
setPluginEnabled: (plugin: PluginSummary, enabled: boolean) => Promise<void>;
|
package/dist/plugins/store.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{di,tn}from"../chunk-
|
|
1
|
+
import{di,tn}from"../chunk-sjtfxn55.js";export{tn as createPluginsStore,di as installParams};
|
|
Binary file
|
package/package.json
CHANGED
package/dist/chunk-mg7kraha.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createStore as M}from"@alwith/api/client";function k(a){return a instanceof Error?a.message:String(a)}function E(a){return a.interface?.displayName??a.name}function I(a){let u={},n=new Map,l=new Map;for(let p of a.data){for(let o of p.skills)if(n.set(o.path,o),o.scope==="repo"){let m=u[p.cwd]??[];if(!m.includes(o.path))m.push(o.path);u[p.cwd]=m}for(let o of p.errors)l.set(o.path,o)}return{skills:[...n.values()],errors:[...l.values()],projects:u}}function v(a){let u=[];for(let n of a.marketplaces)for(let l of n.plugins)if(l.installed)u.push({plugin:l,marketplace:n});return u.toSorted((n,l)=>(l.plugin.installedAt??0)-(n.plugin.installedAt??0))}function di(a){let{plugin:u,marketplace:n}=a;return{installAttemptId:crypto.randomUUID(),pluginName:n.path===null?u.remotePluginId??u.name:u.name,...n.path===null?{remoteMarketplaceName:n.name}:{marketplacePath:n.path}}}function A(a){let{plugin:u,marketplace:n}=a;return{pluginName:n.path===null?u.remotePluginId??u.name:u.name,...n.path===null?{remoteMarketplaceName:n.name}:{marketplacePath:n.path}}}function tn(a,u){let n=u??{t:(e)=>e},l=(e,r)=>n.t(e,r),p=(e)=>n.notify?.(e),o=(e)=>{if(n.reportError)n.reportError(Error(e));else console.error(e)},m=null,b=null,d=(e)=>S.setState(e),P=()=>S.getState(),y=async(e=!1)=>{if(await P().refresh(void 0,{forceRefetch:e,background:!0}),P().error)throw Error(l("plugins.toast.syncError",{message:P().error}))},f=(e,r)=>d((s)=>{let t={...s.busyIds};if(r===null)delete t[e];else t[e]=r;return{busyIds:t}}),h=(e,r)=>d((s)=>{let t={...s.busyMarketplaces};if(r)t[e]=!0;else delete t[e];return{busyMarketplaces:t}}),w=M({loading:!1,loadedScope:null,upgrading:!1,error:null,cwds:[],marketplaces:[],marketplaceLoadErrors:[],featuredPluginIds:[],installed:[],skills:[],skillProjects:{},skillErrors:[],busyIds:{},busySkills:{},busyMarketplaces:{},refresh:(e=P().cwds,r={})=>{if(m={cwds:e,forceRefetch:r.forceRefetch===!0||m?.forceRefetch===!0},d({cwds:e,...!r.background?{loading:!0}:{}}),b)return b;return b=(async()=>{while(m){let s=m;m=null,d({error:null});try{let[t,i,g]=await Promise.all([a.listSkills(s.cwds,s.forceRefetch),a.listPlugins({...s.cwds.length>0?{cwds:s.cwds}:{},...s.forceRefetch?{forceRefetch:!0}:{}}),a.installedPlugins(s.cwds)]);if(m)continue;let c=I(t);d({loadedScope:JSON.stringify(s.cwds),skills:c.skills,skillProjects:c.projects,skillErrors:c.errors,marketplaces:i.marketplaces,marketplaceLoadErrors:i.marketplaceLoadErrors,featuredPluginIds:i.featuredPluginIds,installed:v(g)})}catch(t){if(!m)d({error:k(t)})}}})().finally(()=>{b=null,d({loading:!1})}),b},install:async(e)=>{if(e.plugin.id in P().busyIds)throw Error("Plugin operation already in progress");let r=E(e.plugin);f(e.plugin.id,"installing");try{let s=await a.installPlugin(di(e));return await y(),f(e.plugin.id,null),p(l("plugins.toast.installed",{pluginName:r})),s}catch(s){throw o(`${l("plugins.toast.installError")}: ${k(s)}`),s}finally{f(e.plugin.id,null)}},setPluginEnabled:async(e,r)=>{if(e.id in P().busyIds)return;f(e.id,"toggling");let s=(i)=>d((g)=>({installed:g.installed.map((c)=>c.plugin.id===e.id?{...c,plugin:{...c.plugin,enabled:i}}:c)}));s(r);let t=e.enabled;try{let i=e.source.type==="remote"?e.remotePluginId:void 0;if(i===null)throw Error("Remote plugin ID is missing");let g=await a.setPluginEnabled(e.id,r,i);t=g.enabled,s(g.enabled),await y();let c=P().installed.find((R)=>R.plugin.id===e.id);if(c)t=c.plugin.enabled;if(!c||t!==r)throw Error(l("plugins.toast.toggleNotApplied"));f(e.id,null),p(l(r?"plugins.toast.enabled":"plugins.toast.disabled",{pluginName:E(e)}))}catch(i){s(t),o(`${l("plugins.toast.toggleError")}: ${k(i)}`)}finally{f(e.id,null)}},uninstall:async(e)=>{if(e.id in P().busyIds)return;let r=E(e);f(e.id,"uninstalling");try{let s=e.source.type==="remote"?e.remotePluginId:e.id;if(!s)throw Error("Remote plugin ID is missing");if(await a.uninstallPlugin(s),await y(),P().installed.some((t)=>t.plugin.id===e.id))throw Error(l("plugins.toast.uninstallNotApplied"));f(e.id,null),p(l("plugins.toast.uninstalled",{pluginName:r}))}catch(s){o(`${l("plugins.toast.uninstallError")}: ${k(s)}`)}finally{f(e.id,null)}},readPlugin:async(e)=>(await a.readPlugin(A(e))).plugin,setSkillEnabled:async(e,r)=>{if(e.path in P().busySkills)return;d((t)=>({busySkills:{...t.busySkills,[e.path]:!0}})),d((t)=>({skills:t.skills.map((i)=>i.path===e.path?{...i,enabled:r}:i)}));let s=e.interface?.displayName??e.name;try{let t=await a.setSkillEnabled({path:e.path,enabled:r});if(d((i)=>({skills:i.skills.map((g)=>g.path===e.path?{...g,enabled:t.effectiveEnabled}:g)})),t.effectiveEnabled!==r){o(l("plugins.catalog.toggleNotApplied"));return}p(l(r?"plugins.skills.enabledToast":"plugins.skills.disabledToast",{skillName:s}))}catch(t){d((i)=>({skills:i.skills.map((g)=>g.path===e.path?{...g,enabled:e.enabled}:g)})),o(`${l("plugins.skills.toggleError")}: ${k(t)}`)}finally{d((t)=>{let i={...t.busySkills};return delete i[e.path],{busySkills:i}})}},addMarketplace:async(e)=>{let r=await a.addMarketplace(e);return await y(!0),p(r.alreadyAdded?l("plugins.marketplace.alreadyAdded",{marketplaceName:r.marketplaceName}):l("plugins.marketplace.added",{marketplaceName:r.marketplaceName})),r},removeMarketplace:async(e)=>{h(e,!0);try{await a.removeMarketplace(e),await y(),h(e,!1),p(l("plugins.marketplace.removed",{marketplaceName:e}))}catch(r){o(`${l("plugins.marketplace.removeError")}: ${k(r)}`)}finally{h(e,!1)}},upgradeMarketplace:async(e)=>{h(e,!0);try{let r=await a.upgradeMarketplaces(e);if(await y(!0),h(e,!1),r.errors.length>0)o(`${l("plugins.marketplace.upgradeError")}: ${r.errors.map((s)=>s.message).join("; ")}`);else p(l("plugins.marketplace.upgraded",{marketplaceName:e}))}catch(r){o(`${l("plugins.marketplace.upgradeError")}: ${k(r)}`)}finally{h(e,!1)}},upgradeAll:async()=>{if(P().upgrading)return;d({upgrading:!0});try{let e=await a.upgradeMarketplaces();if(await y(!0),d({upgrading:!1}),e.errors.length>0)o(l("plugins.marketplace.upgradeAllError"));else p(l("plugins.marketplace.upgradedAll"))}catch(e){o(`${l("plugins.marketplace.upgradeAllRequestError")}: ${k(e)}`)}finally{d({upgrading:!1})}}}),S=Object.assign(w,{bindHost:(e)=>{n=e}});return S}
|
|
2
|
-
export{di,tn};
|