coder-config 0.40.13 → 0.40.15

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/lib/cli.js CHANGED
@@ -248,9 +248,9 @@ Maintenance:
248
248
  ui stop Stop the UI daemon
249
249
  version Show version info
250
250
 
251
- Plugins (use Claude Code CLI):
252
- claude plugin marketplace add regression-io/claude-config-plugins
253
- claude plugin install fastapi-support@claude-config-plugins
251
+ Plugins (Claude Code CLI):
252
+ claude plugin marketplace add regression-io/coder-config-plugins
253
+ claude plugin install <name>@coder-config-plugins
254
254
 
255
255
  Examples:
256
256
  coder-config init
package/lib/constants.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Constants and tool path configurations
3
3
  */
4
4
 
5
- const VERSION = '0.40.13';
5
+ const VERSION = '0.40.15';
6
6
 
7
7
  // Tool-specific path configurations
8
8
  const TOOL_PATHS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coder-config",
3
- "version": "0.40.13",
3
+ "version": "0.40.15",
4
4
  "description": "Configuration manager for AI coding tools - Claude Code, Gemini CLI, Codex CLI, Antigravity. Manage MCPs, rules, permissions, memory, and workstreams.",
5
5
  "author": "regression.io",
6
6
  "main": "config-loader.js",
@@ -2332,7 +2332,7 @@ When reporting issues, include:
2332
2332
  - Operating system
2333
2333
  - Error messages or logs
2334
2334
  `}},jH={...hH,...fH,...mH,...pH,...gH,...xH,...vH,...yH,...bH,...wH,..._H,...SH,...CH,...kH};function I2(e){let t=e.replace(/```(\w*)\n([\s\S]*?)```/g,(r,s,o)=>`<pre class="bg-zinc-900 text-zinc-100 p-4 rounded-lg overflow-x-auto my-4"><code class="text-sm">${o.replace(/\\\`/g,"`").replace(/</g,"&lt;").replace(/>/g,"&gt;").trim()}</code></pre>`);return t=t.replace(/(\|[^\n]+\|\n\|[-| :]+\|\n(?:\|[^\n]+\|\n?)+)/g,r=>{const s=r.trim().split(`
2335
- `);if(s.length<2)return r;const o=s[0].split("|").filter(d=>d.trim()).map(d=>`<th class="border border-border px-3 py-2 bg-muted font-semibold text-left">${d.trim()}</th>`).join(""),u=s.slice(2).map(d=>`<tr>${d.split("|").filter(c=>c.trim()).map(c=>`<td class="border border-border px-3 py-2">${c.trim()}</td>`).join("")}</tr>`).join("");return`<table class="w-full border-collapse border border-border my-4"><thead><tr>${o}</tr></thead><tbody>${u}</tbody></table>`}),t.replace(/^### (.*$)/gim,'<h3 class="text-lg font-semibold mt-6 mb-2 text-foreground">$1</h3>').replace(/^## (.*$)/gim,'<h2 class="text-xl font-semibold mt-8 mb-4 text-foreground">$1</h2>').replace(/^# (.*$)/gim,'<h1 class="text-2xl font-bold mb-6 text-foreground">$1</h1>').replace(/!\[([^\]]*)\]\(([^)]+)\)/g,'<img src="$2" alt="$1" class="rounded-lg shadow-lg my-4 max-w-full border border-border" />').replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`([^`]+)`/g,'<code class="bg-muted px-1.5 py-0.5 rounded text-sm font-mono">$1</code>').replace(/^- (.*$)/gim,'<li class="ml-4">$1</li>').replace(/(<li.*<\/li>\n?)+/g,'<ul class="list-disc my-2">$&</ul>').replace(/^\d+\. (.*$)/gim,'<li class="ml-4">$1</li>').replace(/\n\n/g,'</p><p class="my-3 text-foreground">').replace(/\n/g,"<br/>")}function NH(){const[e,t]=C.useState("installation"),[r,s]=C.useState({"getting-started":!0}),o=d=>{s(l=>({...l,[d]:!l[d]}))},u=jH[e];return n.jsxs("div",{className:"flex h-full",children:[n.jsxs("div",{className:"w-64 border-r border-border bg-muted/50 flex flex-col",children:[n.jsx("div",{className:"p-4 border-b border-border",children:n.jsxs("h2",{className:"font-semibold flex items-center gap-2 text-foreground",children:[n.jsx(Li,{className:"w-5 h-5"}),"Documentation"]})}),n.jsx(Nn,{className:"flex-1",children:n.jsx("div",{className:"p-2",children:dH.map(d=>n.jsxs("div",{className:"mb-1",children:[n.jsxs("button",{className:je("w-full flex items-center gap-2 px-3 py-2 text-sm rounded-md hover:bg-accent text-left",(e===d.id||d.subsections.some(l=>l.id===e))&&"bg-accent"),onClick:()=>{d.subsections.length>0?(o(d.id),r[d.id]||t(d.subsections[0].id)):t(d.id)},children:[n.jsx(d.icon,{className:"w-4 h-4 text-muted-foreground"}),n.jsx("span",{className:"flex-1",children:d.title}),d.isNew&&n.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded font-medium bg-green-500/20 text-green-600 dark:text-green-400",children:"new"}),d.subsections.length>0&&n.jsx(Kr,{className:je("w-4 h-4 text-muted-foreground transition-transform",r[d.id]&&"rotate-90")})]}),d.subsections.length>0&&r[d.id]&&n.jsx("div",{className:"ml-6 mt-1 space-y-1",children:d.subsections.map(l=>n.jsx("button",{className:je("w-full text-left px-3 py-1.5 text-sm rounded-md hover:bg-accent text-foreground",e===l.id&&"bg-accent text-primary font-medium"),onClick:()=>t(l.id),children:l.title},l.id))})]},d.id))})})]}),n.jsx("div",{className:"flex-1 overflow-hidden",children:n.jsx(Nn,{className:"h-full",children:n.jsx("div",{className:"max-w-3xl mx-auto p-8",children:u?n.jsx("div",{className:"prose prose-sm max-w-none",children:n.jsx("div",{dangerouslySetInnerHTML:{__html:I2(u.content)}})}):n.jsxs("div",{className:"text-center text-muted-foreground py-12",children:[n.jsx(Li,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),n.jsx("p",{children:"Select a topic from the sidebar"})]})})})})]})}var EH={};const Lw={development:"bg-blue-100 text-blue-700 border-blue-200 dark:bg-blue-900/30 dark:text-blue-400 dark:border-blue-800",productivity:"bg-green-100 text-green-700 border-green-200 dark:bg-green-900/30 dark:text-green-400 dark:border-green-800",integration:"bg-purple-100 text-purple-700 border-purple-200 dark:bg-purple-900/30 dark:text-purple-400 dark:border-purple-800",external:"bg-orange-100 text-orange-700 border-orange-200 dark:bg-orange-900/30 dark:text-orange-400 dark:border-orange-800",lsp:"bg-cyan-100 text-cyan-700 border-cyan-200 dark:bg-cyan-900/30 dark:text-cyan-400 dark:border-cyan-800",default:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-700"};function PH(){var ae,ne,J,ie,ye,Oe,Ve;const[e,t]=C.useState(!0),[r,s]=C.useState({allPlugins:[],categories:[],marketplaces:[],enabledPlugins:null}),[o,u]=C.useState(""),[d,l]=C.useState([]),[c,f]=C.useState([]),[m,h]=C.useState(!0),[x,w]=C.useState(!0),[k,_]=C.useState(!0),[v,b]=C.useState(!0),[g,y]=C.useState("name"),[j,E]=C.useState(null),[P,T]=C.useState({open:!1,repo:""}),[N,R]=C.useState(!1),[I,O]=C.useState({open:!1,plugin:null}),[$,W]=C.useState(!1),Y=async()=>{t(!0);try{const te=await ke.getPlugins();s(te)}catch(te){ee.error("Failed to load plugins: "+te.message)}finally{t(!1)}};C.useEffect(()=>{Y()},[]);const z=C.useMemo(()=>{let te=r.allPlugins||[];if(o){const de=o.toLowerCase();te=te.filter(De=>{var Re,Ze,Se;return((Re=De.name)==null?void 0:Re.toLowerCase().includes(de))||((Ze=De.description)==null?void 0:Ze.toLowerCase().includes(de))||((Se=De.category)==null?void 0:Se.toLowerCase().includes(de))})}return te=te.filter(de=>!(de.sourceType==="external"&&!x||de.sourceType==="internal"&&!m)),te=te.filter(de=>!(de.installed&&!k||!de.installed&&!v)),d.length>0&&(te=te.filter(de=>d.includes(de.category))),c.length>0&&(te=te.filter(de=>c.includes(de.marketplace))),te.sort((de,De)=>{if(g==="installed"){if(de.installed&&!De.installed)return-1;if(!de.installed&&De.installed)return 1}if(g==="category"){const Re=(de.category||"zzz").localeCompare(De.category||"zzz");if(Re!==0)return Re}return de.name.localeCompare(De.name)}),te},[r.allPlugins,o,x,m,k,v,d,c,g]),K=te=>{l(de=>de.includes(te)?de.filter(De=>De!==te):[...de,te])},G=te=>{f(de=>de.includes(te)?de.filter(De=>De!==te):[...de,te])},U=async te=>{E(te);try{const de=await ke.refreshMarketplace(te);de.success?(ee.success(`Refreshed ${te}`),await Y()):ee.error(de.error||"Failed to refresh marketplace")}catch(de){ee.error("Failed to refresh: "+de.message)}finally{E(null)}},L=async()=>{if(!P.repo.trim()){ee.error("Please enter a repository URL");return}try{const te=await ke.addMarketplace("",P.repo.trim());te.success?(ee.success("Marketplace added"),T({open:!1,repo:""}),await Y()):ee.error(te.error||"Failed to add marketplace")}catch(te){ee.error("Failed to add marketplace: "+te.message)}},M=async(te,de,De)=>{W(!0);try{const Re=De!==!0,Ze=await ke.setPluginEnabled(te,de,Re);Ze.success?(ee.success(`Plugin ${Re?"enabled":"disabled"} for ${te===EH.HOME?"~":te}`),await Y()):ee.error(Ze.error||"Failed to update plugin state")}catch(Re){ee.error("Failed to update plugin: "+Re.message)}finally{W(!1)}},B=async(te,de)=>{W(!0);try{const De=await ke.setPluginEnabled(te,de,null);De.success?(ee.success("Plugin override removed"),await Y()):ee.error(De.error||"Failed to remove override")}catch(De){ee.error("Failed to update plugin: "+De.message)}finally{W(!1)}},q=te=>{O({open:!0,plugin:te})},F=(r.allPlugins||[]).filter(te=>te.installed).length,oe=(r.allPlugins||[]).filter(te=>!te.installed).length,fe=(r.allPlugins||[]).filter(te=>te.sourceType==="internal").length,me=(r.allPlugins||[]).filter(te=>te.sourceType==="external").length,X=r.marketplaces||[],H=r.categories||[];return e?n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsx(ut,{className:"w-8 h-8 animate-spin text-primary"})}):n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"bg-indigo-50 dark:bg-indigo-950/30 border border-indigo-200 dark:border-indigo-800 rounded-lg p-4 flex items-start gap-3",children:[n.jsx(Yu,{className:"w-5 h-5 text-indigo-600 dark:text-indigo-400 flex-shrink-0 mt-0.5"}),n.jsxs("div",{className:"text-sm text-indigo-800 dark:text-indigo-300",children:[n.jsx("p",{className:"font-medium",children:"Install plugins from Project Explorer"}),n.jsxs("p",{className:"text-indigo-600 dark:text-indigo-400 mt-1",children:["Use the ",n.jsx("kbd",{className:"px-1.5 py-0.5 bg-indigo-100 dark:bg-indigo-900 rounded text-xs",children:"+"}),' menu on any project and select "Install Plugins" to add plugins with project-level scope control.']})]})]}),n.jsxs("div",{className:"bg-white dark:bg-slate-950 rounded-xl border border-gray-200 dark:border-slate-800 overflow-hidden shadow-sm",children:[n.jsxs("div",{className:"p-5 border-b border-gray-200 dark:border-slate-700",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white flex items-center gap-2",children:[n.jsx(Fi,{className:"w-5 h-5 text-indigo-600"}),"Plugin Directory",n.jsxs(Qe,{variant:"outline",className:"ml-2 font-normal",children:[z.length," of ",((ae=r.allPlugins)==null?void 0:ae.length)||0]})]}),n.jsx(le,{variant:"ghost",size:"sm",onClick:Y,disabled:e,children:n.jsx(pr,{className:`w-4 h-4 ${e?"animate-spin":""}`})})]}),n.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(_l,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),n.jsx(ct,{value:o,onChange:te=>u(te.target.value),placeholder:"Search plugins...",className:"pl-9 bg-white dark:bg-slate-900 border-gray-300 dark:border-slate-700"})]}),n.jsxs(fr,{value:g,onValueChange:y,children:[n.jsx(ar,{className:"w-40",children:n.jsx(mr,{placeholder:"Sort by"})}),n.jsxs(lr,{children:[n.jsx(xt,{value:"name",children:"Name"}),n.jsx(xt,{value:"installed",children:"Installed first"}),n.jsx(xt,{value:"category",children:"Category"})]})]})]}),n.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[n.jsxs(ai,{children:[n.jsx(li,{asChild:!0,children:n.jsxs(le,{variant:"outline",size:"sm",className:"h-8 text-xs gap-1",children:[n.jsx(Yc,{className:"w-3 h-3"}),"Marketplace",c.length>0&&n.jsx(Qe,{variant:"secondary",className:"ml-1 h-4 px-1 text-[10px]",children:c.length}),n.jsx(Sr,{className:"w-3 h-3 ml-1"})]})}),n.jsxs(ks,{align:"start",className:"w-56",children:[n.jsx(ul,{className:"text-xs",children:"Filter by marketplace"}),n.jsx(Or,{}),X.length>0?X.map(te=>n.jsx(cl,{checked:c.includes(te.name),onCheckedChange:()=>G(te.name),children:te.name},te.name)):n.jsx("div",{className:"px-2 py-1.5 text-xs text-muted-foreground",children:"No marketplaces"}),n.jsx(Or,{}),n.jsxs(Pt,{onClick:()=>R(!0),children:[n.jsx(kn,{className:"w-3 h-3 mr-2"}),"Manage Marketplaces"]}),c.length>0&&n.jsxs(n.Fragment,{children:[n.jsx(Or,{}),n.jsx(Pt,{onClick:()=>f([]),children:"Clear filters"})]})]})]}),n.jsxs(ai,{children:[n.jsx(li,{asChild:!0,children:n.jsxs(le,{variant:"outline",size:"sm",className:"h-8 text-xs gap-1",children:[n.jsx(S1,{className:"w-3 h-3"}),"Category",d.length>0&&n.jsx(Qe,{variant:"secondary",className:"ml-1 h-4 px-1 text-[10px]",children:d.length}),n.jsx(Sr,{className:"w-3 h-3 ml-1"})]})}),n.jsxs(ks,{align:"start",className:"w-48",children:[n.jsx(ul,{className:"text-xs",children:"Filter by category"}),n.jsx(Or,{}),H.map(te=>n.jsx(cl,{checked:d.includes(te),onCheckedChange:()=>K(te),children:te},te)),d.length>0&&n.jsxs(n.Fragment,{children:[n.jsx(Or,{}),n.jsx(Pt,{onClick:()=>l([]),children:"Clear filters"})]})]})]}),n.jsxs("div",{className:"flex items-center gap-4 text-xs",children:[n.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[n.jsx(dt,{checked:k,onCheckedChange:_,className:"h-4 w-7 data-[state=checked]:bg-green-600"}),n.jsxs("span",{className:"text-gray-600 dark:text-slate-400",children:["Installed (",F,")"]})]}),n.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[n.jsx(dt,{checked:v,onCheckedChange:b,className:"h-4 w-7 data-[state=checked]:bg-blue-600"}),n.jsxs("span",{className:"text-gray-600 dark:text-slate-400",children:["Available (",oe,")"]})]}),n.jsx("span",{className:"text-gray-300 dark:text-slate-600",children:"|"}),n.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[n.jsx(dt,{checked:m,onCheckedChange:h,className:"h-4 w-7 data-[state=checked]:bg-indigo-600"}),n.jsxs("span",{className:"text-gray-600 dark:text-slate-400 flex items-center gap-1",children:[n.jsx(y1,{className:"w-3 h-3"})," Anthropic (",fe,")"]})]}),n.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[n.jsx(dt,{checked:x,onCheckedChange:w,className:"h-4 w-7 data-[state=checked]:bg-orange-600"}),n.jsxs("span",{className:"text-gray-600 dark:text-slate-400 flex items-center gap-1",children:[n.jsx(Bi,{className:"w-3 h-3"})," Community (",me,")"]})]})]})]})]}),n.jsxs("div",{className:"p-4 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[z.map((te,de)=>{const De=Lw[te.category]||Lw.default,Re=te.mcpServers?Object.keys(te.mcpServers).length:0,Ze=te.lspServers?Object.keys(te.lspServers).length:0,Se=`${te.name}@${te.marketplace}`,ge=te.enabledState,Me=(ge==null?void 0:ge.merged)===!0;return(ge==null?void 0:ge.merged)!==null&&(ge==null||ge.merged),n.jsxs(Eo.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:Math.min(de*.02,.3)},className:`rounded-lg border p-4 transition-all hover:shadow-md ${Me?"bg-emerald-50 border-emerald-200 dark:bg-emerald-950/20 dark:border-emerald-800":te.installed?"bg-green-50 border-green-200 dark:bg-green-950/20 dark:border-green-800":"bg-white border-gray-200 dark:bg-slate-900 dark:border-slate-700"}`,children:[n.jsxs("div",{className:"flex items-start justify-between mb-2",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:te.name}),te.sourceType==="external"&&n.jsx(Bi,{className:"w-3.5 h-3.5 text-orange-500 flex-shrink-0",title:"Community plugin"})]}),n.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[te.installed&&n.jsxs(Qe,{variant:"outline",className:"text-green-600 border-green-300 dark:text-green-400 dark:border-green-700 text-[10px]",children:[n.jsx(Kt,{className:"w-2.5 h-2.5 mr-0.5"}),"Installed"]}),Me&&n.jsxs(Qe,{variant:"outline",className:"text-emerald-600 border-emerald-300 dark:text-emerald-400 dark:border-emerald-700 text-[10px]",children:[n.jsx(sb,{className:"w-2.5 h-2.5 mr-0.5"}),"Enabled"]})]})]}),n.jsxs("div",{className:"flex items-center gap-1",children:[te.installed&&n.jsx(zo,{children:n.jsxs(on,{children:[n.jsx(an,{asChild:!0,children:n.jsx(le,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-60 hover:opacity-100",onClick:()=>q(te),children:n.jsx(kn,{className:"w-4 h-4"})})}),n.jsx(qr,{children:n.jsx("p",{children:"Configure per-directory"})})]})}),te.homepage&&n.jsx(le,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-60 hover:opacity-100",onClick:()=>window.open(te.homepage,"_blank"),children:n.jsx(du,{className:"w-4 h-4"})})]})]}),n.jsx("p",{className:"text-sm text-gray-600 dark:text-slate-400 mb-3 line-clamp-2",children:te.description||"No description available"}),n.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-2",children:[te.category&&n.jsx(Qe,{variant:"outline",className:`text-[10px] px-1.5 py-0 ${De}`,children:te.category}),te.version&&n.jsxs("span",{className:"text-[10px] text-gray-400 dark:text-slate-500",children:["v",te.version]})]}),(Re>0||Ze>0||te.commands)&&n.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-gray-500 dark:text-slate-500 pt-2 border-t border-gray-100 dark:border-slate-800",children:[Ze>0&&n.jsxs("span",{className:"flex items-center gap-1 bg-cyan-50 dark:bg-cyan-900/20 px-1.5 py-0.5 rounded",children:[n.jsx(ns,{className:"w-3 h-3 text-cyan-600"}),Ze," LSP"]}),Re>0&&n.jsxs("span",{className:"flex items-center gap-1 bg-blue-50 dark:bg-blue-900/20 px-1.5 py-0.5 rounded",children:[n.jsx(Fn,{className:"w-3 h-3 text-blue-600"}),Re," MCP"]}),te.commands&&n.jsxs("span",{className:"flex items-center gap-1 bg-green-50 dark:bg-green-900/20 px-1.5 py-0.5 rounded",children:[n.jsx(Ft,{className:"w-3 h-3 text-green-600"}),"Commands"]})]})]},Se)}),z.length===0&&n.jsxs("div",{className:"col-span-full text-center py-12 text-gray-500 dark:text-slate-400",children:[n.jsx(Fi,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),n.jsx("p",{className:"font-medium",children:"No plugins found"}),n.jsx("p",{className:"text-sm mt-1",children:"Try adjusting your filters or search query"}),(d.length>0||c.length>0||o)&&n.jsx(le,{variant:"link",size:"sm",onClick:()=>{l([]),f([]),u("")},className:"mt-2",children:"Clear all filters"})]})]})]}),n.jsx(Tt,{open:P.open,onOpenChange:te=>T({...P,open:te}),children:n.jsxs(St,{className:"max-w-lg",children:[n.jsxs(Ct,{children:[n.jsxs(kt,{className:"flex items-center gap-2",children:[n.jsx(Yc,{className:"w-5 h-5 text-purple-600"}),"Add Plugin Marketplace"]}),n.jsx(tr,{children:"Add a marketplace from a GitHub repository URL or local path."})]}),n.jsx("div",{className:"space-y-4 py-4",children:n.jsxs("div",{children:[n.jsx("label",{className:"text-sm font-medium text-gray-700 dark:text-slate-300",children:"Repository URL or Path"}),n.jsx(ct,{value:P.repo,onChange:te=>T({...P,repo:te.target.value}),placeholder:"owner/repo or full GitHub URL",className:"mt-1"}),n.jsx("p",{className:"text-xs text-gray-500 dark:text-slate-400 mt-2",children:"Supported formats:"}),n.jsxs("ul",{className:"text-xs text-gray-500 dark:text-slate-400 mt-1 space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("code",{className:"bg-gray-100 dark:bg-slate-700 px-1 rounded",children:"owner/repo"})," — GitHub shorthand"]}),n.jsxs("li",{children:[n.jsx("code",{className:"bg-gray-100 dark:bg-slate-700 px-1 rounded",children:"https://github.com/owner/repo"})," — Full URL"]}),n.jsxs("li",{children:[n.jsx("code",{className:"bg-gray-100 dark:bg-slate-700 px-1 rounded",children:"/local/path"})," — Local directory"]})]}),n.jsxs("p",{className:"text-xs text-gray-400 dark:text-slate-500 mt-2",children:["Search GitHub for ",n.jsx("code",{className:"bg-gray-100 dark:bg-slate-700 px-1 rounded",children:"claude-plugins"})," to find community marketplaces."]})]})}),n.jsxs(It,{children:[n.jsx(le,{variant:"ghost",onClick:()=>T({open:!1,repo:""}),children:"Cancel"}),n.jsxs(le,{onClick:L,className:"bg-purple-600 hover:bg-purple-700 text-white",children:[n.jsx(yt,{className:"w-4 h-4 mr-2"}),"Add Marketplace"]})]})]})}),n.jsx(Tt,{open:N,onOpenChange:R,children:n.jsxs(St,{className:"max-w-2xl",children:[n.jsxs(Ct,{children:[n.jsxs(kt,{className:"flex items-center gap-2",children:[n.jsx(Yc,{className:"w-5 h-5 text-purple-600"}),"Plugin Marketplaces",n.jsx(Qe,{variant:"outline",className:"ml-2 font-normal",children:X.length})]}),n.jsx(tr,{children:"Manage your plugin marketplaces. Add external marketplaces to discover more plugins."})]}),n.jsx("div",{className:"py-4",children:X.length>0?n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:X.map(te=>{var De,Re,Ze;const de=(((De=te.plugins)==null?void 0:De.length)||0)+(((Re=te.externalPlugins)==null?void 0:Re.length)||0);return n.jsxs("div",{className:"bg-purple-50 dark:bg-purple-950/20 rounded-lg border border-purple-200 dark:border-purple-800 p-4",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("h3",{className:"font-semibold text-purple-900 dark:text-purple-200",children:te.name}),n.jsx(le,{variant:"ghost",size:"sm",onClick:()=>U(te.name),disabled:j===te.name,className:"h-7 w-7 p-0",children:n.jsx(pr,{className:`w-4 h-4 text-purple-600 dark:text-purple-400 ${j===te.name?"animate-spin":""}`})})]}),n.jsx("p",{className:"text-sm text-purple-700 dark:text-purple-300 mb-2 truncate",children:typeof te.source=="string"?te.source:((Ze=te.source)==null?void 0:Ze.repo)||"Unknown source"}),n.jsxs("div",{className:"flex items-center justify-between text-xs text-purple-600 dark:text-purple-400",children:[n.jsxs("span",{children:[de," plugins"]}),te.lastUpdated&&n.jsxs("span",{children:["Updated: ",new Date(te.lastUpdated).toLocaleDateString()]})]})]},te.name)})}):n.jsxs("div",{className:"text-center py-8 text-gray-500 dark:text-slate-400",children:[n.jsx(Yc,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),n.jsx("p",{children:"No marketplaces configured."}),n.jsx("p",{className:"text-sm mt-1",children:"Add a marketplace to discover plugins."})]})}),n.jsxs(It,{children:[n.jsx(le,{variant:"outline",onClick:()=>R(!1),children:"Close"}),n.jsxs(le,{onClick:()=>{R(!1),T({open:!0,repo:""})},className:"bg-purple-600 hover:bg-purple-700 text-white",children:[n.jsx(yt,{className:"w-4 h-4 mr-2"}),"Add Marketplace"]})]})]})}),n.jsx(Tt,{open:I.open,onOpenChange:te=>O({...I,open:te}),children:n.jsxs(St,{className:"max-w-lg",children:[n.jsxs(Ct,{children:[n.jsxs(kt,{className:"flex items-center gap-2",children:[n.jsx(tb,{className:"w-5 h-5 text-emerald-600"}),"Configure Plugin: ",(ne=I.plugin)==null?void 0:ne.name]}),n.jsx(tr,{children:"Enable or disable this plugin for specific directories. Child directories inherit parent settings unless overridden."})]}),n.jsxs("div",{className:"space-y-3 py-4 max-h-[400px] overflow-y-auto",children:[(ye=(ie=(J=I.plugin)==null?void 0:J.enabledState)==null?void 0:ie.perDir)==null?void 0:ye.map((te,de)=>{const De=`${I.plugin.name}@${I.plugin.marketplace}`,Re=te.enabled!==null&&te.enabled!==void 0,Ze=te.enabled===!0,Se=te.enabled===!1;let ge=null;if(!Re&&de>0)for(let Me=de-1;Me>=0;Me--){const ht=I.plugin.enabledState.perDir[Me];if(ht.enabled!==null&&ht.enabled!==void 0){ge=ht.enabled;break}}return n.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${Ze?"bg-emerald-50 border-emerald-200 dark:bg-emerald-950/30 dark:border-emerald-800":Se?"bg-red-50 border-red-200 dark:bg-red-950/30 dark:border-red-800":"bg-gray-50 border-gray-200 dark:bg-slate-800/50 dark:border-slate-700"}`,children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("code",{className:"text-sm font-mono text-gray-700 dark:text-slate-300 truncate",children:te.label}),!Re&&ge!==null&&n.jsxs(Qe,{variant:"outline",className:"text-[10px] text-gray-500",children:["inherited: ",ge?"on":"off"]})]}),Re&&n.jsx("p",{className:"text-[10px] text-gray-500 dark:text-slate-400 mt-0.5",children:Ze?"Explicitly enabled":"Explicitly disabled"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[Re&&n.jsx(zo,{children:n.jsxs(on,{children:[n.jsx(an,{asChild:!0,children:n.jsx(le,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 text-gray-400 hover:text-gray-600",onClick:()=>B(te.dir,De),disabled:$,children:n.jsx(s5,{className:"w-4 h-4"})})}),n.jsx(qr,{children:n.jsx("p",{children:"Remove override (inherit from parent)"})})]})}),n.jsxs("div",{className:"flex items-center gap-1 border rounded-lg overflow-hidden",children:[n.jsx(le,{variant:Ze?"default":"ghost",size:"sm",className:`h-7 px-2 rounded-none ${Ze?"bg-emerald-600 hover:bg-emerald-700 text-white":""}`,onClick:()=>M(te.dir,De,!1),disabled:$||Ze,children:n.jsx(sb,{className:"w-3 h-3"})}),n.jsx(le,{variant:Se?"default":"ghost",size:"sm",className:`h-7 px-2 rounded-none ${Se?"bg-red-600 hover:bg-red-700 text-white":""}`,onClick:()=>M(te.dir,De,!0),disabled:$||Se,children:n.jsx(y5,{className:"w-3 h-3"})})]})]})]},te.dir)}),(!((Ve=(Oe=I.plugin)==null?void 0:Oe.enabledState)!=null&&Ve.perDir)||I.plugin.enabledState.perDir.length===0)&&n.jsxs("div",{className:"text-center py-8 text-gray-500 dark:text-slate-400",children:[n.jsx(tb,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),n.jsx("p",{children:"No config hierarchy found."}),n.jsx("p",{className:"text-sm mt-1",children:"Create a .claude/mcps.json in your project first."})]})]}),n.jsx(It,{children:n.jsx(le,{variant:"ghost",onClick:()=>O({open:!1,plugin:null}),children:"Done"})})]})})]})}function AH({projects:e=[],onWorkstreamChange:t}){var Ke,bt;const[r,s]=C.useState([]),[o,u]=C.useState(!0),[d,l]=C.useState(null),[c,f]=C.useState(!1),[m,h]=C.useState(null),[x,w]=C.useState(!1),[k,_]=C.useState(null),[v,b]=C.useState(new Set),[g,y]=C.useState(""),[j,E]=C.useState(""),[P,T]=C.useState([]),[N,R]=C.useState(!1),[I,O]=C.useState(!1),[$,W]=C.useState({}),[Y,z]=C.useState({}),[K,G]=C.useState({}),[U,L]=C.useState({isInstalled:!1,loading:!0}),[M,B]=C.useState(!1),[q,F]=C.useState(null),[oe,fe]=C.useState([]),[me,X]=C.useState(!1),[H,ae]=C.useState(()=>{try{return JSON.parse(localStorage.getItem("dismissedWorkstreamSuggestions")||"[]")}catch{return[]}});C.useEffect(()=>{Ze(),ne(),J()},[]);const ne=async()=>{try{const Z=await ke.getWorkstreamHookStatus();L({...Z,loading:!1})}catch(Z){L({isInstalled:!1,loading:!1,error:Z.message})}},J=async()=>{try{X(!0);const[Z,Pe]=await Promise.all([ke.getActivitySummary(),ke.getWorkstreamSuggestions()]);F(Z),fe(Pe.suggestions||[])}catch(Z){console.log("Activity data not available:",Z.message)}finally{X(!1)}},ie=Z=>{y(Z.name),T([...Z.projects]),E(`# Auto-generated workstream based on activity patterns
2335
+ `);if(s.length<2)return r;const o=s[0].split("|").filter(d=>d.trim()).map(d=>`<th class="border border-border px-3 py-2 bg-muted font-semibold text-left">${d.trim()}</th>`).join(""),u=s.slice(2).map(d=>`<tr>${d.split("|").filter(c=>c.trim()).map(c=>`<td class="border border-border px-3 py-2">${c.trim()}</td>`).join("")}</tr>`).join("");return`<table class="w-full border-collapse border border-border my-4"><thead><tr>${o}</tr></thead><tbody>${u}</tbody></table>`}),t.replace(/^### (.*$)/gim,'<h3 class="text-lg font-semibold mt-6 mb-2 text-foreground">$1</h3>').replace(/^## (.*$)/gim,'<h2 class="text-xl font-semibold mt-8 mb-4 text-foreground">$1</h2>').replace(/^# (.*$)/gim,'<h1 class="text-2xl font-bold mb-6 text-foreground">$1</h1>').replace(/!\[([^\]]*)\]\(([^)]+)\)/g,'<img src="$2" alt="$1" class="rounded-lg shadow-lg my-4 max-w-full border border-border" />').replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`([^`]+)`/g,'<code class="bg-muted px-1.5 py-0.5 rounded text-sm font-mono">$1</code>').replace(/^- (.*$)/gim,'<li class="ml-4">$1</li>').replace(/(<li.*<\/li>\n?)+/g,'<ul class="list-disc my-2">$&</ul>').replace(/^\d+\. (.*$)/gim,'<li class="ml-4">$1</li>').replace(/\n\n/g,'</p><p class="my-3 text-foreground">').replace(/\n/g,"<br/>")}function NH(){const[e,t]=C.useState("installation"),[r,s]=C.useState({"getting-started":!0}),o=d=>{s(l=>({...l,[d]:!l[d]}))},u=jH[e];return n.jsxs("div",{className:"flex h-full",children:[n.jsxs("div",{className:"w-64 border-r border-border bg-muted/50 flex flex-col",children:[n.jsx("div",{className:"p-4 border-b border-border",children:n.jsxs("h2",{className:"font-semibold flex items-center gap-2 text-foreground",children:[n.jsx(Li,{className:"w-5 h-5"}),"Documentation"]})}),n.jsx(Nn,{className:"flex-1",children:n.jsx("div",{className:"p-2",children:dH.map(d=>n.jsxs("div",{className:"mb-1",children:[n.jsxs("button",{className:je("w-full flex items-center gap-2 px-3 py-2 text-sm rounded-md hover:bg-accent text-left",(e===d.id||d.subsections.some(l=>l.id===e))&&"bg-accent"),onClick:()=>{d.subsections.length>0?(o(d.id),r[d.id]||t(d.subsections[0].id)):t(d.id)},children:[n.jsx(d.icon,{className:"w-4 h-4 text-muted-foreground"}),n.jsx("span",{className:"flex-1",children:d.title}),d.isNew&&n.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded font-medium bg-green-500/20 text-green-600 dark:text-green-400",children:"new"}),d.subsections.length>0&&n.jsx(Kr,{className:je("w-4 h-4 text-muted-foreground transition-transform",r[d.id]&&"rotate-90")})]}),d.subsections.length>0&&r[d.id]&&n.jsx("div",{className:"ml-6 mt-1 space-y-1",children:d.subsections.map(l=>n.jsx("button",{className:je("w-full text-left px-3 py-1.5 text-sm rounded-md hover:bg-accent text-foreground",e===l.id&&"bg-accent text-primary font-medium"),onClick:()=>t(l.id),children:l.title},l.id))})]},d.id))})})]}),n.jsx("div",{className:"flex-1 overflow-hidden",children:n.jsx(Nn,{className:"h-full",children:n.jsx("div",{className:"max-w-3xl mx-auto p-8",children:u?n.jsx("div",{className:"prose prose-sm max-w-none",children:n.jsx("div",{dangerouslySetInnerHTML:{__html:I2(u.content)}})}):n.jsxs("div",{className:"text-center text-muted-foreground py-12",children:[n.jsx(Li,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),n.jsx("p",{children:"Select a topic from the sidebar"})]})})})})]})}var EH={};const Lw={development:"bg-blue-100 text-blue-700 border-blue-200 dark:bg-blue-900/30 dark:text-blue-400 dark:border-blue-800",productivity:"bg-green-100 text-green-700 border-green-200 dark:bg-green-900/30 dark:text-green-400 dark:border-green-800",integration:"bg-purple-100 text-purple-700 border-purple-200 dark:bg-purple-900/30 dark:text-purple-400 dark:border-purple-800",external:"bg-orange-100 text-orange-700 border-orange-200 dark:bg-orange-900/30 dark:text-orange-400 dark:border-orange-800",lsp:"bg-cyan-100 text-cyan-700 border-cyan-200 dark:bg-cyan-900/30 dark:text-cyan-400 dark:border-cyan-800",default:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-700"};function PH(){var ae,ne,J,ie,ye,Oe,Ve;const[e,t]=C.useState(!0),[r,s]=C.useState({allPlugins:[],categories:[],marketplaces:[],enabledPlugins:null}),[o,u]=C.useState(""),[d,l]=C.useState([]),[c,f]=C.useState([]),[m,h]=C.useState(!0),[x,w]=C.useState(!0),[k,_]=C.useState(!0),[v,b]=C.useState(!0),[g,y]=C.useState("name"),[j,E]=C.useState(null),[P,T]=C.useState({open:!1,repo:""}),[N,R]=C.useState(!1),[I,O]=C.useState({open:!1,plugin:null}),[$,W]=C.useState(!1),Y=async()=>{t(!0);try{const te=await ke.getPlugins();s(te)}catch(te){ee.error("Failed to load plugins: "+te.message)}finally{t(!1)}};C.useEffect(()=>{Y()},[]);const z=C.useMemo(()=>{let te=r.allPlugins||[];if(o){const de=o.toLowerCase();te=te.filter(De=>{var Re,Ze,Se;return((Re=De.name)==null?void 0:Re.toLowerCase().includes(de))||((Ze=De.description)==null?void 0:Ze.toLowerCase().includes(de))||((Se=De.category)==null?void 0:Se.toLowerCase().includes(de))})}return te=te.filter(de=>!(de.sourceType==="external"&&!x||de.sourceType==="internal"&&!m)),te=te.filter(de=>!(de.installed&&!k||!de.installed&&!v)),d.length>0&&(te=te.filter(de=>d.includes(de.category))),c.length>0&&(te=te.filter(de=>c.includes(de.marketplace))),te.sort((de,De)=>{if(g==="installed"){if(de.installed&&!De.installed)return-1;if(!de.installed&&De.installed)return 1}if(g==="category"){const Re=(de.category||"zzz").localeCompare(De.category||"zzz");if(Re!==0)return Re}return de.name.localeCompare(De.name)}),te},[r.allPlugins,o,x,m,k,v,d,c,g]),K=te=>{l(de=>de.includes(te)?de.filter(De=>De!==te):[...de,te])},G=te=>{f(de=>de.includes(te)?de.filter(De=>De!==te):[...de,te])},U=async te=>{E(te);try{const de=await ke.refreshMarketplace(te);de.success?(ee.success(`Refreshed ${te}`),await Y()):ee.error(de.error||"Failed to refresh marketplace")}catch(de){ee.error("Failed to refresh: "+de.message)}finally{E(null)}},L=async()=>{if(!P.repo.trim()){ee.error("Please enter a repository URL");return}try{const te=await ke.addMarketplace("",P.repo.trim());te.success?(ee.success("Marketplace added"),T({open:!1,repo:""}),await Y()):ee.error(te.error||"Failed to add marketplace")}catch(te){ee.error("Failed to add marketplace: "+te.message)}},M=async(te,de,De)=>{W(!0);try{const Re=De!==!0,Ze=await ke.setPluginEnabled(te,de,Re);Ze.success?(ee.success(`Plugin ${Re?"enabled":"disabled"} for ${te===EH.HOME?"~":te}`),await Y()):ee.error(Ze.error||"Failed to update plugin state")}catch(Re){ee.error("Failed to update plugin: "+Re.message)}finally{W(!1)}},B=async(te,de)=>{W(!0);try{const De=await ke.setPluginEnabled(te,de,null);De.success?(ee.success("Plugin override removed"),await Y()):ee.error(De.error||"Failed to remove override")}catch(De){ee.error("Failed to update plugin: "+De.message)}finally{W(!1)}},q=te=>{O({open:!0,plugin:te})},F=(r.allPlugins||[]).filter(te=>te.installed).length,oe=(r.allPlugins||[]).filter(te=>!te.installed).length,fe=(r.allPlugins||[]).filter(te=>te.sourceType==="internal").length,me=(r.allPlugins||[]).filter(te=>te.sourceType==="external").length,X=r.marketplaces||[],H=r.categories||[];return e?n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsx(ut,{className:"w-8 h-8 animate-spin text-primary"})}):n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"bg-indigo-50 dark:bg-indigo-950/30 border border-indigo-200 dark:border-indigo-800 rounded-lg p-4 flex items-start gap-3",children:[n.jsx(Yu,{className:"w-5 h-5 text-indigo-600 dark:text-indigo-400 flex-shrink-0 mt-0.5"}),n.jsxs("div",{className:"text-sm text-indigo-800 dark:text-indigo-300",children:[n.jsx("p",{className:"font-medium",children:"Install plugins from Project Explorer"}),n.jsxs("p",{className:"text-indigo-600 dark:text-indigo-400 mt-1",children:["Use the ",n.jsx("kbd",{className:"px-1.5 py-0.5 bg-indigo-100 dark:bg-indigo-900 rounded text-xs",children:"+"}),' menu on any project and select "Install Plugins" to add plugins with project-level scope control.']})]})]}),n.jsxs("div",{className:"bg-white dark:bg-slate-950 rounded-xl border border-gray-200 dark:border-slate-800 overflow-hidden shadow-sm",children:[n.jsxs("div",{className:"p-5 border-b border-gray-200 dark:border-slate-700",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white flex items-center gap-2",children:[n.jsx(Fi,{className:"w-5 h-5 text-indigo-600"}),"Plugin Directory",n.jsxs(Qe,{variant:"outline",className:"ml-2 font-normal",children:[z.length," of ",((ae=r.allPlugins)==null?void 0:ae.length)||0]})]}),n.jsx(le,{variant:"ghost",size:"sm",onClick:Y,disabled:e,children:n.jsx(pr,{className:`w-4 h-4 ${e?"animate-spin":""}`})})]}),n.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(_l,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),n.jsx(ct,{value:o,onChange:te=>u(te.target.value),placeholder:"Search plugins...",className:"pl-9 bg-white dark:bg-slate-900 border-gray-300 dark:border-slate-700"})]}),n.jsxs(fr,{value:g,onValueChange:y,children:[n.jsx(ar,{className:"w-40",children:n.jsx(mr,{placeholder:"Sort by"})}),n.jsxs(lr,{children:[n.jsx(xt,{value:"name",children:"Name"}),n.jsx(xt,{value:"installed",children:"Installed first"}),n.jsx(xt,{value:"category",children:"Category"})]})]})]}),n.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[n.jsxs(ai,{children:[n.jsx(li,{asChild:!0,children:n.jsxs(le,{variant:"outline",size:"sm",className:"h-8 text-xs gap-1",children:[n.jsx(Yc,{className:"w-3 h-3"}),"Marketplace",c.length>0&&n.jsx(Qe,{variant:"secondary",className:"ml-1 h-4 px-1 text-[10px]",children:c.length}),n.jsx(Sr,{className:"w-3 h-3 ml-1"})]})}),n.jsxs(ks,{align:"start",className:"w-56",children:[n.jsx(ul,{className:"text-xs",children:"Filter by marketplace"}),n.jsx(Or,{}),X.length>0?X.map(te=>n.jsx(cl,{checked:c.includes(te.name),onCheckedChange:()=>G(te.name),children:te.name},te.name)):n.jsx("div",{className:"px-2 py-1.5 text-xs text-muted-foreground",children:"No marketplaces"}),n.jsx(Or,{}),n.jsxs(Pt,{onClick:()=>R(!0),children:[n.jsx(kn,{className:"w-3 h-3 mr-2"}),"Manage Marketplaces"]}),c.length>0&&n.jsxs(n.Fragment,{children:[n.jsx(Or,{}),n.jsx(Pt,{onClick:()=>f([]),children:"Clear filters"})]})]})]}),n.jsxs(ai,{children:[n.jsx(li,{asChild:!0,children:n.jsxs(le,{variant:"outline",size:"sm",className:"h-8 text-xs gap-1",children:[n.jsx(S1,{className:"w-3 h-3"}),"Category",d.length>0&&n.jsx(Qe,{variant:"secondary",className:"ml-1 h-4 px-1 text-[10px]",children:d.length}),n.jsx(Sr,{className:"w-3 h-3 ml-1"})]})}),n.jsxs(ks,{align:"start",className:"w-48",children:[n.jsx(ul,{className:"text-xs",children:"Filter by category"}),n.jsx(Or,{}),H.map(te=>n.jsx(cl,{checked:d.includes(te),onCheckedChange:()=>K(te),children:te},te)),d.length>0&&n.jsxs(n.Fragment,{children:[n.jsx(Or,{}),n.jsx(Pt,{onClick:()=>l([]),children:"Clear filters"})]})]})]}),n.jsxs("div",{className:"flex items-center gap-4 text-xs",children:[n.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[n.jsx(dt,{checked:k,onCheckedChange:_,className:"h-4 w-7 data-[state=checked]:bg-green-600"}),n.jsxs("span",{className:"text-gray-600 dark:text-slate-400",children:["Installed (",F,")"]})]}),n.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[n.jsx(dt,{checked:v,onCheckedChange:b,className:"h-4 w-7 data-[state=checked]:bg-blue-600"}),n.jsxs("span",{className:"text-gray-600 dark:text-slate-400",children:["Available (",oe,")"]})]}),n.jsx("span",{className:"text-gray-300 dark:text-slate-600",children:"|"}),n.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[n.jsx(dt,{checked:m,onCheckedChange:h,className:"h-4 w-7 data-[state=checked]:bg-indigo-600"}),n.jsxs("span",{className:"text-gray-600 dark:text-slate-400 flex items-center gap-1",children:[n.jsx(y1,{className:"w-3 h-3"})," Anthropic (",fe,")"]})]}),n.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[n.jsx(dt,{checked:x,onCheckedChange:w,className:"h-4 w-7 data-[state=checked]:bg-orange-600"}),n.jsxs("span",{className:"text-gray-600 dark:text-slate-400 flex items-center gap-1",children:[n.jsx(Bi,{className:"w-3 h-3"})," Community (",me,")"]})]})]})]})]}),n.jsxs("div",{className:"p-4 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[z.map((te,de)=>{const De=Lw[te.category]||Lw.default,Re=te.mcpServers?Object.keys(te.mcpServers).length:0,Ze=te.lspServers?Object.keys(te.lspServers).length:0,Se=`${te.name}@${te.marketplace}`,ge=te.enabledState,Me=(ge==null?void 0:ge.merged)===!0;return(ge==null?void 0:ge.merged)!==null&&(ge==null||ge.merged),n.jsxs(Eo.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:Math.min(de*.02,.3)},className:`rounded-lg border p-4 transition-all hover:shadow-md ${Me?"bg-emerald-50 border-emerald-200 dark:bg-emerald-950/20 dark:border-emerald-800":te.installed?"bg-green-50 border-green-200 dark:bg-green-950/20 dark:border-green-800":"bg-white border-gray-200 dark:bg-slate-900 dark:border-slate-700"}`,children:[n.jsxs("div",{className:"flex items-start justify-between mb-2",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:te.name}),te.sourceType==="external"&&n.jsx(Bi,{className:"w-3.5 h-3.5 text-orange-500 flex-shrink-0",title:"Community plugin"})]}),n.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[te.installed&&n.jsxs(Qe,{variant:"outline",className:"text-green-600 border-green-300 dark:text-green-400 dark:border-green-700 text-[10px]",children:[n.jsx(Kt,{className:"w-2.5 h-2.5 mr-0.5"}),"Installed"]}),Me&&n.jsxs(Qe,{variant:"outline",className:"text-emerald-600 border-emerald-300 dark:text-emerald-400 dark:border-emerald-700 text-[10px]",children:[n.jsx(sb,{className:"w-2.5 h-2.5 mr-0.5"}),"Enabled"]})]})]}),n.jsxs("div",{className:"flex items-center gap-1",children:[te.installed&&n.jsx(zo,{children:n.jsxs(on,{children:[n.jsx(an,{asChild:!0,children:n.jsx(le,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-60 hover:opacity-100",onClick:()=>q(te),children:n.jsx(kn,{className:"w-4 h-4"})})}),n.jsx(qr,{children:n.jsx("p",{children:"Configure per-directory"})})]})}),te.homepage&&n.jsx(le,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-60 hover:opacity-100",onClick:()=>window.open(te.homepage,"_blank"),children:n.jsx(du,{className:"w-4 h-4"})})]})]}),n.jsx("p",{className:"text-sm text-gray-600 dark:text-slate-400 mb-3 line-clamp-2",children:te.description||"No description available"}),n.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-2",children:[te.category&&n.jsx(Qe,{variant:"outline",className:`text-[10px] px-1.5 py-0 ${De}`,children:te.category}),te.version&&n.jsxs("span",{className:"text-[10px] text-gray-400 dark:text-slate-500",children:["v",te.version]})]}),(Re>0||Ze>0||te.commands)&&n.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-gray-500 dark:text-slate-500 pt-2 border-t border-gray-100 dark:border-slate-800",children:[Ze>0&&n.jsxs("span",{className:"flex items-center gap-1 bg-cyan-50 dark:bg-cyan-900/20 px-1.5 py-0.5 rounded",children:[n.jsx(ns,{className:"w-3 h-3 text-cyan-600"}),Ze," LSP"]}),Re>0&&n.jsxs("span",{className:"flex items-center gap-1 bg-blue-50 dark:bg-blue-900/20 px-1.5 py-0.5 rounded",children:[n.jsx(Fn,{className:"w-3 h-3 text-blue-600"}),Re," MCP"]}),te.commands&&n.jsxs("span",{className:"flex items-center gap-1 bg-green-50 dark:bg-green-900/20 px-1.5 py-0.5 rounded",children:[n.jsx(Ft,{className:"w-3 h-3 text-green-600"}),"Commands"]})]})]},Se)}),z.length===0&&n.jsxs("div",{className:"col-span-full text-center py-12 text-gray-500 dark:text-slate-400",children:[n.jsx(Fi,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),n.jsx("p",{className:"font-medium",children:"No plugins found"}),n.jsx("p",{className:"text-sm mt-1",children:"Try adjusting your filters or search query"}),(d.length>0||c.length>0||o)&&n.jsx(le,{variant:"link",size:"sm",onClick:()=>{l([]),f([]),u("")},className:"mt-2",children:"Clear all filters"})]})]})]}),n.jsx(Tt,{open:P.open,onOpenChange:te=>T({...P,open:te}),children:n.jsxs(St,{className:"max-w-lg",children:[n.jsxs(Ct,{children:[n.jsxs(kt,{className:"flex items-center gap-2",children:[n.jsx(Yc,{className:"w-5 h-5 text-purple-600"}),"Add Plugin Marketplace"]}),n.jsx(tr,{children:"Add a marketplace from a GitHub repository URL or local path."})]}),n.jsx("div",{className:"space-y-4 py-4",children:n.jsxs("div",{children:[n.jsx("label",{className:"text-sm font-medium text-gray-700 dark:text-slate-300",children:"Repository URL or Path"}),n.jsx(ct,{value:P.repo,onChange:te=>T({...P,repo:te.target.value}),placeholder:"owner/repo or full GitHub URL",className:"mt-1"}),n.jsx("p",{className:"text-xs text-gray-500 dark:text-slate-400 mt-2",children:"Supported formats:"}),n.jsxs("ul",{className:"text-xs text-gray-500 dark:text-slate-400 mt-1 space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("code",{className:"bg-gray-100 dark:bg-slate-700 px-1 rounded",children:"owner/repo"})," — GitHub shorthand"]}),n.jsxs("li",{children:[n.jsx("code",{className:"bg-gray-100 dark:bg-slate-700 px-1 rounded",children:"https://github.com/owner/repo"})," — Full URL"]}),n.jsxs("li",{children:[n.jsx("code",{className:"bg-gray-100 dark:bg-slate-700 px-1 rounded",children:"/local/path"})," — Local directory"]})]}),n.jsxs("p",{className:"text-xs text-gray-400 dark:text-slate-500 mt-2",children:["Search GitHub for ",n.jsx("code",{className:"bg-gray-100 dark:bg-slate-700 px-1 rounded",children:"claude-plugins"})," to find community marketplaces."]})]})}),n.jsxs(It,{children:[n.jsx(le,{variant:"ghost",onClick:()=>T({open:!1,repo:""}),children:"Cancel"}),n.jsxs(le,{onClick:L,className:"bg-purple-600 hover:bg-purple-700 text-white",children:[n.jsx(yt,{className:"w-4 h-4 mr-2"}),"Add Marketplace"]})]})]})}),n.jsx(Tt,{open:N,onOpenChange:R,children:n.jsxs(St,{className:"max-w-2xl",children:[n.jsxs(Ct,{children:[n.jsxs(kt,{className:"flex items-center gap-2",children:[n.jsx(Yc,{className:"w-5 h-5 text-purple-600"}),"Plugin Marketplaces",n.jsx(Qe,{variant:"outline",className:"ml-2 font-normal",children:X.length})]}),n.jsx(tr,{children:"Manage your plugin marketplaces. Add external marketplaces to discover more plugins."})]}),n.jsx("div",{className:"py-4",children:X.length>0?n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:X.map(te=>{var De,Re,Ze;const de=(((De=te.plugins)==null?void 0:De.length)||0)+(((Re=te.externalPlugins)==null?void 0:Re.length)||0);return n.jsxs("div",{className:"bg-purple-50 dark:bg-purple-950/20 rounded-lg border border-purple-200 dark:border-purple-800 p-4",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("h3",{className:"font-semibold text-purple-900 dark:text-purple-200",children:te.name}),n.jsx(le,{variant:"ghost",size:"sm",onClick:()=>U(te.name),disabled:j===te.name,className:"h-7 w-7 p-0",children:n.jsx(pr,{className:`w-4 h-4 text-purple-600 dark:text-purple-400 ${j===te.name?"animate-spin":""}`})})]}),n.jsx("p",{className:"text-sm text-purple-700 dark:text-purple-300 mb-2 truncate",children:typeof te.source=="string"?te.source:((Ze=te.source)==null?void 0:Ze.repo)||"Unknown source"}),n.jsxs("div",{className:"flex items-center justify-between text-xs text-purple-600 dark:text-purple-400",children:[n.jsxs("span",{children:[de," plugins"]}),te.lastUpdated&&n.jsxs("span",{children:["Updated: ",new Date(te.lastUpdated).toLocaleDateString()]})]})]},te.name)})}):n.jsxs("div",{className:"text-center py-8 text-gray-500 dark:text-slate-400",children:[n.jsx(Yc,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),n.jsx("p",{children:"No marketplaces configured."}),n.jsx("p",{className:"text-sm mt-1",children:"Add a marketplace to discover plugins."})]})}),n.jsxs(It,{children:[n.jsx(le,{variant:"outline",onClick:()=>R(!1),children:"Close"}),n.jsxs(le,{onClick:()=>{R(!1),T({open:!0,repo:""})},className:"bg-purple-600 hover:bg-purple-700 text-white",children:[n.jsx(yt,{className:"w-4 h-4 mr-2"}),"Add Marketplace"]})]})]})}),n.jsx(Tt,{open:I.open,onOpenChange:te=>O({...I,open:te}),children:n.jsxs(St,{className:"max-w-lg",children:[n.jsxs(Ct,{children:[n.jsxs(kt,{className:"flex items-center gap-2",children:[n.jsx(tb,{className:"w-5 h-5 text-emerald-600"}),"Configure Plugin: ",(ne=I.plugin)==null?void 0:ne.name]}),n.jsx(tr,{children:"Enable or disable this plugin for specific directories. Child directories inherit parent settings unless overridden."})]}),n.jsxs("div",{className:"space-y-3 py-4 max-h-[400px] overflow-y-auto",children:[(ye=(ie=(J=I.plugin)==null?void 0:J.enabledState)==null?void 0:ie.perDir)==null?void 0:ye.map((te,de)=>{const De=`${I.plugin.name}@${I.plugin.marketplace}`,Re=te.enabled!==null&&te.enabled!==void 0,Ze=te.enabled===!0,Se=te.enabled===!1;let ge=null;if(!Re&&de>0)for(let Me=de-1;Me>=0;Me--){const ht=I.plugin.enabledState.perDir[Me];if(ht.enabled!==null&&ht.enabled!==void 0){ge=ht.enabled;break}}return n.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${Ze?"bg-emerald-50 border-emerald-200 dark:bg-emerald-950/30 dark:border-emerald-800":Se?"bg-red-50 border-red-200 dark:bg-red-950/30 dark:border-red-800":"bg-gray-50 border-gray-200 dark:bg-slate-800/50 dark:border-slate-700"}`,children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("code",{className:"text-sm font-mono text-gray-700 dark:text-slate-300 truncate",children:te.label}),!Re&&ge!==null&&n.jsxs(Qe,{variant:"outline",className:"text-[10px] text-gray-500",children:["inherited: ",ge?"on":"off"]})]}),Re&&n.jsx("p",{className:"text-[10px] text-gray-500 dark:text-slate-400 mt-0.5",children:Ze?"Explicitly enabled":"Explicitly disabled"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[Re&&n.jsx(zo,{children:n.jsxs(on,{children:[n.jsx(an,{asChild:!0,children:n.jsx(le,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 text-gray-400 hover:text-gray-600",onClick:()=>B(te.dir,De),disabled:$,children:n.jsx(s5,{className:"w-4 h-4"})})}),n.jsx(qr,{children:n.jsx("p",{children:"Remove override (inherit from parent)"})})]})}),n.jsxs("div",{className:"flex items-center gap-1 border rounded-lg overflow-hidden",children:[n.jsx(le,{variant:Ze?"default":"ghost",size:"sm",className:`h-7 px-2 rounded-none ${Ze?"bg-emerald-600 hover:bg-emerald-700 text-white":""}`,onClick:()=>M(te.dir,De,!1),disabled:$||Ze,children:n.jsx(sb,{className:"w-3 h-3"})}),n.jsx(le,{variant:Se?"default":"ghost",size:"sm",className:`h-7 px-2 rounded-none ${Se?"bg-red-600 hover:bg-red-700 text-white":""}`,onClick:()=>M(te.dir,De,!0),disabled:$||Se,children:n.jsx(y5,{className:"w-3 h-3"})})]})]})]},te.dir)}),(!((Ve=(Oe=I.plugin)==null?void 0:Oe.enabledState)!=null&&Ve.perDir)||I.plugin.enabledState.perDir.length===0)&&n.jsxs("div",{className:"text-center py-8 text-gray-500 dark:text-slate-400",children:[n.jsx(tb,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),n.jsx("p",{children:"No config hierarchy found."}),n.jsx("p",{className:"text-sm mt-1",children:"Create a .claude/mcps.json in your project first."})]})]}),n.jsx(It,{children:n.jsx(le,{variant:"ghost",onClick:()=>O({open:!1,plugin:null}),children:"Done"})})]})}),n.jsxs("div",{className:"bg-gray-50 dark:bg-slate-900 rounded-lg p-4 border border-transparent dark:border-slate-800",children:[n.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white mb-2",children:"CLI Commands (Claude Code)"}),n.jsxs("div",{className:"space-y-1 text-sm text-gray-600 dark:text-slate-400 font-mono",children:[n.jsx("p",{className:"text-gray-400 dark:text-slate-500",children:"# Add marketplace (one-time)"}),n.jsx("p",{children:"claude plugin marketplace add regression-io/coder-config-plugins"}),n.jsx("p",{className:"text-gray-400 dark:text-slate-500 mt-2",children:"# Install plugins from marketplace"}),n.jsx("p",{children:"claude plugin install <name>@coder-config-plugins"}),n.jsx("p",{className:"text-gray-400 dark:text-slate-500 mt-2",children:"# Manage plugins"}),n.jsx("p",{children:"claude plugin list # List installed"}),n.jsx("p",{children:"claude plugin uninstall <name> # Remove plugin"})]})]})]})}function AH({projects:e=[],onWorkstreamChange:t}){var Ke,bt;const[r,s]=C.useState([]),[o,u]=C.useState(!0),[d,l]=C.useState(null),[c,f]=C.useState(!1),[m,h]=C.useState(null),[x,w]=C.useState(!1),[k,_]=C.useState(null),[v,b]=C.useState(new Set),[g,y]=C.useState(""),[j,E]=C.useState(""),[P,T]=C.useState([]),[N,R]=C.useState(!1),[I,O]=C.useState(!1),[$,W]=C.useState({}),[Y,z]=C.useState({}),[K,G]=C.useState({}),[U,L]=C.useState({isInstalled:!1,loading:!0}),[M,B]=C.useState(!1),[q,F]=C.useState(null),[oe,fe]=C.useState([]),[me,X]=C.useState(!1),[H,ae]=C.useState(()=>{try{return JSON.parse(localStorage.getItem("dismissedWorkstreamSuggestions")||"[]")}catch{return[]}});C.useEffect(()=>{Ze(),ne(),J()},[]);const ne=async()=>{try{const Z=await ke.getWorkstreamHookStatus();L({...Z,loading:!1})}catch(Z){L({isInstalled:!1,loading:!1,error:Z.message})}},J=async()=>{try{X(!0);const[Z,Pe]=await Promise.all([ke.getActivitySummary(),ke.getWorkstreamSuggestions()]);F(Z),fe(Pe.suggestions||[])}catch(Z){console.log("Activity data not available:",Z.message)}finally{X(!1)}},ie=Z=>{y(Z.name),T([...Z.projects]),E(`# Auto-generated workstream based on activity patterns
2336
2336
 
2337
2337
  These projects are frequently worked on together.`),f(!0)},ye=Z=>{T(Pe=>Pe.filter(Le=>Le!==Z))},Oe=Z=>{P.includes(Z)||T(Pe=>[...Pe,Z])},Ve=async Z=>{const Pe=$[Z];if(!Pe&&!Y[Z]){G(Le=>({...Le,[Z]:!0}));try{const Le=await ke.getSubprojects(Z);z(st=>({...st,[Z]:Le.subprojects||[]}))}catch(Le){console.error("Failed to load subprojects:",Le),z(st=>({...st,[Z]:[]}))}finally{G(Le=>({...Le,[Z]:!1}))}}W(Le=>({...Le,[Z]:!Pe}))},te=Z=>{const Pe=Z.projects.sort().join("|"),Le=[...H,Pe];ae(Le),localStorage.setItem("dismissedWorkstreamSuggestions",JSON.stringify(Le)),fe(st=>st.filter(et=>et.projects.sort().join("|")!==Pe)),ee.success("Suggestion dismissed")},de=oe.filter(Z=>{const Pe=Z.projects.sort().join("|");return!H.includes(Pe)}),De=async()=>{if(confirm("Clear activity data older than 30 days?"))try{const Z=await ke.clearActivity(30);Z.success&&(ee.success(`Cleared ${Z.cleared} old entries`),J())}catch(Z){ee.error("Failed to clear activity: "+Z.message)}},Re=async()=>{B(!0);try{const Z=await ke.installWorkstreamHook();Z.success?(ee.success(Z.message),L(Pe=>({...Pe,isInstalled:!0}))):ee.error(Z.error||"Failed to install hook")}catch(Z){ee.error("Failed to install hook: "+Z.message)}finally{B(!1)}},Ze=async()=>{try{u(!0);const Z=await ke.getWorkstreams();s(Z.workstreams||[])}catch{ee.error("Failed to load workstreams")}finally{u(!1)}},Se=async()=>{if(!g.trim()){ee.error("Name is required");return}R(!0);try{const Z=await ke.createWorkstream(g.trim(),P,j);Z.success?(s(Pe=>[...Pe,Z.workstream]),ee.success(`Created workstream: ${g}`),f(!1),y(""),E(""),T([]),fe(Pe=>Pe.filter(Le=>Le.name!==g.trim()))):ee.error(Z.error||"Failed to create workstream")}catch(Z){ee.error("Failed to create workstream: "+Z.message)}finally{R(!1)}},ge=async Z=>{if(confirm(`Delete workstream "${Z.name}"?
2338
2338
 
@@ -19,7 +19,7 @@
19
19
 
20
20
  <!-- PWA Manifest -->
21
21
  <link rel="manifest" href="/manifest.json">
22
- <script type="module" crossorigin src="/assets/index-BEuxBYDG.js"></script>
22
+ <script type="module" crossorigin src="/assets/index-DeP-PvH7.js"></script>
23
23
  <link rel="stylesheet" crossorigin href="/assets/index-DjLdm3Mr.css">
24
24
  </head>
25
25
  <body>
@@ -315,8 +315,8 @@ function performLocalUpdate(sourcePath, manager) {
315
315
  const filesToCopy = [
316
316
  { src: 'config-loader.js', dest: 'config-loader.js' },
317
317
  { src: 'shared/mcp-registry.json', dest: 'shared/mcp-registry.json' },
318
- { src: 'shell/claude-config.zsh', dest: 'shell/claude-config.zsh' },
319
- { src: 'bin/claude-config', dest: 'bin/claude-config' }
318
+ { src: 'shell/coder-config.zsh', dest: 'shell/coder-config.zsh' },
319
+ { src: 'bin/coder-config', dest: 'bin/coder-config' }
320
320
  ];
321
321
 
322
322
  for (const { src, dest } of filesToCopy) {