1import{CardHeader as r,CardContent as a,Card as d}from"./Card.BGfgt6h8.js";import{at as i,aQ as e,b5 as x}from"./vendor.misc.D_7Dea-0.js";const f=()=>e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"text-blue-600"},[e("polyline",{points:"4,17 10,11 4,5"},null),e("line",{x1:"12",y1:"19",x2:"20",y2:"19"},null)]),p=()=>e("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",class:"text-green-600"},[e("polygon",{points:"5,3 19,12 5,21"},null)]),v=i({name:"CommandWidget",props:{commandName:String,commandMessage:String,commandArgs:String},setup(t){return()=>e(d,{class:"border border-gray-200 rounded-lg shadow-sm hover:shadow-md transition-shadow duration-200 mb-3 bg-white"},{default:()=>[e(r,{class:"pb-3"},{default:()=>[e("div",{class:"flex items-center gap-3"},[e("div",{class:"flex items-center justify-center w-8 h-8 bg-blue-50 rounded-full"},[e(f,null,null)]),e("div",{class:"flex-1 min-w-0"},[e("div",{class:"flex items-center gap-2"},[e(p,null,null),e("span",{class:"font-mono text-sm font-medium text-gray-900 truncate"},[t.commandName])]),t.commandMessage&&e("p",{class:"text-sm text-gray-600 mt-1 leading-relaxed"},[t.commandMessage])])])]}),t.commandArgs&&e(a,{class:"pt-0"},{default:()=>[e("div",{class:"bg-gray-50 rounded-md border border-gray-100 p-3"},[e("pre",{class:"text-xs font-mono text-gray-800 whitespace-pre-wrap leading-relaxed overflow-x-auto"},[t.commandArgs])])]})]})}}),h=()=>e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"text-green-600"},[e("polyline",{points:"16,18 22,12 16,6"},null),e("polyline",{points:"8,6 2,12 8,18"},null)]),w=()=>e("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",class:"text-green-600"},[e("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},null)]),C=i({name:"CommandOutputWidget",props:{output:String,onLinkDetected:Function},setup(t){const u=o=>{if(!o)return o;const l=/(https?:\/\/[^\s]+)/g;return o.split(` 2`).map((c,m)=>e("div",{key:m},[c.split(l).map((n,g)=>l.test(n)?e("span",{key:g,class:"text-blue-600 hover:text-blue-800 underline cursor-pointer",onClick:()=>{var s;return(s=t.onLinkDetected)==null?void 0:s.call(t,n)}},[n]):n)]))};return()=>e(d,{class:"border border-gray-200 rounded-lg shadow-sm hover:shadow-md transition-shadow duration-200 mb-3 bg-white"},{default:()=>[e(r,{class:"pb-3"},{default:()=>[e("div",{class:"flex items-center gap-3"},[e("div",{class:"flex items-center justify-center w-8 h-8 bg-green-50 rounded-full"},[e(h,null,null)]),e("div",{class:"flex items-center gap-2"},[e(w,null,null),e("span",{class:"font-mono text-sm font-medium text-gray-900"},[x("Command Output")])])])]}),t.output&&e(a,{class:"pt-0"},{default:()=>[e("div",{class:"bg-gray-900 rounded-md border border-gray-200 p-4 max-h-96 overflow-y-auto"},[e("pre",{class:"text-sm font-mono text-gray-100 whitespace-pre-wrap leading-relaxed"},[typeof t.output=="string"?u(t.output):t.output])])]})]})}});export{C as CommandOutputWidget,v as CommandWidget};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.