@inf-monkeys-tech/monkeys-design 2.0.395 → 2.0.396
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/agent-ui/index.js +1 -1
- package/dist/components/agent-ui/index.js.map +1 -1
- package/dist/components/agent-ui/index.mjs +1 -1
- package/dist/components/agent-ui/index.mjs.map +1 -1
- package/dist/sources/{2b5602bdc5c948d3e74a6ac1d6db0eb6192a3b9b56392fcb1fa8de9b1816be95.tsx → e348c505638b1f635b6ae8ee14a8a4fefda6201c641e028c87069ecce6f43c36.tsx} +1 -1
- package/package.json +1 -1
|
@@ -222,7 +222,7 @@ void main(){
|
|
|
222
222
|
${e==="red"?"bg-red":"bg-green"}`,style:{animation:"bui-pop-in 300ms cubic-bezier(0.23,1,0.32,1) both"},children:t})}a(np,"Badge");var Ok=jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3.5",strokeLinecap:"round",children:jsx("path",{d:"M18 6L6 18M6 6l12 12"})}),Hk=jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})}),Wk=jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M21 12a9 9 0 1 1-2.64-6.36M21 3v6h-6"})}),Fk={completed:"Completed",failed:"Failed"},_k=[];function Qa({variant:e="Capsules",rows:t=_k,labels:o,className:n,onToggleRow:r,progress:i}){let[s,l]=useState({}),d=Ot(Fk,o),c=Ue();if(e==="Progress"&&i){let g=t[i.current-1];if(!g)return null;let b={...g,label:c("taskProgressCurrent",{current:i.current,total:t.length,title:g.label}),status:i.status==="completed"?"done":i.status,step:i.current,details:[]};return jsx(op,{progress:i,className:n,capsule:jsx(Qa,{variant:"Capsules",rows:[b],labels:o}),children:jsx(Qa,{variant:"List",rows:t.map((x,f)=>({...x,step:x.step??f+1})),labels:o})})}let u=a(g=>g.status==="done"?jsx(np,{tone:"green",children:Hk}):g.status==="running"?jsx(Ls,{active:true,children:g.step}):g.status==="pending"?jsx(Ls,{children:g.step}):g.status==="failed"?jsx(np,{tone:"red",children:Ok}):jsx(Ls,{children:g.step}),"badgeFor"),m=a(g=>g.status==="done"?jsx("span",{className:"inline-flex h-5.5 items-center rounded-chip bg-green-tint px-2 text-[11.5px] font-medium text-green",children:d.completed}):g.status==="stopped"||g.status==="skipped"?jsx("span",{className:"inline-flex h-5.5 items-center rounded-chip bg-inset px-2 text-[11.5px] font-medium text-ink-2",children:c(`taskProgressStatus.${g.status}`)}):g.status==="running"?null:g.status==="failed"?jsxs("span",{className:"inline-flex h-5.5 items-center gap-1.5 rounded-chip bg-red-tint px-2 text-[11.5px] font-medium text-red",style:{animation:"bui-fade-in 200ms ease-out both"},children:[d.failed," ",jsx("span",{style:{animation:"bui-spin 1.2s linear infinite"},className:"flex",children:Wk})]}):null,"pillFor"),p=e==="List";return jsx(re,{children:jsx("div",{"data-bui-task-rows":true,"data-variant":p?"List":"Capsules",role:"list",className:`flex w-full max-w-110 flex-col ${p?"gap-0 self-start overflow-hidden rounded-card bg-surface shadow-card":"min-h-[196px] gap-2"}${n?` ${n}`:""}`,children:t.map((g,b)=>{let x=g.details.length>0,f=x?"button":"div",y=x&&(s[g.key]??false);return jsxs("div",{role:"listitem","data-status":g.status,className:`self-stretch overflow-hidden transition-[border-radius,background-color] duration-300 hover:bg-inset ${p?"border-b border-line last:border-0":"bg-surface shadow-card"}`,style:{borderRadius:p?0:"var(--bui-token-radius-card, var(--bui-radius-card))",animation:`bui-fade-up 450ms cubic-bezier(0.23,1,0.32,1) ${b*80}ms both`},children:[jsxs(f,{type:x?"button":void 0,"aria-expanded":x?y:void 0,onClick:x?()=>{l(k=>({...k,[g.key]:!y})),r?.(g.key,!y);}:void 0,className:"flex min-h-11 w-full items-center gap-2.5 px-2.5 py-2 text-left",children:[jsx("span",{className:"flex size-6 shrink-0 items-center justify-center",children:u(g)}),jsx("span",{"data-bui-task-label":true,className:"min-w-0 flex-1 [overflow-wrap:anywhere] text-[13px] font-medium text-ink",children:g.label}),jsx("span",{className:"text-[12.5px] text-ink-2 tabular-nums",children:g.amount}),m(g),x&&jsx("span",{"aria-hidden":"true",className:"-ml-2 flex size-7 shrink-0 items-center justify-center rounded-full text-ink-3",children:jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform duration-300",style:{transform:y?"rotate(180deg)":"rotate(0)"},children:jsx("path",{d:"M6 9l6 6 6-6"})})})]}),jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-300",style:{gridTemplateRows:y?"1fr":"0fr",opacity:y?1:0,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:jsx("div",{className:"overflow-hidden",children:jsxs("div",{className:"mb-2.5 grid grid-cols-[24px_1fr] gap-2.5 px-2.5",children:[jsx("span",{"aria-hidden":true,className:"mx-auto h-full w-px bg-line"}),jsx("div",{className:"flex flex-col gap-1.5",children:g.details.map((k,S)=>jsxs("div",{className:"flex items-center justify-between",style:y?{animation:`bui-fade-up 300ms cubic-bezier(0.23,1,0.32,1) ${120+S*100}ms both`}:void 0,children:[jsx("span",{className:"text-[12px] text-ink-2",children:k.label}),jsx("span",{className:"font-mono text-[11.5px] text-ink-3 tabular-nums",children:k.meta})]},k.label))})]})})})]},g.key)})})})}a(Qa,"BUITaskRows");function ip({children:e,className:t="",highlightClassName:o="inset-x-0 rounded-[8px] bg-hover",rowSelector:n="[data-menu-row]"}){let r=useRef(null),[i,s]=useState(null),[l,d]=useState(false),c=a(u=>{let m=r.current;if(!(u instanceof Element)||!m)return;let p=u.closest(n);if(!(p instanceof HTMLElement)||!m.contains(p))return;let g=m.getBoundingClientRect(),b=p.getBoundingClientRect();s({top:b.top-g.top,height:b.height}),d(true);},"moveTo");return jsx(re,{children:jsxs("div",{ref:r,onMouseOver:u=>c(u.target),onMouseLeave:()=>d(false),onFocusCapture:u=>c(u.target),onBlurCapture:u=>{r.current?.contains(u.relatedTarget)||d(false);},className:`group/glide-menu relative ${t}`,children:[jsx("span",{"aria-hidden":true,className:`pointer-events-none absolute ${o}`,style:{top:i?.top??0,height:i?.height??0,opacity:i&&l?1:0,transition:"top 220ms cubic-bezier(0.23,1,0.32,1), height 220ms cubic-bezier(0.23,1,0.32,1), opacity 150ms ease"}}),e]})})}a(ip,"BUIGlideMenu");var Gk=[],qk={skip:"Skip",continue:"Continue",send:"Send",customPlaceholder:"Something else\u2026",sentMessage:"Answers sent"},Kk=400,zs="360ms cubic-bezier(0.22, 1, 0.36, 1)";function Xk({value:e}){let t=useRef(e),[o,n]=useState(e),[r,i]=useState(e),[s,l]=useState(false),[d,c]=useState(false),[u,m]=useState("up");useEffect(()=>{if(t.current===e)return;let g=t.current;t.current=e;let b=parseInt(g,10),x=parseInt(e,10);m(Number.isFinite(b)&&Number.isFinite(x)&&x<b?"down":"up"),n(g),i(e),l(true),c(false);let f=0,y=requestAnimationFrame(()=>{f=requestAnimationFrame(()=>c(true));}),k=setTimeout(()=>{l(false),n(e),c(false);},Kk);return ()=>{cancelAnimationFrame(y),cancelAnimationFrame(f),clearTimeout(k);}},[e]);let p=s?r:o;return jsx(Fragment,{children:Array.from({length:p.length},(g,b)=>{let x=o[b]??"",f=p[b]??"";return !s||x===f?jsx("span",{children:f},`${b}-${f}`):jsx("span",{style:{display:"inline-block",position:"relative",overflow:"hidden",height:"1em",lineHeight:"1em",verticalAlign:"-0.05em"},children:jsxs("span",{style:{display:"flex",flexDirection:"column",transition:"transform 350ms cubic-bezier(0.4, 0, 0.2, 1)",transform:`translateY(${d?u==="down"?"0":"-1em":u==="down"?"-1em":"0"})`},children:[jsx("span",{style:{height:"1em",lineHeight:"1em"},children:u==="down"?f:x}),jsx("span",{style:{height:"1em",lineHeight:"1em"},children:u==="down"?x:f})]})},`${b}-${x}-${f}-${u}`)})})}a(Xk,"RollingDigits");function Os({path:e,size:t=14,sw:o=2}){return jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true,children:e})}a(Os,"Ico");function Ws({questions:e=Gk,labels:t,onSubmitted:o,onAnswerChange:n,resettable:r=true,allowSkip:i=true,status:s="idle",onReset:l}){let d=Ue(),c=Ot(qk,t),[u,m]=useState(0),[p,g]=useState({}),[b,x]=useState({}),f=s==="submitted",y=useRef(p),k=useRef(b);y.current=p,k.current=b;let[S,w]=useState(true),C=useRef(null),T=useRef([]),$=useRef(false),[P,E]=useState(void 0),[R,W]=useState(0),[B,A]=useState(false),[L,I]=useState(false),K=u===e.length-1,_=(p[u]??[]).length>0||!!b[u]?.trim(),Y=a(V=>{let J=T.current[u];if(!J)return;let O=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;E(J.offsetHeight),W(J.offsetTop),A(V&&!O);},"sync");useLayoutEffect(()=>{let V=$.current;$.current=true,Y(V),I(true);},[u,p,b,S,f]),useEffect(()=>{let V=requestAnimationFrame(()=>Y($.current));return ()=>cancelAnimationFrame(V)},[u]),useEffect(()=>()=>{C.current&&clearTimeout(C.current);},[]);let M=a(V=>{C.current&&clearTimeout(C.current),m(Math.min(Math.max(V,0),e.length-1));},"goTo"),z=a(()=>{C.current&&clearTimeout(C.current),s!=="submitting"&&o?.(y.current,k.current);},"send"),Q=a(()=>{K?z():M(u+1);},"advance"),ce=a(V=>{let J=e[u].type,O=y.current,F=O[u]??[],oe=J==="radio"?[V]:F.includes(V)?F.filter(pe=>pe!==V):[...F,V],ae={...O,[u]:oe};y.current=ae,g(ae),n?.(u,oe),J==="radio"&&(x(pe=>({...pe,[u]:""})),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{K?z():m(pe=>Math.min(e.length-1,pe+1));},480));},"toggle"),se=a(()=>{m(0),g({}),x({}),l?.(),w(true),$.current=false;},"reset");return e.length?S?f?jsx(re,{children:jsxs("div",{className:"flex w-full max-w-80 items-center gap-3",style:{animation:"bui-pop-in 260ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-green-tint py-1 pr-2.5 pl-1 text-[12.5px] font-medium text-green",children:[jsx("span",{className:"flex size-4.5 items-center justify-center rounded-full bg-green text-white",children:jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})})}),c.sentMessage]}),r&&jsx("button",{type:"button",onClick:se,className:"text-[12px] font-medium text-ink-3 transition-colors duration-150 hover:text-ink",children:d("Start over")})]})}):jsx(re,{children:jsx("div",{className:"w-full max-w-80",children:jsxs("div",{className:"relative overflow-hidden rounded-card bg-surface shadow-card",style:{animation:"bui-fade-up 380ms cubic-bezier(0.23,1,0.32,1) both"},children:[jsx("button",{type:"button","aria-label":d("Dismiss"),onClick:()=>w(false),className:"primitive-icon-button absolute right-2.5 top-2.5 z-10 text-ink-3 transition-colors duration-100 hover:bg-hover hover:text-ink",children:jsx(Os,{size:14,sw:2.2,path:jsx("path",{d:"M18 6L6 18M6 6l12 12"})})}),jsx("div",{className:"primitive-card-pad",children:jsx("div",{className:"overflow-hidden",style:{height:P,transition:B?`height ${zs}`:void 0},"aria-live":"polite",children:jsx("div",{style:{display:"flex",flexDirection:"column",gap:"calc(var(--bui-spacing) * 6.5)",transform:`translate3d(0, ${-R}px, 0)`,transition:B?`transform ${zs}`:void 0,willChange:"transform"},children:e.map((V,J)=>{let O=J===u;if(!L&&!O)return null;let F=p[J]??[],oe={opacity:O?1:0,transition:B?`opacity ${zs}`:void 0,pointerEvents:O?void 0:"none"};return jsxs("div",{ref:ae=>{T.current[J]=ae;},"aria-hidden":O?void 0:true,style:oe,children:[jsx("div",{className:"pr-7 text-[14px] font-medium text-ink",children:V.q}),jsxs(ip,{className:"mt-2.5 flex flex-col gap-1",highlightClassName:"inset-x-0 rounded-control bg-hover",children:[V.options.map((ae,pe)=>{let Ce=F.includes(pe);return jsxs("button",{type:"button","data-menu-row":true,"aria-pressed":Ce,tabIndex:O?0:-1,disabled:s==="submitting",onClick:()=>{O&&ce(pe);},className:"relative z-10 flex items-center gap-1.5 rounded-control pl-1 pr-2 py-1 text-left transition-colors duration-100",children:[jsx("span",{className:`flex size-4 shrink-0 items-center justify-center transition-colors duration-200
|
|
223
223
|
${V.type==="radio"?"rounded-full":"rounded-[5px]"}
|
|
224
224
|
${Ce?"bg-ink text-canvas":"shadow-[inset_0_0_0_1.5px_var(--bui-line-strong)] text-transparent"}`,children:V.type==="radio"?jsx("span",{className:"size-1.5 rounded-full bg-canvas transition-transform duration-200",style:{transform:Ce?"scale(1)":"scale(0)"}}):jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M20 6L9 17l-5-5"})})}),jsx("span",{className:`text-[13px] leading-none transition-colors duration-200 ${Ce?"text-ink":"text-ink-2"}`,children:ae})]},ae)}),V.allowCustom!==false&&jsx("label",{"data-menu-row":true,className:"relative z-10 flex items-center gap-1.5 rounded-control pl-1 pr-2 py-1 transition-colors duration-100",children:jsx("input",{type:V.customInputType??"text",disabled:s==="submitting",value:b[J]??"",tabIndex:O?0:-1,onChange:ae=>{O&&(x(pe=>({...pe,[J]:ae.target.value})),V.type==="radio"&&g(pe=>({...pe,[J]:[]})));},onKeyDown:ae=>{ae.key==="Enter"&&!ae.nativeEvent.isComposing&&ae.keyCode!==229&&_&&(ae.preventDefault(),Q());},placeholder:c.customPlaceholder,"aria-label":d("Custom answer"),className:"min-w-0 flex-1 bg-transparent pl-1.5 text-[13px] text-ink outline-none placeholder:text-ink-3"})})]})]},J)})})})}),jsxs("div",{className:"primitive-card-footer flex items-center justify-between gap-3",children:[jsxs("div",{className:"flex items-center gap-1 text-ink-3",children:[jsx("button",{type:"button","aria-label":d("Previous question"),disabled:u<=0,onClick:()=>M(u-1),className:"flex size-[18px] items-center justify-center rounded-[var(--bui-radius-scale-5)] transition-colors duration-100 enabled:hover:text-ink disabled:opacity-30",children:jsx(Os,{size:14,path:jsx("path",{d:"M18 15l-6-6-6 6"})})}),jsx("span",{className:"inline-flex items-center text-[12px] font-medium tabular-nums text-ink-3",style:{letterSpacing:"-0.1px",lineHeight:1},children:jsx(Xk,{value:`${u+1} / ${e.length}`})}),jsx("button",{type:"button","aria-label":d("Next question"),disabled:K,onClick:()=>M(u+1),className:"flex size-[18px] items-center justify-center rounded-[var(--bui-radius-scale-5)] transition-colors duration-100 enabled:hover:text-ink disabled:opacity-30",children:jsx(Os,{size:14,path:jsx("path",{d:"M6 9l6 6 6-6"})})})]}),jsxs("div",{className:"-mr-0.5 flex items-center gap-1.5",children:[i&&jsx(Te,{variant:"ghost",size:"sm",disabled:s==="submitting",onClick:()=>K?w(false):M(u+1),children:c.skip}),jsx(Te,{variant:"accent",size:"sm",disabled:!_||s==="submitting",onClick:Q,children:K?c.send:c.continue})]})]})]})})}):jsx(re,{children:jsx("button",{type:"button",onClick:()=>w(true),className:"rounded-control bg-surface px-3 py-2 text-[12.5px] font-medium text-ink shadow-btn transition-colors duration-150 hover:bg-hover",children:d("Open approval")})}):null}a(Ws,"BUIApprovalCard");function Jk({tone:e}){return jsx("span",{className:`flex size-3.5 shrink-0 items-center justify-center rounded-full text-white ${e}`,children:jsxs("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[jsx("circle",{cx:"12",cy:"12",r:"9"}),jsx("path",{d:"M3.5 12h17M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"})]})})}a(Jk,"Dot");var ew=["bg-accent","bg-orange","bg-green"];function lp({variant:e="Steps",onSettled:t,rows:o,active:n,done:r,icon:i,status:s="running",query:l}){let d=Ue(),c=s==="running"?2:4,[u,m]=useState(null),[p,g]=useState(null),b={rows:[],active:d("Thinking"),done:d("Thought complete"),query:l},x={...b,rows:o??b.rows,active:n??b.active,done:r??b.done},f=c>=1&&c<4,y=x.rows.length>0||!!x.query,k=y?"button":"div",S=y&&(u??f),w=c<3,C=c<2?0:x.rows.length,T=useRef(null),[$,P]=useState(0);useLayoutEffect(()=>{T.current&&P(T.current.offsetHeight);},[C,S,e,c]);let E=useRef(false);return useEffect(()=>{if(w){E.current=false;return}E.current||(E.current=true,t?.());},[w,t]),jsx(re,{children:jsxs("div",{"data-bui-thinking":true,className:"flex w-full max-w-95 flex-col",style:{minHeight:w||S?"var(--bui-activity-min-height, 176px)":void 0,transition:"min-height 400ms cubic-bezier(0.23,1,0.32,1)"},children:[jsxs(k,{type:y?"button":void 0,"aria-expanded":y?S:void 0,onClick:y?()=>m(R=>!(R??f)):void 0,className:`-mx-1.5 flex w-fit items-center gap-2 rounded-control px-1.5 py-1
|
|
225
|
-
transition-colors duration-100 hover:bg-hover-2`,children:[i?jsx("span",{className:"flex shrink-0 transition-colors duration-200",style:{color:w?"var(--bui-ink-2)":"var(--bui-ink-3)"},children:i}):jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:w?"var(--bui-ink-2)":"var(--bui-ink-3)",children:jsx("path",{d:"M12 2l2.4 7.2L22 12l-7.6 2.8L12 22l-2.4-7.2L2 12l7.6-2.8z"})}),jsx("span",{role:"status",className:"contents",children:w?jsx("span",{className:"bg-clip-text text-[13px] font-medium whitespace-nowrap text-transparent",style:{backgroundImage:"linear-gradient(90deg, var(--bui-ink-3) 35%, var(--bui-ink) 50%, var(--bui-ink-3) 65%)",backgroundSize:"200% 100%",animation:"bui-shimmer-text 1.4s linear infinite"},children:x.active}):jsx("span",{className:"text-[13px] font-medium whitespace-nowrap text-ink-2",style:{animation:"bui-fade-in 350ms ease-out both"},children:x.done})}),y&&jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform duration-300",style:{transform:S?"rotate(180deg)":"rotate(0)"},children:jsx("path",{d:"M6 9l6 6 6-6"})})]}),jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-400",style:{gridTemplateRows:S?"1fr":"0fr",opacity:S?1:0,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:jsx("div",{className:"overflow-hidden",children:jsxs("div",{className:"relative mt-1 ml-[5px] pl-4",children:[jsx("span",{"aria-hidden":true,className:"absolute left-[3px] w-px bg-line",style:{top:-8,height:$?$-2:0,transition:"height 500ms cubic-bezier(0.23,1,0.32,1)"}}),jsxs("div",{ref:T,className:"flex flex-col gap-1 py-1",children:[x.query&&jsxs("div",{className:"flex h-6 items-center gap-2 px-1.5",style:{animation:S?"bui-fade-up 300ms cubic-bezier(0.23,1,0.32,1) both":void 0},children:[jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2",strokeLinecap:"round",className:"shrink-0",children:[jsx("circle",{cx:"11",cy:"11",r:"7"}),jsx("path",{d:"M21 21l-4.3-4.3"})]}),jsx("span",{className:"text-[12.5px] text-ink-2",children:x.query})]}),x.rows.slice(0,C).map((R,W)=>{let B=jsxs(Fragment,{children:[e==="Search"&&jsx(Jk,{tone:ew[W%3]}),e==="Steps"&&(W<C-1||!w?jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0",children:jsx("path",{d:"M20 6L9 17l-5-5"})}):jsx("span",{className:"size-3 shrink-0 rounded-full border-[1.5px] border-line-strong border-t-ink-2",style:{animation:"bui-spin 700ms linear infinite"}})),jsx("span",{className:`min-w-0 text-[12.5px] ${e==="Reasoning"?"whitespace-pre-wrap [overflow-wrap:anywhere] leading-relaxed text-ink-2":"font-medium text-ink"} ${e==="Search"?"animated-underline":""}`,children:R.primary}),R.secondary&&jsx("span",{className:`shrink-0 text-[11.5px] text-ink-3 ${R.mono?"font-mono":""}`,children:R.secondary}),R.add!==void 0&&jsxs("span",{className:"shrink-0 font-mono text-[11px] tabular-nums",children:[jsxs("span",{className:"text-green",children:["+",R.add]})," ",jsxs("span",{className:"text-red",children:["\u2212",R.del]})]})]}),A="flex min-h-7 w-full items-center gap-2 rounded-[6px] px-1.5 py-0.5 text-left",L={animation:`bui-fade-up 320ms cubic-bezier(0.23,1,0.32,1) ${W*120}ms both`};if(e==="Search")return jsx("a",{href:Ro(R.href,"link"),target:"_blank",rel:"noreferrer",className:`${A} transition-colors duration-150 hover:bg-hover`,style:L,children:B},R.primary);if(e==="Coding"){let I=p===R.primary;return jsx("button",{type:"button","aria-pressed":I,onClick:()=>g(I?null:R.primary),className:`${A} transition-colors duration-150 ${I?"bg-inset":"hover:bg-hover"}`,style:L,children:B},R.primary)}return jsx("div",{className:A,style:L,children:B},R.primary)}),e==="Search"&&c>=3&&jsx("span",{className:"text-[12px] text-ink-3",style:{animation:"bui-fade-in 300ms ease-out both"},children:d("More")})]})]})})})]},e)})}a(lp,"BUIThinkingState");function dp({groups:e,onSelect:t,trigger:o,anchorRef:n,uploadContent:r,triggerLabel:i="\u6DFB\u52A0\u5185\u5BB9",emptyLabel:s="\u6682\u65E0\u53EF\u7528\u64CD\u4F5C",disabled:l=false,open:d,defaultOpen:c=false,onOpenChange:u,styles:m,classNames:p}){let[g,b]=useState(c),x=io(),f=Fn(),y=Number(f.values["component.ui.quickPromptMenu.sideOffset"]),k=Number(f.values["component.ui.quickPromptMenu.collisionPadding"]),S=Number(f.values["component.ui.quickPromptMenu.maxHeightRatio"]);if(!Number.isFinite(y)||y<0||!Number.isFinite(k)||k<0||!Number.isFinite(S)||S<=0||S>1)throw new TypeError("QuickPromptMenu positioning tokens require non-negative CSS pixel numbers and a maxHeightRatio in (0, 1].");let w={"--bui-quick-prompt-width":f.cssValues["component.ui.quickPromptMenu.width"],"--bui-quick-prompt-height-ratio":S,"--bui-quick-prompt-border-width":f.cssValues["component.ui.size.s1"],"--bui-quick-prompt-radius":f.cssValues["semantic.ui.radius.container"],"--bui-quick-prompt-focus-width":f.cssValues["component.ui.size.s2"],"--bui-quick-prompt-focus-color":f.cssValues["component.ui.focus"],"--bui-quick-prompt-layer":f.cssValues["component.ui.layer.overlayBase"],...m?.content},C=l||!!o?.props.disabled,T=!C&&(d??g),$=a(R=>{R&&C||(b(R),u?.(R));},"setOpen"),P=e.filter(R=>R.options.length>0),E=r!=null&&r!==false;return jsx(re,{children:jsxs(Zo.Root,{modal:false,open:T,onOpenChange:$,children:[jsx(Zo.Trigger,{asChild:true,children:o?cloneElement(o,{type:o.props.type??"button",disabled:C,"aria-label":o.props["aria-label"]??i}):jsx(To,{shape:"icon",size:"sm",disabled:C,"aria-label":i,children:jsx(Plus,{size:f.cssValues["component.ui.icon.size.s16"],"aria-hidden":"true"})})}),n&&jsx(Zo.Anchor,{virtualRef:n}),T&&jsx(xr,{children:jsx(re,{portal:true,children:jsxs(Zo.Content,{dir:x,side:"top",align:"start",sideOffset:y,collisionPadding:k,"aria-label":i,"data-anchor":n?"container":"trigger",className:["bui-quick-prompt-menu",p?.content].filter(Boolean).join(" "),style:w,children:[E&&jsx("div",{className:["bui-quick-prompt-upload",p?.upload].filter(Boolean).join(" "),style:m?.upload,children:r}),P.length>0?jsx("div",{className:["bui-quick-prompt-groups",p?.groups].filter(Boolean).join(" "),style:m?.groups,children:P.map((R,W)=>jsxs("section",{"aria-label":R.label,children:[jsx("h2",{className:"bui-quick-prompt-heading",children:R.label}),R.options.map(B=>jsx(To,{variant:"ghost",size:"sm",icon:jsx(Box,{size:f.cssValues["component.ui.icon.size.s16"],"aria-hidden":"true"}),className:"bui-quick-prompt-option",onClick:()=>{$(false),t(B);},children:jsxs("span",{className:"bui-quick-prompt-copy",children:[jsx("span",{children:B.label}),B.description&&jsx("span",{className:"bui-quick-prompt-description",children:B.description})]})},B.key))]},`${R.label}-${W}`))}):E?null:jsx("p",{className:"bui-quick-prompt-empty",children:s})]})})})]})})}a(dp,"BUIQuickPromptMenu");var uw=lazy(()=>import('@inf-monkeys-tech/monkeys-design/components/markdown-editor').then(e=>({default:e.MarkdownEditor})));function pp({model:e}){let t=$t().markdownDocument,o=Bo(),[n,r]=useState(()=>o?.colorMode==="light"?"light":"dark");useEffect(()=>{(o?.colorMode==="light"||o?.colorMode==="dark")&&r(o.colorMode);},[o?.colorMode]);let i=Cu(qo(Da,o?.contract),n),s=useRef(e.saveStatus);useEffect(()=>{let R=s.current;e.saveStatus!==R&&(e.saveStatus==="saved"&&["saving","dirty"].includes(R)&&Cr.success(t.saved),["error","offline","conflict"].includes(e.saveStatus)&&Cr.error(e.saveStatus==="conflict"?t.conflict:t.error)),s.current=e.saveStatus;},[t.conflict,t.error,t.saved,e.saveStatus]);let[l,d]=useState("visual"),[c,u]=useState(false),[m,p]=useState(false),[g,b]=useState(),[x,f]=useState(),[y,k]=useState(false),S=zo(e.resources),[w,C]=useState(false),T=a(R=>{C(false),R().catch(()=>C(true));},"invoke");if(e.status==="loading")return jsx("div",{role:"status",className:"markdown-document-state",children:t.loading});if(e.status==="unavailable")return jsx("div",{className:"markdown-document-state",children:t.unavailable});if(e.status==="error")return jsxs("div",{role:"alert",className:"markdown-document-state",children:[t.unavailable,jsx(ie,{onClick:e.onRetry,children:t.retry})]});let $=!["saved"].includes(e.saveStatus),P=n==="dark"?Sun:Moon,E={...i,"--background":i["--monkeys-ui-page"]??i["--monkeys-ui-background"],"--foreground":i["--monkeys-ui-foreground"],"--border":i["--monkeys-ui-border"],"--muted":i["--monkeys-ui-page"],"--primary":i["--monkeys-ui-button-primary-background"]};return jsxs("section",{className:"markdown-document monkeys-ui-markdown-document","data-editing":e.editing?"true":"false","data-color-mode":n,"aria-label":e.name,style:{...E,backgroundColor:i["--monkeys-ui-page"],color:i["--monkeys-ui-foreground"],colorScheme:n},onKeyDown:R=>{(R.metaKey||R.ctrlKey)&&R.key.toLowerCase()==="s"&&(R.preventDefault(),T(e.onSave));},children:[jsxs("header",{className:"markdown-document-header",children:[jsx(ie,{size:"sm",variant:"ghost",className:"markdown-document-theme-toggle","aria-label":n==="dark"?t.switchToLight:t.switchToDark,title:n==="dark"?t.switchToLight:t.switchToDark,onClick:()=>r(R=>R==="dark"?"light":"dark"),children:jsx(P,{"aria-hidden":"true"})}),jsxs("div",{className:"markdown-document-header-actions",children:[e.editing?jsxs(Fragment,{children:[jsx(ie,{size:"sm",variant:l==="visual"?"secondary":"ghost","aria-pressed":l==="visual",onClick:()=>d("visual"),children:t.visual}),jsx(ie,{size:"sm",variant:l==="source"?"secondary":"ghost","aria-pressed":l==="source",onClick:()=>d("source"),children:t.source}),jsx(ie,{size:"sm",onClick:()=>T(e.onSave),disabled:e.saveStatus==="saving"||!$||e.saveStatus==="conflict",children:t.save}),jsx(ie,{size:"sm",variant:"ghost",onClick:()=>{$?T(async()=>{await e.onSave(),e.onExit();}):e.onExit();},children:t.exit})]}):jsx(ie,{size:"sm",variant:"outline",disabled:!e.canEdit||e.tooLarge,onClick:e.onEdit,children:t.edit}),jsx(ie,{size:"sm",variant:"ghost",onClick:()=>T(e.onDownload),children:t.download}),jsx(ie,{size:"sm",variant:"ghost",onClick:()=>{u(true),T(()=>e.onHistory());},children:t.history})]})]}),e.tooLarge?jsx("p",{role:"status",children:t.tooLarge}):null,w?jsx("p",{role:"alert",children:t.error}):null,e.recoveryAvailable?jsxs("div",{role:"status",children:[t.recovery,jsx(ie,{size:"sm",onClick:e.onRecover,children:t.recover})]}):null,e.saveStatus==="conflict"?jsxs("div",{role:"alert",children:[t.conflict,jsx(ie,{onClick:()=>{p(true),T(e.onLoadLatest);},children:t.latest})]}):null,jsx("div",{className:"markdown-document-content",children:e.editing?jsx(Suspense,{fallback:jsx("p",{role:"status",children:t.loading}),children:jsx(uw,{value:e.text,mode:l,onChange:e.onChange,onCompositionChange:e.onCompositionChange,uploadImage:e.uploadImage,resourceAccess:e.resources})}):jsx(un,{text:e.text,resources:S})}),jsx(Ti,{open:m,onOpenChange:p,children:jsxs(Rn,{className:"markdown-document-dialog",children:[jsx(Jr,{children:t.conflict}),jsxs("div",{className:"markdown-document-comparison",children:[jsxs("div",{children:[jsx("h3",{children:t.dirty}),jsx("pre",{children:e.text})]}),jsxs("div",{children:[jsx("h3",{children:t.latest}),jsx("pre",{children:e.latestText??t.loading})]})]}),jsx(ie,{disabled:e.latestText===void 0,onClick:()=>{e.onUseLatest(),p(false);},children:t.useLatest}),jsx(ie,{disabled:e.latestText===void 0,variant:"outline",onClick:()=>{e.onMergeDraft(),p(false),d("source");},children:t.keepDraft})]})}),jsx(Ti,{open:c,onOpenChange:u,children:jsxs(Rn,{className:"markdown-document-dialog",children:[jsx(Jr,{children:t.history}),jsxs("div",{className:"markdown-document-history",children:[e.history?.items.map(R=>jsxs(ie,{variant:"ghost",onClick:()=>{b(R),f(void 0),e.onVersion(R).then(f).catch(()=>C(true));},children:[new Date(R.createdAt).toLocaleString()," \xB7 ",R.actorId]},R.commitId)),e.history?.items.length?null:jsx("p",{children:e.history?.loading?t.loading:t.emptyHistory}),e.history?.hasMore?jsx(ie,{disabled:e.history.loading,onClick:()=>T(()=>e.onHistory(true)),children:t.history}):null]}),g?jsxs(Fragment,{children:[jsx(un,{text:x??"",resources:S}),jsx(ie,{disabled:y||x===void 0||$,onClick:()=>{k(true),e.onRestore(g.commitId).then(()=>{u(false),b(void 0);}).catch(()=>C(true)).finally(()=>k(false));},children:t.restore})]}):null]})})]})}a(pp,"MarkdownDocumentWorkspace");var _s=createContext(void 0);function mE({document:e,history:t,receipt:o,...n}){let r=useContext(_s);if(!r)throw new Error("Markdown documents require a declared artifact workspace slot.");return jsx(pp,{model:r.useData(n,e,t)})}a(mE,"AgentConversationMarkdownDocument");var hp=createContext({});function kw({children:e,preview:t,overlays:o}){let n=useAgentConversationData();return jsxs(Fragment,{children:[jsx(_i,{...n.layout,preview:n.previewOpen?jsx(is,{hostRef:n.previewHost,children:t}):void 0,children:e}),o]})}a(kw,"AgentConversationLayout");function ww({header:e,prompt:t,questions:o,progress:n,notice:r,interactions:i,pending:s,artifacts:l,collapseProcessOnComplete:d=true,fontScale:c,fontScaleLabels:u,onFontScaleChange:m}){let p=useAgentConversationData();return jsx(hp.Provider,{value:{fontScale:c,fontScaleLabels:u,onFontScaleChange:m},children:jsx("div",{className:"contents agent-conversation-font-scale","data-font-scale":c,children:jsx(ep,{...p.chat,fill:true,readable:true,showMessageLabels:false,headerActions:e,composerContent:t,composerAccessory:p.questions?o:void 0,composerProgress:p.taskProgress?n:void 0,composerNotice:p.reviewNotice?r:void 0,pendingContent:p.pendingLabel?s:null,sidePanel:p.artifactsOpen?l:void 0,renderMessage:(g,b)=>jsx(Cw,{row:p.rows[b],collapseProcessOnComplete:d},g.id??b),children:p.interactions.blocking||p.interactions.approvals?.length||p.interactions.form||p.interactions.unsupported?i:null})})})}a(ww,"AgentConversationTranscript");function Cw({row:e,collapseProcessOnComplete:t=true}){return e.kind==="process"?jsx(Tw,{row:e,collapseOnComplete:t}):e.kind==="question"?jsx(xp,{data:e.data}):jsx(vp,{data:e.data})}a(Cw,"AgentConversationRow");function vp({data:e}){return jsx(Uu,{model:e.useData()})}a(vp,"MessageBinding");function xp({data:e}){return jsx(Ra,{...e.useData()})}a(xp,"QuestionBinding");function Tw({row:e,collapseOnComplete:t}){let o=["completed","failed","stopped"].includes(e.process.status),[n,r]=useState(!o),i=useRef(o);return useEffect(()=>{o&&!i.current&&t&&r(false),i.current=o;},[o,t]),jsx(Zc,{...e.process,density:"compact",showStatusIcon:false,open:n,onOpenChange:r,children:e.items.map(s=>jsx(vp,{data:s},s.key))})}a(Tw,"ProcessRow");function Sw(){let{header:e}=useAgentConversationData(),t=useContext(hp),o=t.fontScaleLabels;return jsxs("span",{className:"flex items-center",children:[t.fontScale&&o?jsx(Eu,{"aria-label":o.ariaLabel,value:t.fontScale,onValueChange:n=>t.onFontScaleChange?.(n),items:[{value:"lg",label:o.large},{value:"md",label:o.medium},{value:"sm",label:o.small}],className:"agent-conversation-font-scale-control"}):null,jsx(Te,{size:"xs",variant:"quiet","aria-label":e.canvasLabel,title:e.canvasLabel,"aria-pressed":e.canvasVisible,disabled:e.canvasDisabled,onClick:e.onCanvas,children:jsx(Shapes,{className:"agent-workbench-artifact-icon","aria-hidden":"true"})}),jsx(Te,{size:"xs",variant:"quiet","aria-label":e.artifactsLabel,title:e.artifactsLabel,"aria-expanded":e.artifactsOpen,"aria-controls":e.artifactsId,onClick:e.onArtifacts,children:jsx(Files,{className:"agent-workbench-artifact-icon","aria-hidden":"true"})}),jsx(Te,{size:"xs",variant:"quiet","aria-label":e.previewLabel,title:e.previewLabel,"aria-pressed":e.previewOpen,disabled:e.previewDisabled,onClick:e.onPreview,children:e.previewOpen?jsx(PanelRightClose,{className:"agent-workbench-artifact-icon","aria-hidden":"true"}):jsx(PanelRightOpen,{className:"agent-workbench-artifact-icon","aria-hidden":"true"})})]})}a(Sw,"AgentConversationHeader");var kp=createContext(null);function $w({controls:e,menu:t}){let{fileInputRef:o,onFiles:n,prompt:r,chat:i}=useAgentConversationData();return jsxs(Fragment,{children:[jsx(bo,{unstyled:true,ref:o,type:"file",multiple:true,hidden:true,tabIndex:-1,onChange:s=>{n(Array.from(s.target.files??[])),s.target.value="";}}),jsx(Ka,{...r,controls:e,renderAttachButton:t?(s,l)=>jsx(kp.Provider,{value:{trigger:s,anchorRef:l},children:t}):void 0,minRows:i.composerContainer?1:2,showDictation:true})]})}a($w,"AgentConversationPrompt");function _E({triggerLabel:e,uploadLabel:t,emptyLabel:o,loadingLabel:n,errorLabel:r}){let i=useAgentConversationData();return i.promptMenu?jsx(Pw,{binding:i.promptMenu,labels:{triggerLabel:e,uploadLabel:t,emptyLabel:o,loadingLabel:n,errorLabel:r}}):null}a(_E,"AgentConversationPromptMenu");function Pw({binding:e,labels:t}){let o=useAgentConversationData(),n=useContext(kp),r=e.useData(),[i,s]=useState(false);if(!n)throw new Error("The prompt menu requires an AgentConversationPrompt menu slot.");let l=r.status==="loading"?t.loadingLabel:r.status==="error"?t.errorLabel:r.groups.some(d=>d.options.length)?void 0:t.emptyLabel;return jsx(dp,{...n,trigger:cloneElement(n.trigger,{"aria-label":t.triggerLabel}),triggerLabel:t.triggerLabel,groups:r.groups,disabled:o.prompt.disabled,open:i,onOpenChange:d=>{s(d),d&&r.status==="error"&&r.onRetry?.();},uploadContent:jsxs(Fragment,{children:[jsx(To,{size:"sm",variant:"soft",style:{width:"100%",justifyContent:"start"},icon:jsx(Paperclip,{size:"var(--monkeys-ui-icon-size-s16,var(--monkeys-ui-default-icon-size-s16))","aria-hidden":"true"}),onClick:()=>{s(false),o.prompt.onAttach?.();},children:t.uploadLabel}),l?jsx("p",{role:"status",children:l}):null]}),onSelect:d=>r.onSelect(d.key)})}a(Pw,"PromptMenuBinding");function Rw(){let{questions:e}=useAgentConversationData();return e?jsxs("div",{"data-agent-question-dock":true,children:[e.blocking&&createElement(Ra,{...e.blocking,key:e.blocking.key}),e.asynchronous?.map(t=>jsx(xp,{data:t},t.key))]}):null}a(Rw,"AgentConversationQuestions");function Mw(){let{taskProgress:e}=useAgentConversationData();return e?jsx(Qa,{...e,variant:"Progress"}):null}a(Mw,"AgentConversationProgress");function Aw(){let{pendingLabel:e,pendingElapsedMs:t,pendingStartedAtMs:o}=useAgentConversationData();return e?jsx(gn,{variant:"Dots",label:e,elapsedMs:t,startedAtMs:o}):null}a(Aw,"AgentConversationPending");function Bw(){let{reviewNotice:e}=useAgentConversationData();return e?jsx(Te,{size:"xs",variant:"quiet",disabled:e.disabled,onClick:e.onClick,children:e.label}):null}a(Bw,"AgentConversationNotice");function Nw(){let{interactions:e}=useAgentConversationData();return jsxs(Fragment,{children:[e.blocking&&createElement(Ra,{...e.blocking,key:e.blocking.key}),e.approvals?.map(({id:t,...o})=>jsx(Ws,{...o},t)),e.form&&jsxs(Fragment,{children:[e.form.authorization&&jsx(Te,{onClick:e.form.authorization.onClick,children:e.form.authorization.label}),jsx(Ws,{...e.form},e.form.id)]}),e.unsupported&&jsxs("div",{role:"status",children:[jsx(lp,{status:"running",active:e.unsupported.label,rows:[]}),jsx(Te,{disabled:e.unsupported.disabled,onClick:e.unsupported.onStop,children:e.unsupported.stopLabel})]})]})}a(Nw,"AgentConversationInteractions");function Ew({panel:e,files:t,error:o}){return jsx(ni,{...e,footer:o?jsx(tu,{message:o}):void 0,children:jsx(ri,{...t})})}a(Ew,"AgentConversationArtifactList");function Iw({data:e}){return jsx(Ew,{...e.useData()})}a(Iw,"ArtifactBinding");function Dw(){let e=useAgentConversationData();return jsx(Iw,{data:e.artifacts})}a(Dw,"AgentConversationArtifacts");function Lw({data:e,canvas:t,markdown:o,onMarkdownSourceSelected:n}){let r=e.useData(),i=a(c=>{let u=r.workspace.artifacts.find(p=>p.id===c),m=u&&r.contents.find(p=>p.id===u.id);return u?.kind==="markdown"&&m?.kind==="artifact"?m.document?.source??null:null},"sourceFor"),s=i(r.workspace.activeArtifactId),l=JSON.stringify(s),d=useRef(n);return d.current=n,useEffect(()=>{d.current&&Promise.resolve(d.current(s)).catch(()=>{});},[l]),jsx(Ic,{conversation:r.conversation,workspace:{...r.workspace,density:"compact",tabBar:"flush",onIntent:a(c=>{c.type==="select"&&n&&Promise.resolve(n(i(c.artifactId))).catch(()=>{}),r.workspace.onIntent?.(c);},"onIntent"),renderArtifact:a(c=>{if(c.id==="agent-session-canvas")return jsx(is,{children:t});let u=r.contents.find(m=>m.id===c.id);return u?u.kind==="artifact"&&u.document&&o?jsx(_s.Provider,{value:u.document,children:o},u.id):u.kind==="data"?jsx(zw,{data:u.data},u.id):jsx(Ow,{data:u.data},u.id):null},"renderArtifact")}})}a(Lw,"WorkspaceBinding");function zw({data:e}){return jsx(Iu,{...e.useData()})}a(zw,"LinkedBinding");function Ow({data:e}){return jsx(ur,{...e.useData()})}a(Ow,"PreviewBinding");function Hw({canvas:e,markdown:t,onMarkdownSourceSelected:o}){let n=useAgentConversationData();return jsx(Lw,{data:n.workspace,canvas:n.canvasOpen?e:void 0,markdown:t,onMarkdownSourceSelected:o})}a(Hw,"AgentConversationWorkspace");function Ww({data:e}){return jsx(Lu,{...e.useData()})}a(Ww,"CanvasBinding");function Fw(){let{canvas:e}=useAgentConversationData();return e?jsx(Ww,{data:e},e.key):null}a(Fw,"AgentConversationCanvas");function _w({data:e}){return jsx(Ms,{...e.useData()})}a(_w,"CollectionBinding");function Uw(){let{collection:e}=useAgentConversationData();return e?jsx(_w,{data:e}):null}a(Uw,"AgentConversationCollection");function UE({canvas:e}){return jsx(kw,{preview:jsx(Hw,{canvas:e??jsx(Fw,{})}),overlays:jsx(Uw,{}),children:jsx(ww,{header:jsx(Sw,{}),prompt:jsx($w,{}),questions:jsx(Rw,{}),progress:jsx(Mw,{}),notice:jsx(Bw,{}),interactions:jsx(Nw,{}),pending:jsx(Aw,{}),artifacts:jsx(Dw,{})})})}a(UE,"AgentConversationDefaultView");
|
|
225
|
+
transition-colors duration-100 hover:bg-hover-2`,children:[i?jsx("span",{className:"flex shrink-0 transition-colors duration-200",style:{color:w?"var(--bui-ink-2)":"var(--bui-ink-3)"},children:i}):jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:w?"var(--bui-ink-2)":"var(--bui-ink-3)",children:jsx("path",{d:"M12 2l2.4 7.2L22 12l-7.6 2.8L12 22l-2.4-7.2L2 12l7.6-2.8z"})}),jsx("span",{role:"status",className:"contents",children:w?jsx("span",{className:"bg-clip-text text-[13px] font-medium whitespace-nowrap text-transparent",style:{backgroundImage:"linear-gradient(90deg, var(--bui-ink-3) 35%, var(--bui-ink) 50%, var(--bui-ink-3) 65%)",backgroundSize:"200% 100%",animation:"bui-shimmer-text 1.4s linear infinite"},children:x.active}):jsx("span",{className:"text-[13px] font-medium whitespace-nowrap text-ink-2",style:{animation:"bui-fade-in 350ms ease-out both"},children:x.done})}),y&&jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform duration-300",style:{transform:S?"rotate(180deg)":"rotate(0)"},children:jsx("path",{d:"M6 9l6 6 6-6"})})]}),jsx("div",{className:"grid transition-[grid-template-rows,opacity] duration-400",style:{gridTemplateRows:S?"1fr":"0fr",opacity:S?1:0,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"},children:jsx("div",{className:"overflow-hidden",children:jsxs("div",{className:"relative mt-1 ml-[5px] pl-4",children:[jsx("span",{"aria-hidden":true,className:"absolute left-[3px] w-px bg-line",style:{top:-8,height:$?$-2:0,transition:"height 500ms cubic-bezier(0.23,1,0.32,1)"}}),jsxs("div",{ref:T,className:"flex flex-col gap-1 py-1",children:[x.query&&jsxs("div",{className:"flex h-6 items-center gap-2 px-1.5",style:{animation:S?"bui-fade-up 300ms cubic-bezier(0.23,1,0.32,1) both":void 0},children:[jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2",strokeLinecap:"round",className:"shrink-0",children:[jsx("circle",{cx:"11",cy:"11",r:"7"}),jsx("path",{d:"M21 21l-4.3-4.3"})]}),jsx("span",{className:"text-[12.5px] text-ink-2",children:x.query})]}),x.rows.slice(0,C).map((R,W)=>{let B=jsxs(Fragment,{children:[e==="Search"&&jsx(Jk,{tone:ew[W%3]}),e==="Steps"&&(W<C-1||!w?jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--bui-ink-3)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0",children:jsx("path",{d:"M20 6L9 17l-5-5"})}):jsx("span",{className:"size-3 shrink-0 rounded-full border-[1.5px] border-line-strong border-t-ink-2",style:{animation:"bui-spin 700ms linear infinite"}})),jsx("span",{className:`min-w-0 text-[12.5px] ${e==="Reasoning"?"whitespace-pre-wrap [overflow-wrap:anywhere] leading-relaxed text-ink-2":"font-medium text-ink"} ${e==="Search"?"animated-underline":""}`,children:R.primary}),R.secondary&&jsx("span",{className:`shrink-0 text-[11.5px] text-ink-3 ${R.mono?"font-mono":""}`,children:R.secondary}),R.add!==void 0&&jsxs("span",{className:"shrink-0 font-mono text-[11px] tabular-nums",children:[jsxs("span",{className:"text-green",children:["+",R.add]})," ",jsxs("span",{className:"text-red",children:["\u2212",R.del]})]})]}),A="flex min-h-7 w-full items-center gap-2 rounded-[6px] px-1.5 py-0.5 text-left",L={animation:`bui-fade-up 320ms cubic-bezier(0.23,1,0.32,1) ${W*120}ms both`};if(e==="Search")return jsx("a",{href:Ro(R.href,"link"),target:"_blank",rel:"noreferrer",className:`${A} transition-colors duration-150 hover:bg-hover`,style:L,children:B},R.primary);if(e==="Coding"){let I=p===R.primary;return jsx("button",{type:"button","aria-pressed":I,onClick:()=>g(I?null:R.primary),className:`${A} transition-colors duration-150 ${I?"bg-inset":"hover:bg-hover"}`,style:L,children:B},R.primary)}return jsx("div",{className:A,style:L,children:B},R.primary)}),e==="Search"&&c>=3&&jsx("span",{className:"text-[12px] text-ink-3",style:{animation:"bui-fade-in 300ms ease-out both"},children:d("More")})]})]})})})]},e)})}a(lp,"BUIThinkingState");function dp({groups:e,onSelect:t,trigger:o,anchorRef:n,uploadContent:r,triggerLabel:i="\u6DFB\u52A0\u5185\u5BB9",emptyLabel:s="\u6682\u65E0\u53EF\u7528\u64CD\u4F5C",disabled:l=false,open:d,defaultOpen:c=false,onOpenChange:u,styles:m,classNames:p}){let[g,b]=useState(c),x=io(),f=Fn(),y=Number(f.values["component.ui.quickPromptMenu.sideOffset"]),k=Number(f.values["component.ui.quickPromptMenu.collisionPadding"]),S=Number(f.values["component.ui.quickPromptMenu.maxHeightRatio"]);if(!Number.isFinite(y)||y<0||!Number.isFinite(k)||k<0||!Number.isFinite(S)||S<=0||S>1)throw new TypeError("QuickPromptMenu positioning tokens require non-negative CSS pixel numbers and a maxHeightRatio in (0, 1].");let w={"--bui-quick-prompt-width":f.cssValues["component.ui.quickPromptMenu.width"],"--bui-quick-prompt-height-ratio":S,"--bui-quick-prompt-border-width":f.cssValues["component.ui.size.s1"],"--bui-quick-prompt-radius":f.cssValues["semantic.ui.radius.container"],"--bui-quick-prompt-focus-width":f.cssValues["component.ui.size.s2"],"--bui-quick-prompt-focus-color":f.cssValues["component.ui.focus"],"--bui-quick-prompt-layer":f.cssValues["component.ui.layer.overlayBase"],...m?.content},C=l||!!o?.props.disabled,T=!C&&(d??g),$=a(R=>{R&&C||(b(R),u?.(R));},"setOpen"),P=e.filter(R=>R.options.length>0),E=r!=null&&r!==false;return jsx(re,{children:jsxs(Zo.Root,{modal:false,open:T,onOpenChange:$,children:[jsx(Zo.Trigger,{asChild:true,children:o?cloneElement(o,{type:o.props.type??"button",disabled:C,"aria-label":o.props["aria-label"]??i}):jsx(To,{shape:"icon",size:"sm",disabled:C,"aria-label":i,children:jsx(Plus,{size:f.cssValues["component.ui.icon.size.s16"],"aria-hidden":"true"})})}),n&&jsx(Zo.Anchor,{virtualRef:n}),T&&jsx(xr,{children:jsx(re,{portal:true,children:jsxs(Zo.Content,{dir:x,side:"top",align:"start",sideOffset:y,collisionPadding:k,"aria-label":i,"data-anchor":n?"container":"trigger",className:["bui-quick-prompt-menu",p?.content].filter(Boolean).join(" "),style:w,children:[E&&jsx("div",{className:["bui-quick-prompt-upload",p?.upload].filter(Boolean).join(" "),style:m?.upload,children:r}),P.length>0?jsx("div",{className:["bui-quick-prompt-groups",p?.groups].filter(Boolean).join(" "),style:m?.groups,children:P.map((R,W)=>jsxs("section",{"aria-label":R.label,children:[jsx("h2",{className:"bui-quick-prompt-heading",children:R.label}),R.options.map(B=>jsx(To,{variant:"ghost",size:"sm",icon:jsx(Box,{size:f.cssValues["component.ui.icon.size.s16"],"aria-hidden":"true"}),className:"bui-quick-prompt-option",onClick:()=>{$(false),t(B);},children:jsxs("span",{className:"bui-quick-prompt-copy",children:[jsx("span",{children:B.label}),B.description&&jsx("span",{className:"bui-quick-prompt-description",children:B.description})]})},B.key))]},`${R.label}-${W}`))}):E?null:jsx("p",{className:"bui-quick-prompt-empty",children:s})]})})})]})})}a(dp,"BUIQuickPromptMenu");var uw=lazy(()=>import('@inf-monkeys-tech/monkeys-design/components/markdown-editor').then(e=>({default:e.MarkdownEditor})));function pp({model:e}){let t=$t().markdownDocument,o=Bo(),[n,r]=useState(()=>o?.colorMode==="light"?"light":"dark");useEffect(()=>{(o?.colorMode==="light"||o?.colorMode==="dark")&&r(o.colorMode);},[o?.colorMode]);let i=Cu(qo(Da,o?.contract),n),s=useRef(e.saveStatus);useEffect(()=>{let R=s.current;e.saveStatus!==R&&(e.saveStatus==="saved"&&["saving","dirty"].includes(R)&&Cr.success(t.saved),["error","offline","conflict"].includes(e.saveStatus)&&Cr.error(e.saveStatus==="conflict"?t.conflict:t.error)),s.current=e.saveStatus;},[t.conflict,t.error,t.saved,e.saveStatus]);let[l,d]=useState("visual"),[c,u]=useState(false),[m,p]=useState(false),[g,b]=useState(),[x,f]=useState(),[y,k]=useState(false),S=zo(e.resources),[w,C]=useState(false),T=a(R=>{C(false),R().catch(()=>C(true));},"invoke");if(e.status==="loading")return jsx("div",{role:"status",className:"markdown-document-state",children:t.loading});if(e.status==="unavailable")return jsx("div",{className:"markdown-document-state",children:t.unavailable});if(e.status==="error")return jsxs("div",{role:"alert",className:"markdown-document-state",children:[t.unavailable,jsx(ie,{onClick:e.onRetry,children:t.retry})]});let $=!["saved"].includes(e.saveStatus),P=n==="dark"?Sun:Moon,E={...i,"--background":i["--monkeys-ui-page"]??i["--monkeys-ui-background"],"--foreground":i["--monkeys-ui-foreground"],"--border":i["--monkeys-ui-border"],"--muted":i["--monkeys-ui-page"],"--primary":i["--monkeys-ui-button-primary-background"]};return jsxs("section",{className:"markdown-document monkeys-ui-markdown-document","data-editing":e.editing?"true":"false","data-color-mode":n,"aria-label":e.name,style:{...E,backgroundColor:i["--monkeys-ui-page"],color:i["--monkeys-ui-foreground"],colorScheme:n},onKeyDown:R=>{(R.metaKey||R.ctrlKey)&&R.key.toLowerCase()==="s"&&(R.preventDefault(),T(e.onSave));},children:[jsxs("header",{className:"markdown-document-header",children:[jsx(ie,{size:"sm",variant:"ghost",className:"markdown-document-theme-toggle","aria-label":n==="dark"?t.switchToLight:t.switchToDark,title:n==="dark"?t.switchToLight:t.switchToDark,onClick:()=>r(R=>R==="dark"?"light":"dark"),children:jsx(P,{"aria-hidden":"true"})}),jsxs("div",{className:"markdown-document-header-actions",children:[e.editing?jsxs(Fragment,{children:[jsx(ie,{size:"sm",variant:l==="visual"?"secondary":"ghost","aria-pressed":l==="visual",onClick:()=>d("visual"),children:t.visual}),jsx(ie,{size:"sm",variant:l==="source"?"secondary":"ghost","aria-pressed":l==="source",onClick:()=>d("source"),children:t.source}),jsx(ie,{size:"sm",onClick:()=>T(e.onSave),disabled:e.saveStatus==="saving"||!$||e.saveStatus==="conflict",children:t.save}),jsx(ie,{size:"sm",variant:"ghost",onClick:()=>{$?T(async()=>{await e.onSave(),e.onExit();}):e.onExit();},children:t.exit})]}):jsx(ie,{size:"sm",variant:"outline",disabled:!e.canEdit||e.tooLarge,onClick:e.onEdit,children:t.edit}),jsx(ie,{size:"sm",variant:"ghost",onClick:()=>T(e.onDownload),children:t.download}),jsx(ie,{size:"sm",variant:"ghost",onClick:()=>{u(true),T(()=>e.onHistory());},children:t.history})]})]}),e.tooLarge?jsx("p",{role:"status",children:t.tooLarge}):null,w?jsx("p",{role:"alert",children:t.error}):null,e.recoveryAvailable?jsxs("div",{role:"status",children:[t.recovery,jsx(ie,{size:"sm",onClick:e.onRecover,children:t.recover})]}):null,e.saveStatus==="conflict"?jsxs("div",{role:"alert",children:[t.conflict,jsx(ie,{onClick:()=>{p(true),T(e.onLoadLatest);},children:t.latest})]}):null,jsx("div",{className:"markdown-document-content",children:e.editing?jsx(Suspense,{fallback:jsx("p",{role:"status",children:t.loading}),children:jsx(uw,{value:e.text,mode:l,onChange:e.onChange,onCompositionChange:e.onCompositionChange,uploadImage:e.uploadImage,resourceAccess:e.resources})}):jsx(un,{text:e.text,resources:S})}),jsx(Ti,{open:m,onOpenChange:p,children:jsxs(Rn,{className:"markdown-document-dialog",children:[jsx(Jr,{children:t.conflict}),jsxs("div",{className:"markdown-document-comparison",children:[jsxs("div",{children:[jsx("h3",{children:t.dirty}),jsx("pre",{children:e.text})]}),jsxs("div",{children:[jsx("h3",{children:t.latest}),jsx("pre",{children:e.latestText??t.loading})]})]}),jsx(ie,{disabled:e.latestText===void 0,onClick:()=>{e.onUseLatest(),p(false);},children:t.useLatest}),jsx(ie,{disabled:e.latestText===void 0,variant:"outline",onClick:()=>{e.onMergeDraft(),p(false),d("source");},children:t.keepDraft})]})}),jsx(Ti,{open:c,onOpenChange:u,children:jsxs(Rn,{className:"markdown-document-dialog",children:[jsx(Jr,{children:t.history}),jsxs("div",{className:"markdown-document-history",children:[e.history?.items.map(R=>jsxs(ie,{variant:"ghost",onClick:()=>{b(R),f(void 0),e.onVersion(R).then(f).catch(()=>C(true));},children:[new Date(R.createdAt).toLocaleString()," \xB7 ",R.actorId]},R.commitId)),e.history?.items.length?null:jsx("p",{children:e.history?.loading?t.loading:t.emptyHistory}),e.history?.hasMore?jsx(ie,{disabled:e.history.loading,onClick:()=>T(()=>e.onHistory(true)),children:t.history}):null]}),g?jsxs(Fragment,{children:[jsx(un,{text:x??"",resources:S}),jsx(ie,{disabled:y||x===void 0||$,onClick:()=>{k(true),e.onRestore(g.commitId).then(()=>{u(false),b(void 0);}).catch(()=>C(true)).finally(()=>k(false));},children:t.restore})]}):null]})})]})}a(pp,"MarkdownDocumentWorkspace");var _s=createContext(void 0);function mE({document:e,history:t,receipt:o,...n}){let r=useContext(_s);if(!r)throw new Error("Markdown documents require a declared artifact workspace slot.");return jsx(pp,{model:r.useData(n,e,t)})}a(mE,"AgentConversationMarkdownDocument");var hp=createContext({});function kw({children:e,preview:t,overlays:o}){let n=useAgentConversationData();return jsxs(Fragment,{children:[jsx(_i,{...n.layout,preview:n.previewOpen?jsx(is,{hostRef:n.previewHost,children:t}):void 0,children:e}),o]})}a(kw,"AgentConversationLayout");function ww({header:e,prompt:t,questions:o,progress:n,notice:r,interactions:i,pending:s,artifacts:l,collapseProcessOnComplete:d=true,fontScale:c,fontScaleLabels:u,onFontScaleChange:m}){let p=useAgentConversationData();return jsx(hp.Provider,{value:{fontScale:c,fontScaleLabels:u,onFontScaleChange:m},children:jsx("div",{className:"contents agent-conversation-font-scale","data-font-scale":c,children:jsx(ep,{...p.chat,fill:true,readable:true,showMessageLabels:false,headerActions:e,composerContent:t,composerAccessory:p.questions?o:void 0,composerProgress:p.taskProgress?n:void 0,composerNotice:p.reviewNotice?r:void 0,pendingContent:p.pendingLabel?s:null,sidePanel:p.artifactsOpen?l:void 0,renderMessage:(g,b)=>jsx(Cw,{row:p.rows[b],collapseProcessOnComplete:d},g.id??b),children:p.interactions.blocking||p.interactions.approvals?.length||p.interactions.form||p.interactions.unsupported?i:null})})})}a(ww,"AgentConversationTranscript");function Cw({row:e,collapseProcessOnComplete:t=true}){return e.kind==="process"?jsx(Tw,{row:e,collapseOnComplete:t}):e.kind==="question"?jsx(xp,{data:e.data}):jsx(vp,{data:e.data})}a(Cw,"AgentConversationRow");function vp({data:e}){return jsx(Uu,{model:e.useData()})}a(vp,"MessageBinding");function xp({data:e}){return jsx(Ra,{...e.useData()})}a(xp,"QuestionBinding");function Tw({row:e,collapseOnComplete:t}){let o=["completed","failed","stopped"].includes(e.process.status),[n,r]=useState(!o),i=useRef(o);return useEffect(()=>{o&&!i.current&&t&&r(false),i.current=o;},[o,t]),jsx(Zc,{...e.process,density:"compact",showStatusIcon:false,open:n,onOpenChange:r,children:e.items.map(s=>jsx(vp,{data:s},s.key))})}a(Tw,"ProcessRow");function Sw(){let{header:e}=useAgentConversationData(),t=useContext(hp),o=t.fontScaleLabels;return jsxs("span",{className:"flex items-center",children:[t.fontScale&&o?jsx(Eu,{"aria-label":o.ariaLabel,value:t.fontScale,onValueChange:n=>t.onFontScaleChange?.(n),items:[{value:"lg",label:o.large},{value:"md",label:o.medium},{value:"sm",label:o.small}],className:"agent-conversation-font-scale-control"}):null,jsx(Te,{size:"xs",variant:"quiet","aria-label":e.canvasLabel,title:e.canvasLabel,"aria-pressed":e.canvasVisible,disabled:e.canvasDisabled,onClick:e.onCanvas,children:jsx(Shapes,{className:"agent-workbench-artifact-icon","aria-hidden":"true"})}),jsx(Te,{size:"xs",variant:"quiet","aria-label":e.artifactsLabel,title:e.artifactsLabel,"aria-expanded":e.artifactsOpen,"aria-controls":e.artifactsId,onClick:e.onArtifacts,children:jsx(Files,{className:"agent-workbench-artifact-icon","aria-hidden":"true"})}),jsx(Te,{size:"xs",variant:"quiet","aria-label":e.previewLabel,title:e.previewLabel,"aria-pressed":e.previewOpen,disabled:e.previewDisabled,onClick:e.onPreview,children:e.previewOpen?jsx(PanelRightClose,{className:"agent-workbench-artifact-icon","aria-hidden":"true"}):jsx(PanelRightOpen,{className:"agent-workbench-artifact-icon","aria-hidden":"true"})})]})}a(Sw,"AgentConversationHeader");var kp=createContext(null);function $w({controls:e,menu:t}){let{fileInputRef:o,onFiles:n,prompt:r,chat:i}=useAgentConversationData();return jsxs(Fragment,{children:[jsx(bo,{unstyled:true,ref:o,type:"file",multiple:true,hidden:true,tabIndex:-1,onChange:s=>{n(Array.from(s.target.files??[])),s.target.value="";}}),jsx(Ka,{...r,controls:e,renderAttachButton:t?(s,l)=>jsx(kp.Provider,{value:{trigger:s,anchorRef:l},children:t}):void 0,minRows:i.composerContainer?1:2,showDictation:true})]})}a($w,"AgentConversationPrompt");function _E({triggerLabel:e,uploadLabel:t,emptyLabel:o,loadingLabel:n,errorLabel:r}){let i=useAgentConversationData();return i.promptMenu?jsx(Pw,{binding:i.promptMenu,labels:{triggerLabel:e,uploadLabel:t,emptyLabel:o,loadingLabel:n,errorLabel:r}},i.promptMenu.key):null}a(_E,"AgentConversationPromptMenu");function Pw({binding:e,labels:t}){let o=useAgentConversationData(),n=useContext(kp),r=e.useData(),[i,s]=useState(false);if(!n)throw new Error("The prompt menu requires an AgentConversationPrompt menu slot.");let l=r.status==="loading"?t.loadingLabel:r.status==="error"?t.errorLabel:r.groups.some(d=>d.options.length)?void 0:t.emptyLabel;return jsx(dp,{...n,trigger:cloneElement(n.trigger,{"aria-label":t.triggerLabel}),triggerLabel:t.triggerLabel,groups:r.groups,disabled:o.prompt.disabled,open:i,onOpenChange:d=>{s(d),d&&r.status==="error"&&r.onRetry?.();},uploadContent:jsxs(Fragment,{children:[jsx(To,{size:"sm",variant:"soft",style:{width:"100%",justifyContent:"start"},icon:jsx(Paperclip,{size:"var(--monkeys-ui-icon-size-s16,var(--monkeys-ui-default-icon-size-s16))","aria-hidden":"true"}),onClick:()=>{s(false),o.prompt.onAttach?.();},children:t.uploadLabel}),l?jsx("p",{role:"status",children:l}):null]}),onSelect:d=>r.onSelect(d.key)})}a(Pw,"PromptMenuBinding");function Rw(){let{questions:e}=useAgentConversationData();return e?jsxs("div",{"data-agent-question-dock":true,children:[e.blocking&&createElement(Ra,{...e.blocking,key:e.blocking.key}),e.asynchronous?.map(t=>jsx(xp,{data:t},t.key))]}):null}a(Rw,"AgentConversationQuestions");function Mw(){let{taskProgress:e}=useAgentConversationData();return e?jsx(Qa,{...e,variant:"Progress"}):null}a(Mw,"AgentConversationProgress");function Aw(){let{pendingLabel:e,pendingElapsedMs:t,pendingStartedAtMs:o}=useAgentConversationData();return e?jsx(gn,{variant:"Dots",label:e,elapsedMs:t,startedAtMs:o}):null}a(Aw,"AgentConversationPending");function Bw(){let{reviewNotice:e}=useAgentConversationData();return e?jsx(Te,{size:"xs",variant:"quiet",disabled:e.disabled,onClick:e.onClick,children:e.label}):null}a(Bw,"AgentConversationNotice");function Nw(){let{interactions:e}=useAgentConversationData();return jsxs(Fragment,{children:[e.blocking&&createElement(Ra,{...e.blocking,key:e.blocking.key}),e.approvals?.map(({id:t,...o})=>jsx(Ws,{...o},t)),e.form&&jsxs(Fragment,{children:[e.form.authorization&&jsx(Te,{onClick:e.form.authorization.onClick,children:e.form.authorization.label}),jsx(Ws,{...e.form},e.form.id)]}),e.unsupported&&jsxs("div",{role:"status",children:[jsx(lp,{status:"running",active:e.unsupported.label,rows:[]}),jsx(Te,{disabled:e.unsupported.disabled,onClick:e.unsupported.onStop,children:e.unsupported.stopLabel})]})]})}a(Nw,"AgentConversationInteractions");function Ew({panel:e,files:t,error:o}){return jsx(ni,{...e,footer:o?jsx(tu,{message:o}):void 0,children:jsx(ri,{...t})})}a(Ew,"AgentConversationArtifactList");function Iw({data:e}){return jsx(Ew,{...e.useData()})}a(Iw,"ArtifactBinding");function Dw(){let e=useAgentConversationData();return jsx(Iw,{data:e.artifacts})}a(Dw,"AgentConversationArtifacts");function Lw({data:e,canvas:t,markdown:o,onMarkdownSourceSelected:n}){let r=e.useData(),i=a(c=>{let u=r.workspace.artifacts.find(p=>p.id===c),m=u&&r.contents.find(p=>p.id===u.id);return u?.kind==="markdown"&&m?.kind==="artifact"?m.document?.source??null:null},"sourceFor"),s=i(r.workspace.activeArtifactId),l=JSON.stringify(s),d=useRef(n);return d.current=n,useEffect(()=>{d.current&&Promise.resolve(d.current(s)).catch(()=>{});},[l]),jsx(Ic,{conversation:r.conversation,workspace:{...r.workspace,density:"compact",tabBar:"flush",onIntent:a(c=>{c.type==="select"&&n&&Promise.resolve(n(i(c.artifactId))).catch(()=>{}),r.workspace.onIntent?.(c);},"onIntent"),renderArtifact:a(c=>{if(c.id==="agent-session-canvas")return jsx(is,{children:t});let u=r.contents.find(m=>m.id===c.id);return u?u.kind==="artifact"&&u.document&&o?jsx(_s.Provider,{value:u.document,children:o},u.id):u.kind==="data"?jsx(zw,{data:u.data},u.id):jsx(Ow,{data:u.data},u.id):null},"renderArtifact")}})}a(Lw,"WorkspaceBinding");function zw({data:e}){return jsx(Iu,{...e.useData()})}a(zw,"LinkedBinding");function Ow({data:e}){return jsx(ur,{...e.useData()})}a(Ow,"PreviewBinding");function Hw({canvas:e,markdown:t,onMarkdownSourceSelected:o}){let n=useAgentConversationData();return jsx(Lw,{data:n.workspace,canvas:n.canvasOpen?e:void 0,markdown:t,onMarkdownSourceSelected:o})}a(Hw,"AgentConversationWorkspace");function Ww({data:e}){return jsx(Lu,{...e.useData()})}a(Ww,"CanvasBinding");function Fw(){let{canvas:e}=useAgentConversationData();return e?jsx(Ww,{data:e},e.key):null}a(Fw,"AgentConversationCanvas");function _w({data:e}){return jsx(Ms,{...e.useData()})}a(_w,"CollectionBinding");function Uw(){let{collection:e}=useAgentConversationData();return e?jsx(_w,{data:e}):null}a(Uw,"AgentConversationCollection");function UE({canvas:e}){return jsx(kw,{preview:jsx(Hw,{canvas:e??jsx(Fw,{})}),overlays:jsx(Uw,{}),children:jsx(ww,{header:jsx(Sw,{}),prompt:jsx($w,{}),questions:jsx(Rw,{}),progress:jsx(Mw,{}),notice:jsx(Bw,{}),interactions:jsx(Nw,{}),pending:jsx(Aw,{}),artifacts:jsx(Dw,{})})})}a(UE,"AgentConversationDefaultView");
|
|
226
226
|
|
|
227
227
|
export { _i as AgentArtifactLayout, Lu as AgentCanvasView, rv as AgentConversationAnchor, Ew as AgentConversationArtifactList, Dw as AgentConversationArtifacts, Fw as AgentConversationCanvas, Uw as AgentConversationCollection, sk as AgentConversationDataProvider, UE as AgentConversationDefaultView, Sw as AgentConversationHeader, Nw as AgentConversationInteractions, kw as AgentConversationLayout, mE as AgentConversationMarkdownDocument, Bw as AgentConversationNotice, Aw as AgentConversationPending, is as AgentConversationPreview, Mw as AgentConversationProgress, $w as AgentConversationPrompt, _E as AgentConversationPromptMenu, Rw as AgentConversationQuestions, Cw as AgentConversationRow, TB as AgentConversationSurface, ww as AgentConversationTranscript, Hw as AgentConversationWorkspace, Iu as AgentDataPanel, tu as AgentFeedback, Dc as AgentFileCard, ri as AgentFileList, Wd as AgentImageCard, _R as AgentInteractionFallback, _c as AgentMessageContent, Ic as AgentPreviewWorkspace, Jc as AgentProcessDetail, Zc as AgentProcessView, Lc as AgentQuestionAnswer, Ra as AgentQuestionState, Hc as AgentReportView, ni as AgentSummaryPanel, Uu as AgentTimelineContent, ur as ArtifactPreview, _s as MarkdownArtifactContext, pp as MarkdownDocumentWorkspace, Fi as calculatePptxRenderLayout, rc as createArtifactPresentation, oc as decodeArtifactDocument, nc as decodeArtifactSpreadsheet, tc as renderPptxSlide, Hi as repairGeneratedPptx, ia as resolveArtifactPreviewFormat, ec as sanitizePptxSource, CB as useAgentConversationData, zo as useAgentMarkdownResources };
|
|
228
228
|
//# sourceMappingURL=index.mjs.map
|