@mcpc-tech/unplugin-dev-inspector-mcp 0.0.6 → 0.0.7

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/README.md CHANGED
@@ -64,11 +64,11 @@ Switch between agents (Claude Code, Goose) and track their debugging progress vi
64
64
 
65
65
  ```bash
66
66
  # npm
67
- npm i -D @mcpc-tech/unplugin-dev-inspector-mcp@beta
67
+ npm i -D @mcpc-tech/unplugin-dev-inspector-mcp
68
68
  # pnpm
69
- pnpm add -D @mcpc-tech/unplugin-dev-inspector-mcp@beta
69
+ pnpm add -D @mcpc-tech/unplugin-dev-inspector-mcp
70
70
  # yarn
71
- yarn add -D @mcpc-tech/unplugin-dev-inspector-mcp@beta
71
+ yarn add -D @mcpc-tech/unplugin-dev-inspector-mcp
72
72
  ```
73
73
 
74
74
  ```typescript
@@ -318,6 +318,12 @@ ${t}
318
318
  --text-base--line-height: calc(1.5 / 1);
319
319
  --text-lg: 1.125rem;
320
320
  --text-lg--line-height: calc(1.75 / 1.125);
321
+ --text-xl: 1.25rem;
322
+ --text-xl--line-height: calc(1.75 / 1.25);
323
+ --text-2xl: 1.5rem;
324
+ --text-2xl--line-height: calc(2 / 1.5);
325
+ --text-3xl: 1.875rem;
326
+ --text-3xl--line-height: calc(2.25 / 1.875);
321
327
  --font-weight-medium: 500;
322
328
  --font-weight-semibold: 600;
323
329
  --font-weight-bold: 700;
@@ -904,6 +910,14 @@ ${t}
904
910
  margin-block: calc(var(--spacing) * 1);
905
911
  }
906
912
 
913
+ .my-4 {
914
+ margin-block: calc(var(--spacing) * 4);
915
+ }
916
+
917
+ .my-6 {
918
+ margin-block: calc(var(--spacing) * 6);
919
+ }
920
+
907
921
  .-mt-4 {
908
922
  margin-top: calc(var(--spacing) * -4);
909
923
  }
@@ -928,6 +942,10 @@ ${t}
928
942
  margin-top: calc(var(--spacing) * 4);
929
943
  }
930
944
 
945
+ .mt-6 {
946
+ margin-top: calc(var(--spacing) * 6);
947
+ }
948
+
931
949
  .mb-0 {
932
950
  margin-bottom: calc(var(--spacing) * 0);
933
951
  }
@@ -944,6 +962,10 @@ ${t}
944
962
  margin-left: calc(var(--spacing) * 3);
945
963
  }
946
964
 
965
+ .ml-4 {
966
+ margin-left: calc(var(--spacing) * 4);
967
+ }
968
+
947
969
  .ml-auto {
948
970
  margin-left: auto;
949
971
  }
@@ -1403,6 +1425,18 @@ ${t}
1403
1425
  scroll-padding-block: calc(var(--spacing) * 1);
1404
1426
  }
1405
1427
 
1428
+ .list-outside {
1429
+ list-style-position: outside;
1430
+ }
1431
+
1432
+ .list-decimal {
1433
+ list-style-type: decimal;
1434
+ }
1435
+
1436
+ .list-disc {
1437
+ list-style-type: disc;
1438
+ }
1439
+
1406
1440
  .auto-rows-min {
1407
1441
  grid-auto-rows: min-content;
1408
1442
  }
@@ -1651,6 +1685,11 @@ ${t}
1651
1685
  border-left-width: 2px;
1652
1686
  }
1653
1687
 
1688
+ .border-l-4 {
1689
+ border-left-style: var(--tw-border-style);
1690
+ border-left-width: 4px;
1691
+ }
1692
+
1654
1693
  .border-none {
1655
1694
  --tw-border-style: none;
1656
1695
  border-style: none;
@@ -1694,6 +1733,16 @@ ${t}
1694
1733
  border-color: var(--color-muted);
1695
1734
  }
1696
1735
 
1736
+ .border-muted-foreground\\/30 {
1737
+ border-color: color-mix(in srgb, hsl(var(--muted-foreground)) 30%, transparent);
1738
+ }
1739
+
1740
+ @supports (color: color-mix(in lab, red, red)) {
1741
+ .border-muted-foreground\\/30 {
1742
+ border-color: color-mix(in oklab, var(--color-muted-foreground) 30%, transparent);
1743
+ }
1744
+ }
1745
+
1697
1746
  .border-transparent {
1698
1747
  border-color: #0000;
1699
1748
  }
@@ -2035,10 +2084,24 @@ ${t}
2035
2084
  text-align: left;
2036
2085
  }
2037
2086
 
2087
+ .font-mono {
2088
+ font-family: var(--font-mono);
2089
+ }
2090
+
2038
2091
  .font-sans {
2039
2092
  font-family: var(--font-sans);
2040
2093
  }
2041
2094
 
2095
+ .text-2xl {
2096
+ font-size: var(--text-2xl);
2097
+ line-height: var(--tw-leading, var(--text-2xl--line-height));
2098
+ }
2099
+
2100
+ .text-3xl {
2101
+ font-size: var(--text-3xl);
2102
+ line-height: var(--tw-leading, var(--text-3xl--line-height));
2103
+ }
2104
+
2042
2105
  .text-base {
2043
2106
  font-size: var(--text-base);
2044
2107
  line-height: var(--tw-leading, var(--text-base--line-height));
@@ -2054,6 +2117,11 @@ ${t}
2054
2117
  line-height: var(--tw-leading, var(--text-sm--line-height));
2055
2118
  }
2056
2119
 
2120
+ .text-xl {
2121
+ font-size: var(--text-xl);
2122
+ line-height: var(--tw-leading, var(--text-xl--line-height));
2123
+ }
2124
+
2057
2125
  .text-xs {
2058
2126
  font-size: var(--text-xs);
2059
2127
  line-height: var(--tw-leading, var(--text-xs--line-height));
@@ -2116,6 +2184,14 @@ ${t}
2116
2184
  text-wrap: balance;
2117
2185
  }
2118
2186
 
2187
+ .wrap-anywhere {
2188
+ overflow-wrap: anywhere;
2189
+ }
2190
+
2191
+ .whitespace-normal {
2192
+ white-space: normal;
2193
+ }
2194
+
2119
2195
  .whitespace-nowrap {
2120
2196
  white-space: nowrap;
2121
2197
  }
@@ -2230,10 +2306,18 @@ ${t}
2230
2306
  text-transform: uppercase;
2231
2307
  }
2232
2308
 
2309
+ .italic {
2310
+ font-style: italic;
2311
+ }
2312
+
2233
2313
  .line-through {
2234
2314
  text-decoration-line: line-through;
2235
2315
  }
2236
2316
 
2317
+ .underline {
2318
+ text-decoration-line: underline;
2319
+ }
2320
+
2237
2321
  .underline-offset-4 {
2238
2322
  text-underline-offset: 4px;
2239
2323
  }
@@ -6833,7 +6917,7 @@ ${e.themeCSS}`),e.fontFamily!==void 0&&(n+=`
6833
6917
  `)||(e.endsWith("```\n")||e.endsWith("```"))&&t%2==0)return e;let r=e.match(jtn);if(r&&!n){let t=r[2];if(!t||z7.test(t))return e;if(qtn(e)%2==1)return`${e}\``}return e},Ytn=e=>{let t=e.match(Mtn);if(t){let n=t[2];if(!n||z7.test(n))return e;if((e.match(/~~/g)||[]).length%2==1)return`${e}~~`}return e},Xtn=e=>{if((e.match(/\$\$/g)||[]).length%2==0)return e;let t=e.indexOf(`$$`);return t!==-1&&e.indexOf(`
6834
6918
  `,t)!==-1&&!e.endsWith(`
6835
6919
  `)?`${e}
6836
- $$`:`${e}$$`},Ztn=e=>{let t=0,n=e.match(/\*+/g)||[];for(let e of n){let n=e.length;n>=3&&(t+=Math.floor(n/3))}return t},Qtn=e=>{if(V7(e)||Ltn.test(e))return e;let t=e.match(Otn);if(t){let n=t[2];if(!n||z7.test(n))return e;if(Ztn(e)%2==1)return`${e}***`}return e},$tn=e=>{if(!e||typeof e!=`string`)return e;let t=e,n=Rtn(t);return n.endsWith(`](streamdown:incomplete-link)`)?n:(t=n,t=Qtn(t),t=ztn(t),t=Btn(t),t=Htn(t),t=Gtn(t),t=Jtn(t),t=Ytn(t),t=Xtn(t),t)},enn={harden:[ehe,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],defaultOrigin:void 0,allowDataImages:!0}],raw:zSe,katex:[Uy,{errorColor:`var(--color-muted-foreground)`}]},tnn={gfm:[iEe,{}],math:[gEe,{singleDollarTextMath:!1}],cjkFriendly:[vCe,{}],cjkFriendlyGfmStrikethrough:[bCe,{}]},nnn=(0,_.createContext)([`github-light`,`github-dark`]),rnn=(0,_.createContext)(void 0),inn=(0,_.createContext)(!0),H7=(0,_.createContext)({isAnimating:!1}),ann=(0,_.memo)(({content:e,shouldParseIncompleteMarkdown:t,...n})=>{let r=(0,_.useMemo)(()=>typeof e==`string`&&t?$tn(e.trim()):e,[e,t]);return(0,S.jsx)(Yme,{...n,children:r})},(e,t)=>e.content===t.content);ann.displayName=`Block`;var onn=[`github-light`,`github-dark`],snn=(0,_.memo)(({children:e,parseIncompleteMarkdown:t=!0,components:n,rehypePlugins:r=Object.values(enn),remarkPlugins:i=Object.values(tnn),className:a,shikiTheme:o=onn,mermaidConfig:s,controls:l=!0,isAnimating:u=!1,urlTransform:d=e=>e,BlockComponent:f=ann,parseMarkdownIntoBlocksFn:m=wtn,...h})=>{let g=(0,_.useId)(),v=(0,_.useMemo)(()=>m(typeof e==`string`?e:``),[e,m]);(0,_.useEffect)(()=>{Array.isArray(r)&&r.some(e=>Array.isArray(e)?e[0]===Uy:e===Uy)&&Promise.resolve().then(()=>p(yen(),1))},[r]);let y=(0,_.useMemo)(()=>({isAnimating:u}),[u]);return(0,S.jsx)(nnn.Provider,{value:o,children:(0,S.jsx)(rnn.Provider,{value:s,children:(0,S.jsx)(inn.Provider,{value:l,children:(0,S.jsx)(H7.Provider,{value:y,children:(0,S.jsx)(`div`,{className:F7(`space-y-4`,a),children:v.map((e,a)=>(0,S.jsx)(f,{components:{...ytn,...n},content:e,index:a,rehypePlugins:r,remarkPlugins:i,shouldParseIncompleteMarkdown:t,urlTransform:d,...h},`${g}-block-${a}`))})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating);snn.displayName=`Streamdown`;let cnn=(0,_.createContext)(null),lnn=()=>{let e=(0,_.useContext)(cnn);if(!e)throw Error(`Reasoning components must be used within Reasoning`);return e},unn=(0,_.memo)(({className:e,isStreaming:t=!1,open:n,defaultOpen:r=!0,onOpenChange:i,duration:a,children:o,...s})=>{let[l,u]=ht({prop:n,defaultProp:r,onChange:i}),[d,f]=ht({prop:a,defaultProp:void 0}),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(null);return(0,_.useEffect)(()=>{t?h===null&&g(Date.now()):h!==null&&(f(Math.ceil((Date.now()-h)/1e3)),g(null))},[t,h,f]),(0,_.useEffect)(()=>{if(r&&!t&&l&&!p){let e=setTimeout(()=>{u(!1),m(!0)},1e3);return()=>clearTimeout(e)}},[t,l,r,u,p]),(0,S.jsx)(cnn.Provider,{value:{isStreaming:t,isOpen:l,setIsOpen:u,duration:d},children:(0,S.jsx)(Bi,{className:nt(`not-prose mb-4`,e),onOpenChange:e=>{u(e)},open:l,...s,children:o})})}),dnn=(e,t)=>e||t===0?(0,S.jsx)(Uce,{duration:1,children:`Thinking...`}):t===void 0?(0,S.jsx)(`p`,{children:`Thought for a few seconds`}):(0,S.jsxs)(`p`,{children:[`Thought for `,t,` seconds`]}),fnn=(0,_.memo)(({className:e,children:t,...n})=>{let{isStreaming:r,isOpen:i,duration:a}=lnn();return(0,S.jsx)(Vi,{className:nt(`flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground`,e),...n,children:t??(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Qr,{className:`size-4`}),dnn(r,a),(0,S.jsx)($r,{className:nt(`size-4 transition-transform`,i?`rotate-180`:`rotate-0`)})]})})}),pnn=(0,_.memo)(({className:e,children:t,...n})=>(0,S.jsx)(Hi,{className:nt(`mt-4 text-sm`,`data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in`,e),...n,children:(0,S.jsx)(snn,{...n,children:t})}));unn.displayName=`Reasoning`,fnn.displayName=`ReasoningTrigger`,pnn.displayName=`ReasoningContent`,(0,_.createContext)(null);let mnn=(0,_.memo)(({className:e,...t})=>(0,S.jsx)(snn,{className:nt(`size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,e),...t}),(e,t)=>e.children===t.children);mnn.displayName=`MessageResponse`;let hnn=(0,_.createContext)({code:``}),gnn={name:`line-numbers`,line(e,t){e.children.unshift({type:`element`,tagName:`span`,properties:{className:[`inline-block`,`min-w-10`,`mr-4`,`text-right`,`select-none`,`text-muted-foreground`]},children:[{type:`text`,value:String(t)}]})}};async function _nn(e,t,n=!1){let r=n?[gnn]:[];return await Promise.all([hXe(e,{lang:t,theme:`one-light`,transformers:r}),hXe(e,{lang:t,theme:`one-dark-pro`,transformers:r})])}let U7=({code:e,language:t,showLineNumbers:n=!1,className:r,children:i,...a})=>{let[o,s]=(0,_.useState)(``),[l,u]=(0,_.useState)(``),d=(0,_.useRef)(!1);return(0,_.useEffect)(()=>(_nn(e,t,n).then(([e,t])=>{d.current||=(s(e),u(t),!0)}),()=>{d.current=!1}),[e,t,n]),(0,S.jsx)(hnn.Provider,{value:{code:e},children:(0,S.jsx)(`div`,{className:nt(`group relative w-full overflow-hidden rounded-md border bg-background text-foreground`,r),...a,children:(0,S.jsxs)(`div`,{className:`relative`,children:[(0,S.jsx)(`div`,{className:`overflow-hidden dark:hidden [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:p-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm`,dangerouslySetInnerHTML:{__html:o}}),(0,S.jsx)(`div`,{className:`hidden overflow-hidden dark:block [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:p-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm`,dangerouslySetInnerHTML:{__html:l}}),i&&(0,S.jsx)(`div`,{className:`absolute top-2 right-2 flex items-center gap-2`,children:i})]})})})},vnn=({className:e,...t})=>(0,S.jsx)(Bi,{className:nt(`not-prose mb-4 w-full rounded-md border`,e),...t}),ynn=e=>{let t={"input-streaming":`Pending`,"input-available":`Running`,"approval-requested":`Awaiting Approval`,"approval-responded":`Responded`,"output-available":`Completed`,"output-error":`Error`,"output-denied":`Denied`};return(0,S.jsxs)(it,{className:`gap-1.5 rounded-full text-xs`,variant:`secondary`,children:[{"input-streaming":(0,S.jsx)(ai,{className:`size-4`}),"input-available":(0,S.jsx)(oi,{className:`size-4 animate-pulse`}),"approval-requested":(0,S.jsx)(oi,{className:`size-4 text-yellow-600`}),"approval-responded":(0,S.jsx)(ni,{className:`size-4 text-blue-600`}),"output-available":(0,S.jsx)(ni,{className:`size-4 text-green-600`}),"output-error":(0,S.jsx)(ii,{className:`size-4 text-red-600`}),"output-denied":(0,S.jsx)(ii,{className:`size-4 text-orange-600`})}[e],t[e]]})},bnn=({className:e,title:t,type:n,state:r,...i})=>(0,S.jsxs)(Vi,{className:nt(`flex w-full items-center justify-between gap-4 p-3`,e),...i,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsx)(_i,{className:`size-4 text-muted-foreground`}),(0,S.jsx)(`span`,{className:`font-medium text-sm`,children:t??n.split(`-`).slice(1).join(`-`)}),ynn(r)]}),(0,S.jsx)($r,{className:`size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180`})]}),xnn=({className:e,...t})=>(0,S.jsx)(Hi,{className:nt(`data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in`,e),...t}),Snn=({className:e,input:t,...n})=>(0,S.jsxs)(`div`,{className:nt(`space-y-2 overflow-hidden p-4`,e),...n,children:[(0,S.jsx)(`h4`,{className:`font-medium text-muted-foreground text-xs uppercase tracking-wide`,children:`Parameters`}),(0,S.jsx)(`div`,{className:`rounded-md bg-muted/50`,children:(0,S.jsx)(U7,{code:JSON.stringify(t,null,2),language:`json`})})]}),Cnn=({className:e,output:t,errorText:n,...r})=>{if(!(t||n))return null;let i=(0,S.jsx)(`div`,{children:t});return typeof t==`object`&&!(0,_.isValidElement)(t)?i=(0,S.jsx)(U7,{code:JSON.stringify(t,null,2),language:`json`}):typeof t==`string`&&(i=(0,S.jsx)(U7,{code:t,language:`json`})),(0,S.jsxs)(`div`,{className:nt(`space-y-2 p-4`,e),...r,children:[(0,S.jsx)(`h4`,{className:`font-medium text-muted-foreground text-xs uppercase tracking-wide`,children:n?`Error`:`Result`}),(0,S.jsxs)(`div`,{className:nt(`overflow-x-auto rounded-md text-xs [&_table]:w-full`,n?`bg-destructive/10 text-destructive`:`bg-muted/50 text-foreground`),children:[n&&(0,S.jsx)(`div`,{children:n}),i]})]})};function wnn({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`card`,className:nt(`bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm`,e),...t})}function Tnn({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`card-header`,className:nt(`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`,e),...t})}function Enn({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`card-content`,className:nt(`px-6`,e),...t})}let Dnn=(0,_.createContext)(null),Onn=({className:e,isStreaming:t=!1,children:n,...r})=>(0,S.jsx)(Dnn.Provider,{value:{isStreaming:t},children:(0,S.jsx)(Bi,{asChild:!0,"data-slot":`plan`,...r,children:(0,S.jsx)(wnn,{className:nt(`shadow-none`,e),children:n})})}),knn=({className:e,...t})=>(0,S.jsx)(Tnn,{className:nt(`flex items-start justify-between`,e),"data-slot":`plan-header`,...t}),Ann=e=>(0,S.jsx)(Hi,{asChild:!0,children:(0,S.jsx)(Enn,{"data-slot":`plan-content`,...e})}),jnn=({className:e,...t})=>(0,S.jsx)(Vi,{asChild:!0,children:(0,S.jsxs)(Ei,{className:nt(`size-8`,e),"data-slot":`plan-trigger`,size:`icon`,variant:`ghost`,...t,children:[(0,S.jsx)(ei,{className:`size-4`}),(0,S.jsx)(`span`,{className:`sr-only`,children:`Toggle plan`})]})});function Mnn(e){let t=e;return typeof t.type==`string`&&t.type.startsWith(`tool-`)&&`state`in t}function Nnn(e,t,n,r,i){if(e.type===`text`&&e.text)return(0,S.jsx)(mnn,{className:`whitespace-pre-wrap`,children:e.text},`${t}-${n}`);if(e.type===`reasoning`)return(0,S.jsxs)(unn,{className:`w-full`,isStreaming:r,children:[(0,S.jsx)(fnn,{}),(0,S.jsx)(pnn,{children:e.text})]},`${t}-${n}`);let a=i?.plan;if(a&&n===0)return(0,S.jsx)(`div`,{className:`w-full`,children:(0,S.jsxs)(Onn,{defaultOpen:!0,isStreaming:r,children:[(0,S.jsx)(knn,{className:`flex flex-row items-center`,children:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`h1`,{className:`text-base`,children:`Agent Plan`}),(0,S.jsx)(jnn,{className:`mb-2`})]})}),(0,S.jsx)(Ann,{children:(0,S.jsx)(`ul`,{className:`space-y-2`,children:a.map((e,t)=>{let n=e.content||JSON.stringify(e),r=e.priority,i=e.status;return(0,S.jsxs)(`li`,{className:`flex items-start justify-between gap-3`,children:[(0,S.jsxs)(`div`,{className:`flex-1`,children:[(0,S.jsx)(`div`,{className:`text-sm ${i===`done`?`line-through text-muted-foreground`:`text-foreground`}`,children:n}),r&&(0,S.jsxs)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:[`Priority: `,r]})]}),(0,S.jsx)(`div`,{className:`shrink-0 text-xs`,children:(0,S.jsx)(`span`,{className:`px-2 py-1 rounded-full font-medium text-[10px] uppercase tracking-wide ${i===`pending`?`bg-muted text-muted-foreground`:`bg-primary/10 text-primary`}`,children:i??`pending`})})]},`plan-${t}`)})})})]})},`${t}-plan`);if(Mnn(e)){let r=e.input,i=r.toolName,a=e.state,o=a===`output-available`||a===`output-error`;return(0,S.jsxs)(vnn,{defaultOpen:o,children:[(0,S.jsx)(bnn,{title:i.length>20?`${i.slice(0,20)}...`:i,type:i,state:a}),(0,S.jsxs)(xnn,{children:[e.input!==void 0&&(0,S.jsx)(Snn,{input:r}),o&&(0,S.jsx)(Cnn,{output:e.output?(0,S.jsx)(U7,{code:JSON.stringify(e.output,null,2),language:`json`}):null,errorText:e.errorText})]})]},`${t}-${n}`)}return null}let Pnn=({messages:e,status:t,selectedAgent:n})=>{let r=id.find(e=>e.name===(n||ad))||id[0];return(0,S.jsx)(`div`,{className:`flex flex-col w-full h-full min-h-0 bg-background`,children:(0,S.jsx)(`div`,{className:`flex-1 overflow-hidden`,children:(0,S.jsxs)(tle,{className:`h-full`,children:[(0,S.jsxs)(nle,{className:`h-full overflow-y-auto p-4 space-y-4`,children:[e.length===0?(0,S.jsx)(`div`,{className:`flex items-center justify-center h-full text-muted-foreground`,children:(0,S.jsxs)(`div`,{className:`text-center`,children:[(0,S.jsx)(`p`,{className:`text-sm`,children:`No messages yet`}),(0,S.jsx)(`p`,{className:`text-xs mt-1`,children:`Enter a question below to start`})]})}):e.map(e=>(0,S.jsxs)(Ile,{className:`items-start`,from:e.role,children:[(0,S.jsx)(Lle,{children:e.parts.map((n,r)=>Nnn(n,e.id,r,t===`streaming`,e.metadata))}),e.role===`assistant`&&(0,S.jsx)(Rle,{name:r.name,src:r.meta?.icon??``})]},e.id)),t===`submitted`&&(0,S.jsx)(Ble,{})]}),(0,S.jsx)(rle,{})]})})})};function Fnn(e,t,n=50){let[r,i]=(0,_.useState)(``),a=(0,_.useRef)(0),o=(0,_.useRef)(``);return(0,_.useEffect)(()=>{if(e.length<r.length||r&&!e.startsWith(r.slice(0,Math.min(r.length,20)))){i(e),o.current=e,a.current=Date.now();return}if(!t){r!==e&&(i(e),o.current=e);return}let s=e.slice(o.current.length);if(!s)return;let l=Date.now();if(l-a.current<n)return;let u=/[.?!。?!](\s|$)|[\n]/.test(s),d=s.length>50,f=s.trim().length<5;(u&&!f||d)&&(i(e),o.current=e,a.current=l)},[e,t,n,r]),r}function Inn({initialOffset:e={x:0,y:0}}={}){let t=(0,_.useRef)(null),[n,r]=(0,_.useState)(!1),i=(0,_.useRef)(e),a=(0,_.useRef)({x:0,y:0}),o=(0,_.useRef)({x:0,y:0}),s=(0,_.useCallback)(()=>{if(t.current){let{x:e,y:n}=i.current;t.current.style.transform=`translate3d(calc(-50% + ${e}px), ${n}px, 0)`}},[]),l=(0,_.useCallback)(e=>{e.target.closest(`button, input, a, [data-no-drag]`)||(e.preventDefault(),r(!0),a.current={x:e.clientX,y:e.clientY},o.current={...i.current})},[]);return(0,_.useEffect)(()=>{let e=e=>{if(!n)return;let t=e.clientX-a.current.x,r=e.clientY-a.current.y;i.current={x:o.current.x+t,y:o.current.y+r},s()},t=()=>{r(!1)};return n&&(window.addEventListener(`mousemove`,e,{passive:!0}),window.addEventListener(`mouseup`,t)),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t)}},[n,s]),(0,_.useEffect)(()=>{s()},[s]),{elementRef:t,isDragging:n,handleMouseDown:l}}let Lnn=`AI_SELECTED_AGENT`,Rnn=e=>{let[t,n]=(0,_.useState)(e);return(0,_.useEffect)(()=>{typeof window<`u`&&ud().then(e=>{if(e&&e!==ad)n(e);else{let e=localStorage.getItem(Lnn);e&&n(e)}})},[]),{agent:t,setAgent:e=>{n(e),!(typeof window>`u`)&&(e?.trim()?localStorage.setItem(Lnn,e):localStorage.removeItem(Lnn))}}},znn=({isActive:e,onToggleInspector:t,onSubmitAgent:n,isAgentWorking:r,messages:i,status:a,inspectionCount:o=0,inspectionItems:s=[],onRemoveInspection:l=()=>{}})=>{let[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(``),[m,h]=(0,_.useState)(null),[g,v]=(0,_.useState)(`none`),[y,b]=(0,_.useState)(!1),[x,C]=(0,_.useState)(!1),[w,T]=(0,_.useState)(!0),{agent:E,setAgent:D}=Rnn(ad),[O,k]=(0,_.useState)(!1),A=id.find(e=>e.name===E)||id[0],{elementRef:j,isDragging:M,handleMouseDown:N}=Inn(),[P,F]=(0,_.useState)(null),[I,L]=(0,_.useState)(``),R=Fnn(I,r,50),[ee,te]=(0,_.useState)(``),z=(0,_.useRef)(``),B=(0,_.useRef)(``);(0,_.useEffect)(()=>{let e=R,t=z.current;if(e.length<t.length||!e.startsWith(t)){te(e),z.current=e;return}if(e.length>t.length){let n=e.slice(t.length).trim();n&&te(n),z.current=e}},[R]);let ne=(0,_.useRef)(null),re=(0,_.useRef)(null),ie=(0,_.useRef)(null),ae=(0,_.useRef)(!1);(0,_.useEffect)(()=>{if(i.length===0){L(``),h(null),ie.current=null,ae.current=!1,te(``),z.current=``;return}let e=i[i.length-1];if(e.role!==`assistant`)return;let t=Kce(e),{displayText:n,toolCall:r}=Jce(e,t||ie.current);L(n||``),t&&(ie.current=t),r?(re.current&&=(clearTimeout(re.current),null),h(r),ae.current=!0):ae.current=!1},[i]),(0,_.useEffect)(()=>{ee!==B.current&&(ae.current||h(null),B.current=ee)},[ee]),(0,_.useEffect)(()=>{u&&ne.current&&ne.current.focus()},[u]),(0,_.useEffect)(()=>{if(!r&&x){b(!1),C(!1),T(!1);let e=setTimeout(()=>{T(!0)},2e3);return()=>clearTimeout(e)}},[r,x]),(0,_.useEffect)(()=>{function e(e){let{plan:t,inspectionId:n}=e.detail;if(t?.steps){let e=t.steps.find(e=>e.status===`in-progress`),r=t.steps.filter(e=>e.status===`completed`).length;F({id:n,status:`in-progress`,currentStep:e?{title:e.title,index:r+1,total:t.steps.length}:void 0})}}function t(e){let{status:t,result:n,inspectionId:r}=e.detail;F({id:r,status:t,message:n?.message||n}),setTimeout(()=>{F(null)},3e3)}return window.addEventListener(`plan-progress-reported`,e),window.addEventListener(`inspection-result-received`,t),()=>{window.removeEventListener(`plan-progress-reported`,e),window.removeEventListener(`inspection-result-received`,t)}},[]);let oe=e=>{e.preventDefault(),f.trim()&&(re.current&&=(clearTimeout(re.current),null),h(null),L(``),ie.current=null,b(!0),C(!0),n(f,E),p(``),g===`none`&&(d(!1),ne.current?.blur()))},se=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),oe(e)),e.key===`Escape`&&(d(!1),ne.current?.blur())},ce=a===`error`,le=i.length>0,ue=u&&!y,de=(!u||y)&&(r||le||P);return(0,S.jsxs)(`div`,{ref:j,className:nt(`fixed bottom-8 left-1/2 z-[999999]`,`transition-all duration-300 ease-[cubic-bezier(0.23,1,0.32,1)]`,u?`w-[450px]`:de?`w-auto min-w-[200px] max-w-[450px]`:`w-[160px]`,M?`cursor-grabbing`:`cursor-grab`),onMouseDown:N,onMouseEnter:()=>{!x&&w&&!M&&d(!0)},onMouseLeave:()=>{!f.trim()&&!x&&!M&&(d(!1),v(`none`)),T(!0)},children:[(0,S.jsxs)(`div`,{className:nt(`relative flex items-center backdrop-blur-xl shadow-2xl border border-border`,`transition-all duration-300 ease-[cubic-bezier(0.23,1,0.32,1)]`,u?`h-12 p-2 pl-4`:`h-9 px-2 py-1`,g===`none`?`bg-muted/90 rounded-full`:`bg-muted/95 rounded-b-lg rounded-t-none border-t-0`,ce&&!u&&`bg-destructive/10 border-destructive/20`),children:[(0,S.jsxs)(`div`,{className:nt(`flex items-center transition-opacity duration-300 w-full relative`,ue?`absolute left-3 opacity-0 pointer-events-none`:`relative opacity-100`),children:[!de&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`flex items-center justify-center w-6 h-6 rounded-full bg-accent flex-shrink-0`,children:(0,S.jsx)(mi,{className:`w-3.5 h-3.5 text-foreground`})}),(0,S.jsx)(`span`,{className:`text-xs text-muted-foreground/70 ml-3`,children:`Hover to inspect`})]}),de&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-3 flex-shrink-0`,children:[(0,S.jsx)(`div`,{className:`relative flex items-center justify-center w-6 h-6 rounded-full bg-accent flex-shrink-0`,children:r?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`absolute inset-0 rounded-full border-2 border-current opacity-20 animate-ping text-foreground`}),(0,S.jsx)(mi,{className:`w-3.5 h-3.5 animate-pulse text-foreground`})]}):P?P.status===`in-progress`?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`absolute inset-0 rounded-full border-2 border-current opacity-20 animate-ping text-blue-500`}),(0,S.jsx)(hi,{className:`w-3.5 h-3.5 animate-pulse text-blue-500`})]}):P.status===`completed`?(0,S.jsx)(ri,{className:`w-5 h-5 text-green-500`}):(0,S.jsx)(ii,{className:`w-5 h-5 text-red-500`}):ce?(0,S.jsx)(ii,{className:`w-5 h-5 text-red-500`}):(0,S.jsx)(ri,{className:`w-5 h-5 text-green-500`})}),(0,S.jsx)(`div`,{className:`w-px h-4 bg-border flex-shrink-0`})]}),(0,S.jsx)(`div`,{className:`flex-1 flex justify-center min-w-0 pl-2`,children:(0,S.jsx)(`div`,{className:`flex flex-col min-w-0 max-w-full pr-2 max-h-[24px] overflow-hidden`,children:P&&P.status===`in-progress`&&P.currentStep?(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5 text-sm font-medium text-foreground min-w-0`,children:[(0,S.jsx)(hi,{className:`w-4 h-4 flex-shrink-0`}),(0,S.jsxs)(`span`,{className:`truncate min-w-0`,children:[`Step `,P.currentStep.index,`/`,P.currentStep.total,`: `,P.currentStep.title]})]}):P?.message?(0,S.jsx)(`div`,{className:`text-sm font-medium leading-[1.4] text-foreground truncate min-w-0`,children:P.message}):m?(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5 text-sm font-medium text-foreground min-w-0`,children:[(0,S.jsx)(hi,{className:`w-4 h-4 flex-shrink-0`}),(0,S.jsx)(`span`,{className:`truncate min-w-0`,children:m})]}):(0,S.jsx)(`div`,{className:`text-sm font-medium leading-[1.4] text-foreground truncate min-w-0`,children:r&&!ee?(0,S.jsx)(Uce,{duration:2,spread:2,children:a===`submitted`&&A?.command===`npx`?`Starting ${A.name}... This may take a moment.`:`Thinking...`}):ee||`Processing...`})})})]})]}),(0,S.jsxs)(`div`,{className:nt(`flex items-center w-full gap-3 transition-all duration-500 delay-75`,ue?`opacity-100 translate-y-0 relative pointer-events-auto`:`opacity-0 translate-y-4 pointer-events-none absolute top-2 left-4 right-2`),onClick:e=>e.stopPropagation(),children:[(0,S.jsx)(`button`,{onClick:t,className:nt(`relative flex items-center justify-center w-7 h-7 rounded-full transition-colors flex-shrink-0`,e?`bg-blue-500 text-white shadow-[0_0_15px_rgba(59,130,246,0.5)]`:`bg-accent text-muted-foreground hover:bg-accent/80 hover:text-foreground`),title:`Toggle Inspector`,children:(0,S.jsx)(si,{className:`w-3.5 h-3.5`})}),(0,S.jsx)(`div`,{className:`w-px h-4 bg-border flex-shrink-0`}),o>0&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`button`,{type:`button`,onClick:()=>v(e=>e===`inspections`?`none`:`inspections`),className:nt(`relative flex items-center justify-center w-7 h-7 rounded-full transition-colors flex-shrink-0`,`hover:bg-accent/50`,g===`inspections`&&`bg-accent/50 text-foreground`),title:`View Inspections`,children:[(0,S.jsx)(ci,{className:`w-3.5 h-3.5`}),(0,S.jsx)(`span`,{className:`absolute -top-0.5 -right-0.5 flex items-center justify-center min-w-[12px] h-[12px] px-0.5 text-[8px] font-bold text-white bg-red-500 rounded-full border border-background shadow-sm leading-none`,children:o>99?`99+`:o})]}),(0,S.jsx)(`div`,{className:`w-px h-4 bg-border flex-shrink-0`})]}),(0,S.jsxs)(`form`,{onSubmit:oe,className:`flex-1 flex items-center gap-2 min-w-0`,onClick:e=>e.stopPropagation(),children:[(0,S.jsxs)(`div`,{className:`relative flex-shrink-0`,children:[(0,S.jsx)(`button`,{type:`button`,onClick:()=>k(!O),className:`flex items-center justify-center w-7 h-7 rounded-full hover:bg-accent/50 transition-colors`,title:`Select Agent`,children:(0,S.jsx)(`img`,{src:id.find(e=>e.name===E)?.meta?.icon,alt:E,className:`w-3.5 h-3.5`})}),O&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`fixed inset-0 z-[999998]`,onClick:()=>k(!1)}),(0,S.jsx)(`div`,{className:`absolute bottom-full left-0 mb-2 w-48 bg-popover border border-border rounded-lg shadow-lg overflow-hidden z-[999999] animate-in fade-in zoom-in-95 duration-200`,children:id.map(e=>(0,S.jsxs)(`button`,{onClick:()=>{D(e.name),k(!1)},className:nt(`w-full flex items-center gap-2 px-3 py-2 text-sm text-left hover:bg-accent transition-colors`,E===e.name&&`bg-accent/50 font-medium`),children:[e.meta?.icon&&(0,S.jsx)(`img`,{src:e.meta.icon,alt:``,className:`w-4 h-4`}),e.name]},e.name))})]})]}),(0,S.jsx)(`input`,{ref:ne,type:`text`,value:f,onChange:e=>p(e.target.value),onKeyDown:se,placeholder:`Ask ${E}...`,className:`w-full bg-transparent border-none outline-none text-foreground placeholder-muted-foreground text-sm h-7`,tabIndex:0}),(i.length>0||r||x)&&(0,S.jsx)(`button`,{type:`button`,onClick:()=>v(e=>e===`chat`?`none`:`chat`),className:nt(`flex items-center justify-center w-7 h-7 rounded-full transition-all flex-shrink-0`,g===`chat`?`bg-foreground text-background`:`bg-accent text-muted-foreground hover:bg-accent/80 hover:text-foreground`),title:g===`chat`?`Collapse`:`Expand messages`,children:(0,S.jsx)(Aee,{className:nt(`w-3.5 h-3.5 transition-transform duration-300`,g===`chat`&&`rotate-180`)})}),(0,S.jsx)(`button`,{type:`submit`,disabled:!f.trim()||r,className:nt(`flex items-center justify-center w-7 h-7 rounded-full transition-all flex-shrink-0`,f.trim()?`bg-foreground text-background scale-100`:`bg-accent text-muted-foreground/50 scale-90`),children:r?(0,S.jsx)(mi,{className:`w-3.5 h-3.5 animate-spin`}):(0,S.jsx)(Zr,{className:`w-3.5 h-3.5`})})]})]})]}),g!==`none`&&(0,S.jsx)(`div`,{className:`absolute bottom-full left-0 right-0 pointer-events-auto max-w-[450px] mx-auto animate-panel-in`,children:(0,S.jsxs)(`div`,{className:`bg-muted/95 backdrop-blur-xl rounded-t-xl border border-border border-b-0 shadow-2xl overflow-hidden`,children:[g===`inspections`&&s.length>0&&(0,S.jsx)(`div`,{className:`border-b border-border`,children:(0,S.jsx)(Yi,{items:s,onRemove:l})}),g===`chat`&&(0,S.jsx)(`div`,{className:`h-[500px]`,children:(0,S.jsx)(Pnn,{messages:i,status:a,selectedAgent:E})})]})})]})};var Bnn=`vercel.ai.error`,Vnn=Symbol.for(Bnn),Hnn,Unn=class e extends Error{constructor({name:e,message:t,cause:n}){super(t),this[Hnn]=!0,this.name=e,this.cause=n}static isInstance(t){return e.hasMarker(t,Bnn)}static hasMarker(e,t){let n=Symbol.for(t);return typeof e==`object`&&!!e&&n in e&&typeof e[n]==`boolean`&&e[n]===!0}};Hnn=Vnn;var W7=Unn;function Wnn(e){return e==null?`unknown error`:typeof e==`string`?e:e instanceof Error?e.message:JSON.stringify(e)}var Gnn=`AI_InvalidArgumentError`,Knn=`vercel.ai.error.${Gnn}`,qnn=Symbol.for(Knn),Jnn,Ynn=class extends W7{constructor({message:e,cause:t,argument:n}){super({name:Gnn,message:e,cause:t}),this[Jnn]=!0,this.argument=n}static isInstance(e){return W7.hasMarker(e,Knn)}};Jnn=qnn;var Xnn=`AI_JSONParseError`,Znn=`vercel.ai.error.${Xnn}`,Qnn=Symbol.for(Znn),$nn,ern=class extends W7{constructor({text:e,cause:t}){super({name:Xnn,message:`JSON parsing failed: Text: ${e}.
6920
+ $$`:`${e}$$`},Ztn=e=>{let t=0,n=e.match(/\*+/g)||[];for(let e of n){let n=e.length;n>=3&&(t+=Math.floor(n/3))}return t},Qtn=e=>{if(V7(e)||Ltn.test(e))return e;let t=e.match(Otn);if(t){let n=t[2];if(!n||z7.test(n))return e;if(Ztn(e)%2==1)return`${e}***`}return e},$tn=e=>{if(!e||typeof e!=`string`)return e;let t=e,n=Rtn(t);return n.endsWith(`](streamdown:incomplete-link)`)?n:(t=n,t=Qtn(t),t=ztn(t),t=Btn(t),t=Htn(t),t=Gtn(t),t=Jtn(t),t=Ytn(t),t=Xtn(t),t)},enn={harden:[ehe,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],defaultOrigin:void 0,allowDataImages:!0}],raw:zSe,katex:[Uy,{errorColor:`var(--color-muted-foreground)`}]},tnn={gfm:[iEe,{}],math:[gEe,{singleDollarTextMath:!1}],cjkFriendly:[vCe,{}],cjkFriendlyGfmStrikethrough:[bCe,{}]},nnn=(0,_.createContext)([`github-light`,`github-dark`]),rnn=(0,_.createContext)(void 0),inn=(0,_.createContext)(!0),H7=(0,_.createContext)({isAnimating:!1}),ann=(0,_.memo)(({content:e,shouldParseIncompleteMarkdown:t,...n})=>{let r=(0,_.useMemo)(()=>typeof e==`string`&&t?$tn(e.trim()):e,[e,t]);return(0,S.jsx)(Yme,{...n,children:r})},(e,t)=>e.content===t.content);ann.displayName=`Block`;var onn=[`github-light`,`github-dark`],snn=(0,_.memo)(({children:e,parseIncompleteMarkdown:t=!0,components:n,rehypePlugins:r=Object.values(enn),remarkPlugins:i=Object.values(tnn),className:a,shikiTheme:o=onn,mermaidConfig:s,controls:l=!0,isAnimating:u=!1,urlTransform:d=e=>e,BlockComponent:f=ann,parseMarkdownIntoBlocksFn:m=wtn,...h})=>{let g=(0,_.useId)(),v=(0,_.useMemo)(()=>m(typeof e==`string`?e:``),[e,m]);(0,_.useEffect)(()=>{Array.isArray(r)&&r.some(e=>Array.isArray(e)?e[0]===Uy:e===Uy)&&Promise.resolve().then(()=>p(yen(),1))},[r]);let y=(0,_.useMemo)(()=>({isAnimating:u}),[u]);return(0,S.jsx)(nnn.Provider,{value:o,children:(0,S.jsx)(rnn.Provider,{value:s,children:(0,S.jsx)(inn.Provider,{value:l,children:(0,S.jsx)(H7.Provider,{value:y,children:(0,S.jsx)(`div`,{className:F7(`space-y-4`,a),children:v.map((e,a)=>(0,S.jsx)(f,{components:{...ytn,...n},content:e,index:a,rehypePlugins:r,remarkPlugins:i,shouldParseIncompleteMarkdown:t,urlTransform:d,...h},`${g}-block-${a}`))})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating);snn.displayName=`Streamdown`;let cnn=(0,_.createContext)(null),lnn=()=>{let e=(0,_.useContext)(cnn);if(!e)throw Error(`Reasoning components must be used within Reasoning`);return e},unn=(0,_.memo)(({className:e,isStreaming:t=!1,open:n,defaultOpen:r=!0,onOpenChange:i,duration:a,children:o,...s})=>{let[l,u]=ht({prop:n,defaultProp:r,onChange:i}),[d,f]=ht({prop:a,defaultProp:void 0}),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(null);return(0,_.useEffect)(()=>{t?h===null&&g(Date.now()):h!==null&&(f(Math.ceil((Date.now()-h)/1e3)),g(null))},[t,h,f]),(0,_.useEffect)(()=>{if(r&&!t&&l&&!p){let e=setTimeout(()=>{u(!1),m(!0)},1e3);return()=>clearTimeout(e)}},[t,l,r,u,p]),(0,S.jsx)(cnn.Provider,{value:{isStreaming:t,isOpen:l,setIsOpen:u,duration:d},children:(0,S.jsx)(Bi,{className:nt(`not-prose mb-4`,e),onOpenChange:e=>{u(e)},open:l,...s,children:o})})}),dnn=(e,t)=>e||t===0?(0,S.jsx)(Uce,{duration:1,children:`Thinking...`}):t===void 0?(0,S.jsx)(`p`,{children:`Thought for a few seconds`}):(0,S.jsxs)(`p`,{children:[`Thought for `,t,` seconds`]}),fnn=(0,_.memo)(({className:e,children:t,...n})=>{let{isStreaming:r,isOpen:i,duration:a}=lnn();return(0,S.jsx)(Vi,{className:nt(`flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground`,e),...n,children:t??(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Qr,{className:`size-4`}),dnn(r,a),(0,S.jsx)($r,{className:nt(`size-4 transition-transform`,i?`rotate-180`:`rotate-0`)})]})})}),pnn=(0,_.memo)(({className:e,children:t,...n})=>(0,S.jsx)(Hi,{className:nt(`mt-4 text-sm`,`data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in`,e),...n,children:(0,S.jsx)(snn,{...n,children:t})}));unn.displayName=`Reasoning`,fnn.displayName=`ReasoningTrigger`,pnn.displayName=`ReasoningContent`,(0,_.createContext)(null);let mnn=(0,_.memo)(({className:e,...t})=>(0,S.jsx)(snn,{className:nt(`size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,e),...t}),(e,t)=>e.children===t.children);mnn.displayName=`MessageResponse`;let hnn=(0,_.createContext)({code:``}),gnn={name:`line-numbers`,line(e,t){e.children.unshift({type:`element`,tagName:`span`,properties:{className:[`inline-block`,`min-w-10`,`mr-4`,`text-right`,`select-none`,`text-muted-foreground`]},children:[{type:`text`,value:String(t)}]})}};async function _nn(e,t,n=!1){let r=n?[gnn]:[];return await Promise.all([hXe(e,{lang:t,theme:`one-light`,transformers:r}),hXe(e,{lang:t,theme:`one-dark-pro`,transformers:r})])}let U7=({code:e,language:t,showLineNumbers:n=!1,className:r,children:i,...a})=>{let[o,s]=(0,_.useState)(``),[l,u]=(0,_.useState)(``),d=(0,_.useRef)(!1);return(0,_.useEffect)(()=>(_nn(e,t,n).then(([e,t])=>{d.current||=(s(e),u(t),!0)}),()=>{d.current=!1}),[e,t,n]),(0,S.jsx)(hnn.Provider,{value:{code:e},children:(0,S.jsx)(`div`,{className:nt(`group relative w-full overflow-hidden rounded-md border bg-background text-foreground`,r),...a,children:(0,S.jsxs)(`div`,{className:`relative`,children:[(0,S.jsx)(`div`,{className:`overflow-hidden dark:hidden [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:p-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm`,dangerouslySetInnerHTML:{__html:o}}),(0,S.jsx)(`div`,{className:`hidden overflow-hidden dark:block [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:p-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm`,dangerouslySetInnerHTML:{__html:l}}),i&&(0,S.jsx)(`div`,{className:`absolute top-2 right-2 flex items-center gap-2`,children:i})]})})})},vnn=({className:e,...t})=>(0,S.jsx)(Bi,{className:nt(`not-prose mb-4 w-full rounded-md border`,e),...t}),ynn=e=>{let t={"input-streaming":`Pending`,"input-available":`Running`,"approval-requested":`Awaiting Approval`,"approval-responded":`Responded`,"output-available":`Completed`,"output-error":`Error`,"output-denied":`Denied`};return(0,S.jsxs)(it,{className:`gap-1.5 rounded-full text-xs`,variant:`secondary`,children:[{"input-streaming":(0,S.jsx)(ai,{className:`size-4`}),"input-available":(0,S.jsx)(oi,{className:`size-4 animate-pulse`}),"approval-requested":(0,S.jsx)(oi,{className:`size-4 text-yellow-600`}),"approval-responded":(0,S.jsx)(ni,{className:`size-4 text-blue-600`}),"output-available":(0,S.jsx)(ni,{className:`size-4 text-green-600`}),"output-error":(0,S.jsx)(ii,{className:`size-4 text-red-600`}),"output-denied":(0,S.jsx)(ii,{className:`size-4 text-orange-600`})}[e],t[e]]})},bnn=({className:e,title:t,type:n,state:r,...i})=>(0,S.jsxs)(Vi,{className:nt(`flex w-full items-center justify-between gap-4 p-3`,e),...i,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsx)(_i,{className:`size-4 text-muted-foreground`}),(0,S.jsx)(`span`,{className:`font-medium text-sm`,children:t??n.split(`-`).slice(1).join(`-`)}),ynn(r)]}),(0,S.jsx)($r,{className:`size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180`})]}),xnn=({className:e,...t})=>(0,S.jsx)(Hi,{className:nt(`data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in`,e),...t}),Snn=({className:e,input:t,...n})=>(0,S.jsxs)(`div`,{className:nt(`space-y-2 overflow-hidden p-4`,e),...n,children:[(0,S.jsx)(`h4`,{className:`font-medium text-muted-foreground text-xs uppercase tracking-wide`,children:`Parameters`}),(0,S.jsx)(`div`,{className:`rounded-md bg-muted/50`,children:(0,S.jsx)(U7,{code:JSON.stringify(t,null,2),language:`json`})})]}),Cnn=({className:e,output:t,errorText:n,...r})=>{if(!(t||n))return null;let i=(0,S.jsx)(`div`,{children:t});return typeof t==`object`&&!(0,_.isValidElement)(t)?i=(0,S.jsx)(U7,{code:JSON.stringify(t,null,2),language:`json`}):typeof t==`string`&&(i=(0,S.jsx)(U7,{code:t,language:`json`})),(0,S.jsxs)(`div`,{className:nt(`space-y-2 p-4`,e),...r,children:[(0,S.jsx)(`h4`,{className:`font-medium text-muted-foreground text-xs uppercase tracking-wide`,children:n?`Error`:`Result`}),(0,S.jsxs)(`div`,{className:nt(`overflow-x-auto rounded-md text-xs [&_table]:w-full`,n?`bg-destructive/10 text-destructive`:`bg-muted/50 text-foreground`),children:[n&&(0,S.jsx)(`div`,{children:n}),i]})]})};function wnn({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`card`,className:nt(`bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm`,e),...t})}function Tnn({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`card-header`,className:nt(`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`,e),...t})}function Enn({className:e,...t}){return(0,S.jsx)(`div`,{"data-slot":`card-content`,className:nt(`px-6`,e),...t})}let Dnn=(0,_.createContext)(null),Onn=({className:e,isStreaming:t=!1,children:n,...r})=>(0,S.jsx)(Dnn.Provider,{value:{isStreaming:t},children:(0,S.jsx)(Bi,{asChild:!0,"data-slot":`plan`,...r,children:(0,S.jsx)(wnn,{className:nt(`shadow-none`,e),children:n})})}),knn=({className:e,...t})=>(0,S.jsx)(Tnn,{className:nt(`flex items-start justify-between`,e),"data-slot":`plan-header`,...t}),Ann=e=>(0,S.jsx)(Hi,{asChild:!0,children:(0,S.jsx)(Enn,{"data-slot":`plan-content`,...e})}),jnn=({className:e,...t})=>(0,S.jsx)(Vi,{asChild:!0,children:(0,S.jsxs)(Ei,{className:nt(`size-8`,e),"data-slot":`plan-trigger`,size:`icon`,variant:`ghost`,...t,children:[(0,S.jsx)(ei,{className:`size-4`}),(0,S.jsx)(`span`,{className:`sr-only`,children:`Toggle plan`})]})});function Mnn(e){let t=e;return typeof t.type==`string`&&t.type.startsWith(`tool-`)&&`state`in t}function Nnn(e,t,n,r,i){if(e.type===`text`&&e.text)return(0,S.jsx)(mnn,{className:`whitespace-pre-wrap`,children:e.text},`${t}-${n}`);if(e.type===`reasoning`)return(0,S.jsxs)(unn,{className:`w-full`,isStreaming:r,children:[(0,S.jsx)(fnn,{}),(0,S.jsx)(pnn,{children:e.text})]},`${t}-${n}`);let a=i?.plan;if(a&&n===0)return(0,S.jsx)(`div`,{className:`w-full`,children:(0,S.jsxs)(Onn,{defaultOpen:!0,isStreaming:r,children:[(0,S.jsx)(knn,{className:`flex flex-row items-center`,children:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`h1`,{className:`text-base`,children:`Agent Plan`}),(0,S.jsx)(jnn,{className:`mb-2`})]})}),(0,S.jsx)(Ann,{children:(0,S.jsx)(`ul`,{className:`space-y-2`,children:a.map((e,t)=>{let n=e.content||JSON.stringify(e),r=e.priority,i=e.status;return(0,S.jsxs)(`li`,{className:`flex items-start justify-between gap-3`,children:[(0,S.jsxs)(`div`,{className:`flex-1`,children:[(0,S.jsx)(`div`,{className:`text-sm ${i===`done`?`line-through text-muted-foreground`:`text-foreground`}`,children:n}),r&&(0,S.jsxs)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:[`Priority: `,r]})]}),(0,S.jsx)(`div`,{className:`shrink-0 text-xs`,children:(0,S.jsx)(`span`,{className:`px-2 py-1 rounded-full font-medium text-[10px] uppercase tracking-wide ${i===`pending`?`bg-muted text-muted-foreground`:`bg-primary/10 text-primary`}`,children:i??`pending`})})]},`plan-${t}`)})})})]})},`${t}-plan`);if(Mnn(e)){let r=e.input,i=r.toolName,a=e.state,o=a===`output-available`||a===`output-error`;return(0,S.jsxs)(vnn,{defaultOpen:o,children:[(0,S.jsx)(bnn,{title:i.length>20?`${i.slice(0,20)}...`:i,type:i,state:a}),(0,S.jsxs)(xnn,{children:[e.input!==void 0&&(0,S.jsx)(Snn,{input:r}),o&&(0,S.jsx)(Cnn,{output:e.output?(0,S.jsx)(U7,{code:JSON.stringify(e.output,null,2),language:`json`}):null,errorText:e.errorText})]})]},`${t}-${n}`)}return null}let Pnn=({messages:e,status:t,selectedAgent:n})=>{let r=id.find(e=>e.name===(n||ad))||id[0];return(0,S.jsxs)(tle,{className:`w-full h-full`,children:[(0,S.jsxs)(nle,{className:`p-3 space-y-3`,children:[e.length===0?(0,S.jsx)(`div`,{className:`flex items-center justify-center h-full text-muted-foreground`,children:(0,S.jsxs)(`div`,{className:`text-center`,children:[(0,S.jsx)(`p`,{className:`text-sm`,children:`No messages yet`}),(0,S.jsx)(`p`,{className:`text-xs mt-1`,children:`Enter a question below to start`})]})}):e.map(e=>(0,S.jsxs)(Ile,{className:`items-start`,from:e.role,children:[(0,S.jsx)(Lle,{children:e.parts.map((n,r)=>Nnn(n,e.id,r,t===`streaming`,e.metadata))}),e.role===`assistant`&&(0,S.jsx)(Rle,{name:r.name,src:r.meta?.icon??``})]},e.id)),t===`submitted`&&e.length===0&&(0,S.jsx)(Ble,{})]}),(0,S.jsx)(rle,{})]})};function Fnn(e,t,n=50){let[r,i]=(0,_.useState)(``),a=(0,_.useRef)(0),o=(0,_.useRef)(``);return(0,_.useEffect)(()=>{if(e.length<r.length||r&&!e.startsWith(r.slice(0,Math.min(r.length,20)))){i(e),o.current=e,a.current=Date.now();return}if(!t){r!==e&&(i(e),o.current=e);return}let s=e.slice(o.current.length);if(!s)return;let l=Date.now();if(l-a.current<n)return;let u=/[.?!。?!](\s|$)|[\n]/.test(s),d=s.length>50,f=s.trim().length<5;(u&&!f||d)&&(i(e),o.current=e,a.current=l)},[e,t,n,r]),r}function Inn({initialOffset:e={x:0,y:0}}={}){let t=(0,_.useRef)(null),[n,r]=(0,_.useState)(!1),i=(0,_.useRef)(e),a=(0,_.useRef)({x:0,y:0}),o=(0,_.useRef)({x:0,y:0}),s=(0,_.useCallback)(()=>{if(t.current){let{x:e,y:n}=i.current;t.current.style.transform=`translate3d(calc(-50% + ${e}px), ${n}px, 0)`}},[]),l=(0,_.useCallback)(e=>{e.target.closest(`button, input, a, [data-no-drag]`)||(e.preventDefault(),r(!0),a.current={x:e.clientX,y:e.clientY},o.current={...i.current})},[]);return(0,_.useEffect)(()=>{let e=e=>{if(!n)return;let t=e.clientX-a.current.x,r=e.clientY-a.current.y;i.current={x:o.current.x+t,y:o.current.y+r},s()},t=()=>{r(!1)};return n&&(window.addEventListener(`mousemove`,e,{passive:!0}),window.addEventListener(`mouseup`,t)),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t)}},[n,s]),(0,_.useEffect)(()=>{s()},[s]),{elementRef:t,isDragging:n,handleMouseDown:l}}let Lnn=`AI_SELECTED_AGENT`,Rnn=e=>{let[t,n]=(0,_.useState)(e);return(0,_.useEffect)(()=>{typeof window<`u`&&ud().then(e=>{if(e&&e!==ad)n(e);else{let e=localStorage.getItem(Lnn);e&&n(e)}})},[]),{agent:t,setAgent:e=>{n(e),!(typeof window>`u`)&&(e?.trim()?localStorage.setItem(Lnn,e):localStorage.removeItem(Lnn))}}},znn=({isActive:e,onToggleInspector:t,onSubmitAgent:n,isAgentWorking:r,messages:i,status:a,inspectionCount:o=0,inspectionItems:s=[],onRemoveInspection:l=()=>{}})=>{let[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(``),[m,h]=(0,_.useState)(null),[g,v]=(0,_.useState)(`none`),[y,b]=(0,_.useState)(!1),[x,C]=(0,_.useState)(!1),[w,T]=(0,_.useState)(!0),{agent:E,setAgent:D}=Rnn(ad),[O,k]=(0,_.useState)(!1),A=id.find(e=>e.name===E)||id[0],{elementRef:j,isDragging:M,handleMouseDown:N}=Inn(),[P,F]=(0,_.useState)(null),[I,L]=(0,_.useState)(``),R=Fnn(I,r,50),[ee,te]=(0,_.useState)(``),z=(0,_.useRef)(``),B=(0,_.useRef)(``);(0,_.useEffect)(()=>{let e=R,t=z.current;if(e.length<t.length||!e.startsWith(t)){te(e),z.current=e;return}if(e.length>t.length){let n=e.slice(t.length).trim();n&&te(n),z.current=e}},[R]);let ne=(0,_.useRef)(null),re=(0,_.useRef)(null),ie=(0,_.useRef)(null),ae=(0,_.useRef)(!1);(0,_.useEffect)(()=>{if(i.length===0){L(``),h(null),ie.current=null,ae.current=!1,te(``),z.current=``;return}let e=i[i.length-1];if(e.role!==`assistant`)return;let t=Kce(e),{displayText:n,toolCall:r}=Jce(e,t||ie.current);L(n||``),t&&(ie.current=t),r?(re.current&&=(clearTimeout(re.current),null),h(r),ae.current=!0):ae.current=!1},[i]),(0,_.useEffect)(()=>{ee!==B.current&&(ae.current||h(null),B.current=ee)},[ee]),(0,_.useEffect)(()=>{u&&ne.current&&ne.current.focus()},[u]),(0,_.useEffect)(()=>{if(!r&&x){b(!1),C(!1),T(!1);let e=setTimeout(()=>{T(!0)},2e3);return()=>clearTimeout(e)}},[r,x]),(0,_.useEffect)(()=>{function e(e){let{plan:t,inspectionId:n}=e.detail;if(t?.steps){let e=t.steps.find(e=>e.status===`in-progress`),r=t.steps.filter(e=>e.status===`completed`).length;F({id:n,status:`in-progress`,currentStep:e?{title:e.title,index:r+1,total:t.steps.length}:void 0})}}function t(e){let{status:t,result:n,inspectionId:r}=e.detail;F({id:r,status:t,message:n?.message||n}),setTimeout(()=>{F(null)},3e3)}return window.addEventListener(`plan-progress-reported`,e),window.addEventListener(`inspection-result-received`,t),()=>{window.removeEventListener(`plan-progress-reported`,e),window.removeEventListener(`inspection-result-received`,t)}},[]);let oe=e=>{e.preventDefault(),f.trim()&&(re.current&&=(clearTimeout(re.current),null),h(null),L(``),ie.current=null,b(!0),C(!0),n(f,E),p(``),g===`none`&&(d(!1),ne.current?.blur()))},se=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),oe(e)),e.key===`Escape`&&(d(!1),ne.current?.blur())},ce=a===`error`,le=i.length>0,ue=u&&!y,de=(!u||y)&&(r||le||P);return(0,S.jsxs)(`div`,{ref:j,className:nt(`fixed bottom-8 left-1/2 z-[999999]`,`transition-all duration-300 ease-[cubic-bezier(0.23,1,0.32,1)]`,u?`w-[450px]`:de?`w-auto min-w-[200px] max-w-[450px]`:`w-[160px]`,M?`cursor-grabbing`:`cursor-grab`),onMouseDown:N,onMouseEnter:()=>{!x&&w&&!M&&d(!0)},onMouseLeave:()=>{!f.trim()&&!x&&!M&&(d(!1),v(`none`)),T(!0)},children:[(0,S.jsxs)(`div`,{className:nt(`relative flex items-center backdrop-blur-xl shadow-2xl border border-border`,`transition-all duration-300 ease-[cubic-bezier(0.23,1,0.32,1)]`,u?`h-12 p-2 pl-4`:`h-9 px-2 py-1`,g===`none`?`bg-muted/90 rounded-full`:`bg-muted/95 rounded-b-lg rounded-t-none border-t-0`,ce&&!u&&`bg-destructive/10 border-destructive/20`),children:[(0,S.jsxs)(`div`,{className:nt(`flex items-center transition-opacity duration-300 w-full relative`,ue?`absolute left-3 opacity-0 pointer-events-none`:`relative opacity-100`),children:[!de&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`flex items-center justify-center w-6 h-6 rounded-full bg-accent flex-shrink-0`,children:(0,S.jsx)(mi,{className:`w-3.5 h-3.5 text-foreground`})}),(0,S.jsx)(`span`,{className:`text-xs text-muted-foreground/70 ml-3`,children:`Hover to inspect`})]}),de&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-3 flex-shrink-0`,children:[(0,S.jsx)(`div`,{className:`relative flex items-center justify-center w-6 h-6 rounded-full bg-accent flex-shrink-0`,children:r?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`absolute inset-0 rounded-full border-2 border-current opacity-20 animate-ping text-foreground`}),(0,S.jsx)(mi,{className:`w-3.5 h-3.5 animate-pulse text-foreground`})]}):P?P.status===`in-progress`?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`absolute inset-0 rounded-full border-2 border-current opacity-20 animate-ping text-blue-500`}),(0,S.jsx)(hi,{className:`w-3.5 h-3.5 animate-pulse text-blue-500`})]}):P.status===`completed`?(0,S.jsx)(ri,{className:`w-5 h-5 text-green-500`}):(0,S.jsx)(ii,{className:`w-5 h-5 text-red-500`}):ce?(0,S.jsx)(ii,{className:`w-5 h-5 text-red-500`}):(0,S.jsx)(ri,{className:`w-5 h-5 text-green-500`})}),(0,S.jsx)(`div`,{className:`w-px h-4 bg-border flex-shrink-0`})]}),(0,S.jsx)(`div`,{className:`flex-1 flex justify-center min-w-0 pl-2`,children:(0,S.jsx)(`div`,{className:`flex flex-col min-w-0 max-w-full pr-2 max-h-[24px] overflow-hidden`,children:P&&P.status===`in-progress`&&P.currentStep?(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5 text-sm font-medium text-foreground min-w-0`,children:[(0,S.jsx)(hi,{className:`w-4 h-4 flex-shrink-0`}),(0,S.jsxs)(`span`,{className:`truncate min-w-0`,children:[`Step `,P.currentStep.index,`/`,P.currentStep.total,`: `,P.currentStep.title]})]}):P?.message?(0,S.jsx)(`div`,{className:`text-sm font-medium leading-[1.4] text-foreground truncate min-w-0`,children:P.message}):m?(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5 text-sm font-medium text-foreground min-w-0`,children:[(0,S.jsx)(hi,{className:`w-4 h-4 flex-shrink-0`}),(0,S.jsx)(`span`,{className:`truncate min-w-0`,children:m})]}):(0,S.jsx)(`div`,{className:`text-sm font-medium leading-[1.4] text-foreground truncate min-w-0`,children:r&&!ee?(0,S.jsx)(Uce,{duration:2,spread:2,children:a===`submitted`&&A?.command===`npx`?`Starting ${A.name}... This may take a moment.`:`Thinking...`}):ee||`Processing...`})})})]})]}),(0,S.jsxs)(`div`,{className:nt(`flex items-center w-full gap-3 transition-all duration-500 delay-75`,ue?`opacity-100 translate-y-0 relative pointer-events-auto`:`opacity-0 translate-y-4 pointer-events-none absolute top-2 left-4 right-2`),onClick:e=>e.stopPropagation(),children:[(0,S.jsx)(`button`,{onClick:t,className:nt(`relative flex items-center justify-center w-7 h-7 rounded-full transition-colors flex-shrink-0`,e?`bg-blue-500 text-white shadow-[0_0_15px_rgba(59,130,246,0.5)]`:`bg-accent text-muted-foreground hover:bg-accent/80 hover:text-foreground`),title:`Toggle Inspector`,children:(0,S.jsx)(si,{className:`w-3.5 h-3.5`})}),(0,S.jsx)(`div`,{className:`w-px h-4 bg-border flex-shrink-0`}),o>0&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`button`,{type:`button`,onClick:()=>v(e=>e===`inspections`?`none`:`inspections`),className:nt(`relative flex items-center justify-center w-7 h-7 rounded-full transition-colors flex-shrink-0`,`hover:bg-accent/50`,g===`inspections`&&`bg-accent/50 text-foreground`),title:`View Inspections`,children:[(0,S.jsx)(ci,{className:`w-3.5 h-3.5`}),(0,S.jsx)(`span`,{className:`absolute -top-0.5 -right-0.5 flex items-center justify-center min-w-[12px] h-[12px] px-0.5 text-[8px] font-bold text-white bg-red-500 rounded-full border border-background shadow-sm leading-none`,children:o>99?`99+`:o})]}),(0,S.jsx)(`div`,{className:`w-px h-4 bg-border flex-shrink-0`})]}),(0,S.jsxs)(`form`,{onSubmit:oe,className:`flex-1 flex items-center gap-2 min-w-0`,onClick:e=>e.stopPropagation(),children:[(0,S.jsxs)(`div`,{className:`relative flex-shrink-0`,children:[(0,S.jsx)(`button`,{type:`button`,onClick:()=>k(!O),className:`flex items-center justify-center w-7 h-7 rounded-full hover:bg-accent/50 transition-colors`,title:`Select Agent`,children:(0,S.jsx)(`img`,{src:id.find(e=>e.name===E)?.meta?.icon,alt:E,className:`w-3.5 h-3.5`})}),O&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`fixed inset-0 z-[999998]`,onClick:()=>k(!1)}),(0,S.jsx)(`div`,{className:`absolute bottom-full left-0 mb-2 w-48 bg-popover border border-border rounded-lg shadow-lg overflow-hidden z-[999999] animate-in fade-in zoom-in-95 duration-200`,children:id.map(e=>(0,S.jsxs)(`button`,{onClick:()=>{D(e.name),k(!1)},className:nt(`w-full flex items-center gap-2 px-3 py-2 text-sm text-left hover:bg-accent transition-colors`,E===e.name&&`bg-accent/50 font-medium`),children:[e.meta?.icon&&(0,S.jsx)(`img`,{src:e.meta.icon,alt:``,className:`w-4 h-4`}),e.name]},e.name))})]})]}),(0,S.jsx)(`input`,{ref:ne,type:`text`,value:f,onChange:e=>p(e.target.value),onKeyDown:se,placeholder:`Ask ${E}...`,className:`w-full bg-transparent border-none outline-none text-foreground placeholder-muted-foreground text-sm h-7`,tabIndex:0}),(i.length>0||r||x)&&(0,S.jsx)(`button`,{type:`button`,onClick:()=>v(e=>e===`chat`?`none`:`chat`),className:nt(`flex items-center justify-center w-7 h-7 rounded-full transition-all flex-shrink-0`,g===`chat`?`bg-foreground text-background`:`bg-accent text-muted-foreground hover:bg-accent/80 hover:text-foreground`),title:g===`chat`?`Collapse`:`Expand messages`,children:(0,S.jsx)(Aee,{className:nt(`w-3.5 h-3.5 transition-transform duration-300`,g===`chat`&&`rotate-180`)})}),(0,S.jsx)(`button`,{type:`submit`,disabled:!f.trim()||r,className:nt(`flex items-center justify-center w-7 h-7 rounded-full transition-all flex-shrink-0`,f.trim()?`bg-foreground text-background scale-100`:`bg-accent text-muted-foreground/50 scale-90`),children:r?(0,S.jsx)(mi,{className:`w-3.5 h-3.5 animate-spin`}):(0,S.jsx)(Zr,{className:`w-3.5 h-3.5`})})]})]})]}),g!==`none`&&(0,S.jsx)(`div`,{className:`absolute bottom-full left-0 right-0 pointer-events-auto max-w-[450px] mx-auto animate-panel-in`,children:(0,S.jsxs)(`div`,{className:`bg-muted/95 backdrop-blur-xl rounded-t-xl border border-border border-b-0 shadow-2xl overflow-hidden`,children:[g===`inspections`&&s.length>0&&(0,S.jsx)(`div`,{className:`border-b border-border`,children:(0,S.jsx)(Yi,{items:s,onRemove:l})}),g===`chat`&&(0,S.jsx)(`div`,{className:`h-[500px]`,children:(0,S.jsx)(Pnn,{messages:i,status:a,selectedAgent:E})})]})})]})};var Bnn=`vercel.ai.error`,Vnn=Symbol.for(Bnn),Hnn,Unn=class e extends Error{constructor({name:e,message:t,cause:n}){super(t),this[Hnn]=!0,this.name=e,this.cause=n}static isInstance(t){return e.hasMarker(t,Bnn)}static hasMarker(e,t){let n=Symbol.for(t);return typeof e==`object`&&!!e&&n in e&&typeof e[n]==`boolean`&&e[n]===!0}};Hnn=Vnn;var W7=Unn;function Wnn(e){return e==null?`unknown error`:typeof e==`string`?e:e instanceof Error?e.message:JSON.stringify(e)}var Gnn=`AI_InvalidArgumentError`,Knn=`vercel.ai.error.${Gnn}`,qnn=Symbol.for(Knn),Jnn,Ynn=class extends W7{constructor({message:e,cause:t,argument:n}){super({name:Gnn,message:e,cause:t}),this[Jnn]=!0,this.argument=n}static isInstance(e){return W7.hasMarker(e,Knn)}};Jnn=qnn;var Xnn=`AI_JSONParseError`,Znn=`vercel.ai.error.${Xnn}`,Qnn=Symbol.for(Znn),$nn,ern=class extends W7{constructor({text:e,cause:t}){super({name:Xnn,message:`JSON parsing failed: Text: ${e}.
6837
6921
  Error message: ${Wnn(t)}`,cause:t}),this[$nn]=!0,this.text=e}static isInstance(e){return W7.hasMarker(e,Znn)}};$nn=Qnn;var trn=`AI_TypeValidationError`,nrn=`vercel.ai.error.${trn}`,rrn=Symbol.for(nrn),irn,arn=class e extends W7{constructor({value:e,cause:t}){super({name:trn,message:`Type validation failed: Value: ${JSON.stringify(e)}.
6838
6922
  Error message: ${Wnn(t)}`,cause:t}),this[irn]=!0,this.value=e}static isInstance(e){return W7.hasMarker(e,nrn)}static wrap({value:t,cause:n}){return e.isInstance(n)&&n.value===t?n:new e({value:t,cause:n})}};irn=rrn;var G7=arn,orn=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n}={}){let r;super({start(i){r=hl({onEvent:e=>{i.enqueue(e)},onError(t){e===`terminate`?i.error(t):typeof e==`function`&&e(t)},onRetry:t,onComment:n})},transform(e){r.feed(e)}})}};Object.freeze({status:`aborted`});function K7(e,t,n){function r(n,r){var i;for(let a in Object.defineProperty(n,`_zod`,{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,r),o.prototype)a in n||Object.defineProperty(n,a,{value:o.prototype[a].bind(n)});n._zod.constr=o,n._zod.def=r}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var q7=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}};let srn={};function J7(e){return e&&Object.assign(srn,e),srn}function crn(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function lrn(e,t){return typeof t==`bigint`?t.toString():t}function urn(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function drn(e){return e==null}function frn(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function prn(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}function Y7(e,t,n){Object.defineProperty(e,t,{get(){{let r=n();return e[t]=r,r}throw Error(`cached value already set`)},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function X7(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Z7(e){return JSON.stringify(e)}let mrn=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Q7(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}let hrn=urn(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function $7(e){if(Q7(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(Q7(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}let grn=new Set([`string`,`number`,`symbol`]);function e9(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function t9(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function n9(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function _rn(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}let vrn={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function yrn(e,t){let n={},r=e._zod.def;for(let e in t){if(!(e in r.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&(n[e]=r.shape[e])}return t9(e,{...e._zod.def,shape:n,checks:[]})}function brn(e,t){let n={...e._zod.def.shape},r=e._zod.def;for(let e in t){if(!(e in r.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete n[e]}return t9(e,{...e._zod.def,shape:n,checks:[]})}function xrn(e,t){if(!$7(t))throw Error(`Invalid input to extend: expected a plain object`);return t9(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return X7(this,`shape`,n),n},checks:[]})}function Srn(e,t){return t9(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return X7(this,`shape`,n),n},catchall:t._zod.def.catchall,checks:[]})}function Crn(e,t,n){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return t9(t,{...t._zod.def,shape:i,checks:[]})}function wrn(e,t,n){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return t9(t,{...t._zod.def,shape:i,checks:[]})}function r9(e,t=0){for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function i9(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function a9(e){return typeof e==`string`?e:e?.message}function o9(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=a9(e.inst?._zod.def?.error?.(e))??a9(t?.error?.(e))??a9(n.customError?.(e))??a9(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Trn(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function s9(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}let Ern=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),Object.defineProperty(e,`message`,{get(){return JSON.stringify(t,lrn,2)},enumerable:!0}),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},Drn=K7(`$ZodError`,Ern),Orn=K7(`$ZodError`,Ern,{Parent:Error});function krn(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Arn(e,t){let n=t||function(e){return e.message},r={_errors:[]},i=e=>{for(let t of e.issues)if(t.code===`invalid_union`&&t.errors.length)t.errors.map(e=>i({issues:e}));else if(t.code===`invalid_key`)i({issues:t.issues});else if(t.code===`invalid_element`)i({issues:t.issues});else if(t.path.length===0)r._errors.push(n(t));else{let e=r,i=0;for(;i<t.path.length;){let r=t.path[i];i===t.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(n(t))):e[r]=e[r]||{_errors:[]},e=e[r],i++}}};return i(e),r}let jrn=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new q7;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>o9(e,a,J7())));throw mrn(t,i?.callee),t}return o.value},Mrn=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>o9(e,a,J7())));throw mrn(t,i?.callee),t}return o.value},Nrn=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new q7;return a.issues.length?{success:!1,error:new(e??Drn)(a.issues.map(e=>o9(e,i,J7())))}:{success:!0,data:a.value}},Prn=Nrn(Orn),Frn=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>o9(e,i,J7())))}:{success:!0,data:a.value}},Irn=Frn(Orn),Lrn=/^[cC][^\s-]{8,}$/,Rrn=/^[0-9a-z]+$/,zrn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Brn=/^[0-9a-vA-V]{20}$/,Vrn=/^[A-Za-z0-9]{27}$/,Hrn=/^[a-zA-Z0-9_-]{21}$/,Urn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Wrn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Grn=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,Krn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;function qrn(){return RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)}let Jrn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Yrn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,Xrn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Zrn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Qrn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$rn=/^[A-Za-z0-9_-]*$/,ein=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,tin=/^\+(?:[0-9]){6,14}[0-9]$/,nin=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,rin=RegExp(`^${nin}$`);function iin(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ain(e){return RegExp(`^${iin(e)}$`)}function oin(e){let t=iin({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-]\\d{2}:\\d{2})`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${nin}T(?:${r})$`)}let sin=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},cin=/^\d+$/,lin=/^-?\d+(?:\.\d+)?/i,uin=/true|false/i,din=/null/i,fin=/^[^A-Z]*$/,pin=/^[^a-z]*$/,c9=K7(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),min={number:`number`,bigint:`bigint`,object:`date`},hin=K7(`$ZodCheckLessThan`,(e,t)=>{c9.init(e,t);let n=min[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),gin=K7(`$ZodCheckGreaterThan`,(e,t)=>{c9.init(e,t);let n=min[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),_in=K7(`$ZodCheckMultipleOf`,(e,t)=>{c9.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):prn(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),vin=K7(`$ZodCheckNumberFormat`,(e,t)=>{c9.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=vrn[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=cin)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inst:e})}}),yin=K7(`$ZodCheckMaxLength`,(e,t)=>{var n;c9.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!drn(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Trn(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bin=K7(`$ZodCheckMinLength`,(e,t)=>{var n;c9.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!drn(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Trn(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),xin=K7(`$ZodCheckLengthEquals`,(e,t)=>{var n;c9.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!drn(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Trn(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),l9=K7(`$ZodCheckStringFormat`,(e,t)=>{var n,r;c9.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Sin=K7(`$ZodCheckRegex`,(e,t)=>{l9.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Cin=K7(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=fin,l9.init(e,t)}),win=K7(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=pin,l9.init(e,t)}),Tin=K7(`$ZodCheckIncludes`,(e,t)=>{c9.init(e,t);let n=e9(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ein=K7(`$ZodCheckStartsWith`,(e,t)=>{c9.init(e,t);let n=RegExp(`^${e9(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Din=K7(`$ZodCheckEndsWith`,(e,t)=>{c9.init(e,t);let n=RegExp(`.*${e9(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Oin=K7(`$ZodCheckOverwrite`,(e,t)=>{c9.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var kin=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
6839
6923
  `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcpc-tech/unplugin-dev-inspector-mcp",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Universal dev inspector plugin for React/Vue - inspect component sources and API calls in any bundler",
5
5
  "type": "module",
6
6
  "license": "MIT",