@open-mercato/cezar 0.12.0-pr1120.1921 → 0.12.0-pr1121.1925

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.
@@ -4392,6 +4392,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
4392
4392
  } & {
4393
4393
  "/repo/commit/:sha": {
4394
4394
  $get: {
4395
+ output: string;
4396
+ outputFormat: "text";
4397
+ status: import("hono/utils/http-status").ContentfulStatusCode;
4398
+ input: {
4399
+ query: {
4400
+ structured?: string | string[] | undefined;
4401
+ };
4402
+ } & {
4403
+ param: {
4404
+ sha: string;
4405
+ };
4406
+ };
4407
+ } | {
4395
4408
  output: {
4396
4409
  sha: string;
4397
4410
  subject: string;
@@ -4439,19 +4452,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
4439
4452
  sha: string;
4440
4453
  };
4441
4454
  };
4442
- } | {
4443
- output: string;
4444
- outputFormat: "text";
4445
- status: import("hono/utils/http-status").ContentfulStatusCode;
4446
- input: {
4447
- query: {
4448
- structured?: string | string[] | undefined;
4449
- };
4450
- } & {
4451
- param: {
4452
- sha: string;
4453
- };
4454
- };
4455
4455
  };
4456
4456
  };
4457
4457
  } & {
@@ -10393,20 +10393,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
10393
10393
  } & {
10394
10394
  "/runs/:id/handoff": {
10395
10395
  $get: {
10396
- output: {
10397
- error: string;
10398
- };
10399
- outputFormat: "json";
10400
- status: 404;
10396
+ output: string;
10397
+ outputFormat: "text";
10398
+ status: 200;
10401
10399
  input: {
10402
10400
  param: {
10403
10401
  id: string;
10404
10402
  };
10405
10403
  };
10406
10404
  } | {
10407
- output: string;
10408
- outputFormat: "text";
10409
- status: 200;
10405
+ output: {
10406
+ error: string;
10407
+ };
10408
+ outputFormat: "json";
10409
+ status: 404;
10410
10410
  input: {
10411
10411
  param: {
10412
10412
  id: string;
@@ -10432,20 +10432,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
10432
10432
  } & {
10433
10433
  "/runs/:id/diff": {
10434
10434
  $get: {
10435
- output: {
10436
- error: string;
10437
- };
10438
- outputFormat: "json";
10439
- status: 404;
10435
+ output: string;
10436
+ outputFormat: "text";
10437
+ status: import("hono/utils/http-status").ContentfulStatusCode;
10440
10438
  input: {
10441
10439
  param: {
10442
10440
  id: string;
10443
10441
  };
10444
10442
  };
10445
10443
  } | {
10446
- output: string;
10447
- outputFormat: "text";
10448
- status: import("hono/utils/http-status").ContentfulStatusCode;
10444
+ output: {
10445
+ error: string;
10446
+ };
10447
+ outputFormat: "json";
10448
+ status: 404;
10449
10449
  input: {
10450
10450
  param: {
10451
10451
  id: string;
@@ -12594,6 +12594,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
12594
12594
  } & {
12595
12595
  "/repo/commit/:sha": {
12596
12596
  $get: {
12597
+ output: string;
12598
+ outputFormat: "text";
12599
+ status: import("hono/utils/http-status").ContentfulStatusCode;
12600
+ input: {
12601
+ query: {
12602
+ structured?: string | string[] | undefined;
12603
+ };
12604
+ } & {
12605
+ param: {
12606
+ sha: string;
12607
+ };
12608
+ };
12609
+ } | {
12597
12610
  output: {
12598
12611
  sha: string;
12599
12612
  subject: string;
@@ -12641,19 +12654,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
12641
12654
  sha: string;
12642
12655
  };
12643
12656
  };
12644
- } | {
12645
- output: string;
12646
- outputFormat: "text";
12647
- status: import("hono/utils/http-status").ContentfulStatusCode;
12648
- input: {
12649
- query: {
12650
- structured?: string | string[] | undefined;
12651
- };
12652
- } & {
12653
- param: {
12654
- sha: string;
12655
- };
12656
- };
12657
12657
  };
12658
12658
  };
12659
12659
  } & {
@@ -18595,20 +18595,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
18595
18595
  } & {
18596
18596
  "/runs/:id/handoff": {
18597
18597
  $get: {
18598
- output: {
18599
- error: string;
18600
- };
18601
- outputFormat: "json";
18602
- status: 404;
18598
+ output: string;
18599
+ outputFormat: "text";
18600
+ status: 200;
18603
18601
  input: {
18604
18602
  param: {
18605
18603
  id: string;
18606
18604
  };
18607
18605
  };
18608
18606
  } | {
18609
- output: string;
18610
- outputFormat: "text";
18611
- status: 200;
18607
+ output: {
18608
+ error: string;
18609
+ };
18610
+ outputFormat: "json";
18611
+ status: 404;
18612
18612
  input: {
18613
18613
  param: {
18614
18614
  id: string;
@@ -18634,20 +18634,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
18634
18634
  } & {
18635
18635
  "/runs/:id/diff": {
18636
18636
  $get: {
18637
- output: {
18638
- error: string;
18639
- };
18640
- outputFormat: "json";
18641
- status: 404;
18637
+ output: string;
18638
+ outputFormat: "text";
18639
+ status: import("hono/utils/http-status").ContentfulStatusCode;
18642
18640
  input: {
18643
18641
  param: {
18644
18642
  id: string;
18645
18643
  };
18646
18644
  };
18647
18645
  } | {
18648
- output: string;
18649
- outputFormat: "text";
18650
- status: import("hono/utils/http-status").ContentfulStatusCode;
18646
+ output: {
18647
+ error: string;
18648
+ };
18649
+ outputFormat: "json";
18650
+ status: 404;
18651
18651
  input: {
18652
18652
  param: {
18653
18653
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-mercato/cezar",
3
- "version": "0.12.0-pr1120.1921",
3
+ "version": "0.12.0-pr1121.1925",
4
4
  "description": "Local cockpit for running and tracking AI agent tasks in your repo. Uses your logged-in `claude` CLI and `gh` — zero config, zero database.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -54,8 +54,8 @@
54
54
  "zod": "^4.4.3"
55
55
  },
56
56
  "devDependencies": {
57
- "@open-mercato/cezar-api-client": "0.12.0-pr1120.1921",
58
- "@open-mercato/cezar-contract": "0.12.0-pr1120.1921",
57
+ "@open-mercato/cezar-api-client": "0.12.0-pr1121.1925",
58
+ "@open-mercato/cezar-contract": "0.12.0-pr1121.1925",
59
59
  "@types/node": "^20.14.0",
60
60
  "@types/proper-lockfile": "4.1.4",
61
61
  "@types/ws": "^8.18.1",
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{k as r}from"./centered-state-CLXeAT-P.js";import{r as i,t as a}from"./utils-R1j1Kev9.js";import{i as o,r as s,s as c,t as l}from"./popover-CBd2q-UG.js";import{a as u,c as d}from"./picker-pill-B4psQ_6Z.js";import{a as f,i as p,o as m,r as h,s as g,t as _}from"./command-INYKi4fh.js";import{t as v}from"./sparkles-IOH7tM19.js";import{t as y}from"./project-router-CkynDkNI.js";import{c as b,d as x,f as S,i as C,u as w}from"./skills-9oR_oHse.js";import{l as T,z as E}from"./index-BZbTHu4_.js";var D=i(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),O=n();function k({name:e,route:t,selected:n,list:r,detail:i}){return(0,O.jsxs)(`div`,{"data-route":t,className:`flex h-full min-h-0 items-stretch`,children:[(0,O.jsx)(`section`,{"data-slot":`${e}-list`,className:a(`w-full min-h-0 flex-col overflow-y-auto overscroll-contain border-border md:flex md:w-[360px] md:shrink-0 md:border-r`,n?`hidden`:`flex`),children:r}),(0,O.jsx)(`section`,{"data-slot":`${e}-detail`,className:a(`min-w-0 min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain`,n?`flex`:`hidden md:flex`),children:i})]})}function A(e){return`${e.kind===`pr`?`Address GitHub pull request`:`Fix GitHub issue`} #${e.number}: ${e.title}\n\n${e.url}`}function j(e,t=[]){let n=A(e);return e.body?.trim()&&(n+=`\n\n---\n\n${e.body.trim()}`),t.length&&(n+=M(t)),n}function M(e){return`\n\nUse these skills where relevant: ${e.join(`, `)}.`}function N(e,t){return e.replace(/\{\{\s*number\s*\}\}/gi,()=>`#${t.number}`).replace(/\{\{\s*title\s*\}\}/gi,()=>t.title).replace(/\{\{\s*url\s*\}\}/gi,()=>t.url)}function P(e,t){if(e.includes(t.url))return!0;let n=t.kind===`pr`?String.raw`(?:pull\s+request|pr)`:String.raw`issue`;return new RegExp(String.raw`\b${n}\s*#?\s*${t.number}\b`,`i`).test(e)}function F(e,t,n){let r=(n??``).trim();if(!r)return j(e,t);let i=A(e),a=r.startsWith(i)?i+N(r.slice(i.length),e):N(r,e),o=P(a,e)?a:`${i}\n\n${a}`;return t.length?o+M(t):o}function I(e){let t=[];for(let n of e.slice(0,8)){let e=new Set(t.map(e=>e.id)),r=n;for(let t=2;e.has(r);t++)r=`${n}-${t}`;t.push({id:r,name:n,skill:n,prompt:`{{task}}`})}return t}function L(e,t,n,r,i={}){return t?{...i,workflow:t,task:F(e,n,r)}:n.length?{...i,steps:I(n),task:F(e,[],r)}:{...i,workflow:`quick-task`,task:F(e,[],r)}}function R({resolved:e,dataSlot:t}){return e.providerPending||e.canRun?null:(0,O.jsxs)(`span`,{"data-slot":t,className:`inline-flex flex-wrap items-center gap-1 text-xs text-muted-foreground`,children:[e.providerError?`Provider authentication could not be verified.`:`Connect an agent provider to run this item.`,(0,O.jsx)(y,{to:`/settings/agents#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]})}var z=e(t(),1);function B({workflows:e,value:t,onChange:n,slotPrefix:i=`gh`}){let[d,v]=(0,z.useState)(!1),[y,b]=(0,z.useState)(``),C=(0,z.useRef)(null),w=x(e,y);return(0,O.jsxs)(l,{open:d,onOpenChange:e=>{v(e),e||b(``)},children:[(0,O.jsx)(o,{asChild:!0,children:(0,O.jsxs)(`button`,{type:`button`,"data-slot":`${i}-workflow-trigger`,"aria-label":`Choose a workflow`,className:a(u,t&&`border-foreground/60 font-mono text-[11.5px] font-semibold text-foreground`),children:[(0,O.jsx)(E,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),(0,O.jsx)(`span`,{className:`max-w-44 truncate`,children:t??`workflow`}),(0,O.jsx)(c,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,O.jsx)(s,{align:`start`,sideOffset:8,className:`w-[320px] max-w-[calc(100vw-2rem)] p-0`,children:(0,O.jsxs)(_,{label:`Choose a workflow`,shouldFilter:!1,children:[(0,O.jsx)(f,{placeholder:`search workflows…`,value:y,onValueChange:b,onInput:()=>C.current?.scrollTo(0,0)}),(0,O.jsxs)(g,{ref:C,"data-slot":`${i}-workflow-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[w.length===0?(0,O.jsx)(h,{children:`Nothing matches.`}):null,(0,O.jsx)(p,{children:w.map(e=>{let a=t===e.name;return(0,O.jsxs)(m,{value:`workflow ${e.name}`,keywords:S(e.name,e.description),"data-slot":`${i}-workflow-option`,"data-workflow":e.name,onSelect:()=>{n(a?null:e.name),v(!1)},children:[(0,O.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:e.name}),e.description?(0,O.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,a?(0,O.jsx)(r,{"aria-hidden":`true`,className:`ml-auto size-3.5 shrink-0 text-primary`}):null]},e.name)})})]})]})})]})}function V({skills:e,skillUsage:t,selected:n,onToggle:i,maxSelections:y,slotPrefix:x=`gh`}){let[E,D]=(0,z.useState)(!1),[k,A]=(0,z.useState)(``),[j,M]=(0,z.useState)(null),N=(0,z.useRef)(null),{mostUsed:P,project:F,global:I}=b(w(e,k,t),t),L=(e,t)=>{let o=n.includes(e.name);return(0,O.jsxs)(m,{value:`skill ${e.name} ${e.path}`,keywords:S(e.name,e.description),"data-slot":`${x}-skill-option`,"data-skill":e.name,"data-selected":o?`true`:void 0,disabled:!o&&y!==void 0&&n.length>=y,onSelect:()=>i(e.name),children:[(0,O.jsx)(`span`,{className:a(`shrink-0 font-mono text-xs`,t&&`font-semibold`),children:e.name}),e.description?(0,O.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,(0,O.jsx)(`button`,{type:`button`,"data-slot":`${x}-skill-view`,"aria-label":`View skill ${e.name}`,title:`View skill`,onClick:t=>{t.preventDefault(),t.stopPropagation(),M(e)},className:`ml-auto shrink-0 rounded-sm p-0.5 text-soft-foreground transition-colors hover:text-foreground`,children:(0,O.jsx)(d,{"aria-hidden":`true`,className:`size-3.5`})}),o?(0,O.jsx)(r,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}):null]},e.path)};return e.length===0?null:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(T,{skill:j,onClose:()=>M(null)}),(0,O.jsxs)(l,{open:E,onOpenChange:e=>{D(e),e||A(``)},children:[(0,O.jsx)(o,{asChild:!0,children:(0,O.jsxs)(`button`,{type:`button`,"data-slot":`${x}-skills-trigger`,"aria-label":`Choose skills`,className:a(u,n.length>0&&`border-foreground/60 font-semibold text-foreground`),children:[(0,O.jsx)(v,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),`skills`,n.length>0?` · ${n.length}`:``,(0,O.jsx)(c,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,O.jsx)(s,{align:`start`,sideOffset:8,className:`w-[336px] max-w-[calc(100vw-2rem)] p-0`,children:(0,O.jsxs)(_,{label:`Choose skills`,shouldFilter:!1,children:[(0,O.jsx)(f,{placeholder:`search skills…`,value:k,onValueChange:A,onInput:()=>N.current?.scrollTo(0,0)}),(0,O.jsxs)(g,{ref:N,"data-slot":`${x}-skill-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[P.length===0&&F.length===0&&I.length===0?(0,O.jsx)(h,{children:`Nothing matches.`}):null,P.length>0?(0,O.jsx)(p,{heading:`Most used`,children:P.map(e=>L(e,C(e)))}):null,F.length>0?(0,O.jsx)(p,{heading:`Project skills`,children:F.map(e=>L(e,!0))}):null,I.length>0?(0,O.jsx)(p,{heading:`Global`,children:I.map(e=>L(e,!1))}):null]})]})})]})]})}export{j as a,k as c,L as i,D as l,B as n,A as o,R as r,I as s,V as t};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{k as r}from"./centered-state-CLXeAT-P.js";import{r as i,t as a}from"./utils-R1j1Kev9.js";import{i as o,r as s,s as c,t as l}from"./popover-CBd2q-UG.js";import{a as u,c as d}from"./picker-pill-B4psQ_6Z.js";import{a as f,i as p,o as m,r as h,s as g,t as _}from"./command-INYKi4fh.js";import{t as v}from"./sparkles-IOH7tM19.js";import{t as y}from"./project-router-CkynDkNI.js";import{c as b,d as x,f as S,i as C,u as w}from"./skills-9oR_oHse.js";import{l as T,z as E}from"./index-BJMs7KMj.js";var D=i(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),O=n();function k({name:e,route:t,selected:n,list:r,detail:i}){return(0,O.jsxs)(`div`,{"data-route":t,className:`flex h-full min-h-0 items-stretch`,children:[(0,O.jsx)(`section`,{"data-slot":`${e}-list`,className:a(`w-full min-h-0 flex-col overflow-y-auto overscroll-contain border-border md:flex md:w-[360px] md:shrink-0 md:border-r`,n?`hidden`:`flex`),children:r}),(0,O.jsx)(`section`,{"data-slot":`${e}-detail`,className:a(`min-w-0 min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain`,n?`flex`:`hidden md:flex`),children:i})]})}function A(e){return`${e.kind===`pr`?`Address GitHub pull request`:`Fix GitHub issue`} #${e.number}: ${e.title}\n\n${e.url}`}function j(e,t=[]){let n=A(e);return e.body?.trim()&&(n+=`\n\n---\n\n${e.body.trim()}`),t.length&&(n+=M(t)),n}function M(e){return`\n\nUse these skills where relevant: ${e.join(`, `)}.`}function N(e,t){return e.replace(/\{\{\s*number\s*\}\}/gi,()=>`#${t.number}`).replace(/\{\{\s*title\s*\}\}/gi,()=>t.title).replace(/\{\{\s*url\s*\}\}/gi,()=>t.url)}function P(e,t){if(e.includes(t.url))return!0;let n=t.kind===`pr`?String.raw`(?:pull\s+request|pr)`:String.raw`issue`;return new RegExp(String.raw`\b${n}\s*#?\s*${t.number}\b`,`i`).test(e)}function F(e,t,n){let r=(n??``).trim();if(!r)return j(e,t);let i=A(e),a=r.startsWith(i)?i+N(r.slice(i.length),e):N(r,e),o=P(a,e)?a:`${i}\n\n${a}`;return t.length?o+M(t):o}function I(e){let t=[];for(let n of e.slice(0,8)){let e=new Set(t.map(e=>e.id)),r=n;for(let t=2;e.has(r);t++)r=`${n}-${t}`;t.push({id:r,name:n,skill:n,prompt:`{{task}}`})}return t}function L(e,t,n,r,i={}){return t?{...i,workflow:t,task:F(e,n,r)}:n.length?{...i,steps:I(n),task:F(e,[],r)}:{...i,workflow:`quick-task`,task:F(e,[],r)}}function R({resolved:e,dataSlot:t}){return e.providerPending||e.canRun?null:(0,O.jsxs)(`span`,{"data-slot":t,className:`inline-flex flex-wrap items-center gap-1 text-xs text-muted-foreground`,children:[e.providerError?`Provider authentication could not be verified.`:`Connect an agent provider to run this item.`,(0,O.jsx)(y,{to:`/settings/agents#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]})}var z=e(t(),1);function B({workflows:e,value:t,onChange:n,slotPrefix:i=`gh`}){let[d,v]=(0,z.useState)(!1),[y,b]=(0,z.useState)(``),C=(0,z.useRef)(null),w=x(e,y);return(0,O.jsxs)(l,{open:d,onOpenChange:e=>{v(e),e||b(``)},children:[(0,O.jsx)(o,{asChild:!0,children:(0,O.jsxs)(`button`,{type:`button`,"data-slot":`${i}-workflow-trigger`,"aria-label":`Choose a workflow`,className:a(u,t&&`border-foreground/60 font-mono text-[11.5px] font-semibold text-foreground`),children:[(0,O.jsx)(E,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),(0,O.jsx)(`span`,{className:`max-w-44 truncate`,children:t??`workflow`}),(0,O.jsx)(c,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,O.jsx)(s,{align:`start`,sideOffset:8,className:`w-[320px] max-w-[calc(100vw-2rem)] p-0`,children:(0,O.jsxs)(_,{label:`Choose a workflow`,shouldFilter:!1,children:[(0,O.jsx)(f,{placeholder:`search workflows…`,value:y,onValueChange:b,onInput:()=>C.current?.scrollTo(0,0)}),(0,O.jsxs)(g,{ref:C,"data-slot":`${i}-workflow-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[w.length===0?(0,O.jsx)(h,{children:`Nothing matches.`}):null,(0,O.jsx)(p,{children:w.map(e=>{let a=t===e.name;return(0,O.jsxs)(m,{value:`workflow ${e.name}`,keywords:S(e.name,e.description),"data-slot":`${i}-workflow-option`,"data-workflow":e.name,onSelect:()=>{n(a?null:e.name),v(!1)},children:[(0,O.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:e.name}),e.description?(0,O.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,a?(0,O.jsx)(r,{"aria-hidden":`true`,className:`ml-auto size-3.5 shrink-0 text-primary`}):null]},e.name)})})]})]})})]})}function V({skills:e,skillUsage:t,selected:n,onToggle:i,maxSelections:y,slotPrefix:x=`gh`}){let[E,D]=(0,z.useState)(!1),[k,A]=(0,z.useState)(``),[j,M]=(0,z.useState)(null),N=(0,z.useRef)(null),{mostUsed:P,project:F,global:I}=b(w(e,k,t),t),L=(e,t)=>{let o=n.includes(e.name);return(0,O.jsxs)(m,{value:`skill ${e.name} ${e.path}`,keywords:S(e.name,e.description),"data-slot":`${x}-skill-option`,"data-skill":e.name,"data-selected":o?`true`:void 0,disabled:!o&&y!==void 0&&n.length>=y,onSelect:()=>i(e.name),children:[(0,O.jsx)(`span`,{className:a(`shrink-0 font-mono text-xs`,t&&`font-semibold`),children:e.name}),e.description?(0,O.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,(0,O.jsx)(`button`,{type:`button`,"data-slot":`${x}-skill-view`,"aria-label":`View skill ${e.name}`,title:`View skill`,onClick:t=>{t.preventDefault(),t.stopPropagation(),M(e)},className:`ml-auto shrink-0 rounded-sm p-0.5 text-soft-foreground transition-colors hover:text-foreground`,children:(0,O.jsx)(d,{"aria-hidden":`true`,className:`size-3.5`})}),o?(0,O.jsx)(r,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}):null]},e.path)};return e.length===0?null:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(T,{skill:j,onClose:()=>M(null)}),(0,O.jsxs)(l,{open:E,onOpenChange:e=>{D(e),e||A(``)},children:[(0,O.jsx)(o,{asChild:!0,children:(0,O.jsxs)(`button`,{type:`button`,"data-slot":`${x}-skills-trigger`,"aria-label":`Choose skills`,className:a(u,n.length>0&&`border-foreground/60 font-semibold text-foreground`),children:[(0,O.jsx)(v,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),`skills`,n.length>0?` · ${n.length}`:``,(0,O.jsx)(c,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,O.jsx)(s,{align:`start`,sideOffset:8,className:`w-[336px] max-w-[calc(100vw-2rem)] p-0`,children:(0,O.jsxs)(_,{label:`Choose skills`,shouldFilter:!1,children:[(0,O.jsx)(f,{placeholder:`search skills…`,value:k,onValueChange:A,onInput:()=>N.current?.scrollTo(0,0)}),(0,O.jsxs)(g,{ref:N,"data-slot":`${x}-skill-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[P.length===0&&F.length===0&&I.length===0?(0,O.jsx)(h,{children:`Nothing matches.`}):null,P.length>0?(0,O.jsx)(p,{heading:`Most used`,children:P.map(e=>L(e,C(e)))}):null,F.length>0?(0,O.jsx)(p,{heading:`Project skills`,children:F.map(e=>L(e,!0))}):null,I.length>0?(0,O.jsx)(p,{heading:`Global`,children:I.map(e=>L(e,!1))}):null]})]})})]})]})}export{j as a,k as c,L as i,D as l,B as n,A as o,R as r,I as s,V as t};