PageSourceSearch

https://interactor.ai/_next/static/chunks/pages/admin/agents/tasks-c269b39387c799a7.js

js interactor.ai collected 2026-10-05 12:25:01 UTC 30,939 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d2378942-1b95-4dd3-9f7e-47b9931d8e1c",e._sentryDebugIdIdentifier="sentry-dbid-d2378942-1b95-4dd3-9f7e-47b9931d8e1c")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4907,6532],{22629:function(e,t,n){"use strict";n.d(t,{_:function(){return l}});var r=n(2784),i=n(71860),o=n(31458),a=n(52322);let s=e=>{let{color:t="black",size:n=24,...r}=e;return(0,a.jsxs)(i.ny,{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...r,children:[(0,a.jsx)(i.y$,{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",stroke:t}),(0,a.jsx)(i.y$,{d:"M5 21h14",stroke:t})]})};s.displayName="Crown";let l=(0,r.memo)((0,o.H)(s))},12778:function(e,t,n){"use strict";n.d(t,{n:function(){return l}});var r=n(2784),i=n(71860),o=n(31458),a=n(52322);let s=e=>{let{color:t="black",size:n=24,...r}=e;return(0,a.jsxs)(i.ny,{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...r,children:[(0,a.jsx)(i.y$,{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",stroke:t}),(0,a.jsx)(i.Cd,{cx:"12",cy:"7",r:"4",stroke:t})]})};s.displayName="User";let l=(0,r.memo)((0,o.H)(s))},76833:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/agents/tasks",function(){return n(47473)}])},51202:function(e,t,n){"use strict";n.d(t,{v:function(){return o}});var r=n(8782),i=n(34406);let o={public:r.config,cookiePrefix:i.env.COOKIE_PREFIX||"",interactorHomeAppUrl:i.env.INTERACTOR_HOME_APP_URL,customerChatCanonicalUrl:i.env.CUSTOMER_CHAT_CANONICAL_URL,clientApiSecret:i.env.CLIENT_API_SECRET}},35133:function(e,t,n){"use strict";n.d(t,{K:function(){return o}});var r=n(54644),i=n.n(r);let o=e=>i()(e)},79624:function(e,t,n){"use strict";n.d(t,{$:function(){return r}});let r=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.length>t?"".concat(e.slice(0,t)).concat(n):e}},99017:function(e,t,n){"use strict";n.d(t,{T:function(){return a}});var r=n(52322),i=n(30813),o=n(87494);let a=()=>(0,r.jsx)(i.G7,{ai:"center",jc:"center",w:"100%",h:"100%",children:(0,r.jsx)(o.$,{})})},80601:function(e,t,n){"use strict";n.d(t,{t:function(){return d}});var r=n(52322),i=n(2784),o=n(36728),a=n(85853),s=n(32748);let l=()=>{let{push:e}=(0,o.c)(),{identity:t,isLoading:n,isAllowed:r,shouldShowSkeleton:l}=(0,s.x)();return(0,i.useEffect)(()=>{!n&&r&&((null==t?void 0:t.isSuperAdmin)||e(a.x.Root.notFound()))},[t,n,r]),{identity:t,isLoading:n,shouldShowSkeleton:l||!(null==t?void 0:t.isSuperAdmin)}};var c=n(99017);let d=e=>{let{Skeleton:t=c.T,children:n}=e,{shouldShowSkeleton:i}=l();return i?(0,r.jsx)(t,{isLoading:!0}):n}},32748:function(e,t,n){"use strict";n.d(t,{x:function(){return s}});var r=n(2784),i=n(27758),o=n(36728),a=n(85853);let s=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{isDisabled:s,redirectUrl:l=a.x.Root.auth()}=n,{getIdentity:c}=(0,i.j)({skip:s}),{push:d}=(0,o.c)(),u=!!(c.loading||n.isLoading),h=null===(e=c.data)||void 0===e?void 0:e.identity,p=null===(t=null==h?void 0:h.isAnonym)||void 0===t||t,g=!!(s||h&&!p);return(0,r.useEffect)(()=>{u||g||d(l)},[g,u,d]),{identity:h,isLoading:u,isAllowed:g,shouldShowSkeleton:u||!g}}},35740:function(e,t,n){"use strict";n.d(t,{q:function(){return k}});var r=n(52322),i=n(2784),o=n(73530),a=n(54017),s=n(87494),l=n(96577),c=n.n(l);let d=n(12778).n,u=e=>{let{avatarSize:t,url:n,onError:i,interactorIconColor:o}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a._,{isHidden:!!n,children:(0,r.jsx)(d,{color:o,size:t/2.6})}),(0,r.jsx)(a._,{isHidden:!n,children:(0,r.jsx)(c(),{priority:!0,fill:!0,style:{objectFit:"cover"},src:n,alt:"Interactor avatar",onError:i})})]})};var h=n(37288),p=n(41198);let g=e=>{let{color:t,firstInitial:n,secondInitial:i,url:o,avatarSize:s}=e,l=.3846*s;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a._,{isHidden:!n||!!o,children:(0,r.jsxs)(h.sL,{children:[(0,r.jsx)(p.x,{color:t,textTransform:"capitalize",fontSize:l,children:n}),(0,r.jsx)(a._,{isHidden:!i,children:(0,r.jsx)(p.x,{color:t,textTransform:"capitalize",fontSize:l,children:i})})]})}),(0,r.jsx)(a._,{isHidden:!o,children:(0,r.jsx)(c(),{priority:!0,fill:!0,sizes:"150px",style:{objectFit:"cover"},src:o,alt:"User avatar"})}),(0,r.jsx)(a._,{isHidden:!!o||!!n||!!i,children:(0,r.jsx)(d,{color:t,size:s})})]})}
1,x=["$avatarBackground_1","$avatarBackground_2","$avatarBackground_3","$avatarBackground_4","$avatarBackground_5","$avatarBackground_6","$avatarBackground_7","$avatarBackground_8","$avatarBackground_9","$avatarBackground_10"],f=e=>{let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);let n=(t>>>0)%x.length;return x[n]},m=e=>e.trim().replace(/\s+/g," ").toLowerCase(),v=e=>{let{colorSeed:t,firstInitial:n,name:r,secondInitial:i}=e,o=void 0===t?void 0:m(t.toString()),a=r?m(r):void 0;if(!n&&!a&&!o)return"$avatarDefaultBackground";let s="".concat(n).concat(i||""),l=a||s;return f(o?"".concat(l,":").concat(o):l)},j=["a","an","the","is","are","this","that","and","but","or","nor","for","so","yet","at","by","in","on","to","of","up","with"],b=e=>{let t="",n="";if(e){let r=e.split(/\s+/),i=RegExp("\\b(".concat(j.join("|"),")\\b"),"i"),o=r.filter(e=>!i.test(e));t=o[0]?o[0][0]:"",n=o[1]?o[1][0]:""}return{firstInitial:t,secondInitial:n}},k=e=>{let{url:t,size:n,margin:l,colorSeed:c,isLoading:d,name:h,isUser:p=!1,onPress:x,onError:f,borderColor:m,borderWidth:j}=e,k="New Interactor"===h,w=t?1:0,S=k?"":h,y=k?void 0:c,[T,E]=(0,i.useState)(0),{firstInitial:_,secondInitial:O,coloredBackground:$}=(0,i.useMemo)(()=>{let e=b(S);return{...e,coloredBackground:v({...e,colorSeed:y,name:S})}},[y,S]),A=(0,i.useMemo)(()=>d&&t?"$avatarDefaultBackground":t?void 0:$,[$,d,t]);return(0,r.jsxs)(o.qE,{onLayout:e=>{E(e.nativeEvent.layout.height)},circular:!0,size:n,borderWidth:null!=j?j:w,margin:l,style:{boxSizing:"content-box"},backgroundColor:A,borderColor:null!=m?m:"$avatarBorder",display:"flex",jc:"center",cursor:x?"pointer":"default",onPress:x,children:[(0,r.jsx)(a._,{isHidden:!d,children:(0,r.jsx)(s.$,{})}),(0,r.jsx)(a._,{isHidden:d||!p,children:(0,r.jsx)(g,{avatarSize:T,color:"$avatarForeground",firstInitial:_,secondInitial:O,url:t})}),(0,r.jsx)(a._,{isHidden:d||p,children:(0,r.jsx)(u,{interactorIconColor:k?"$newInteractorIconColor":"$avatarForeground",avatarSize:T,url:t,onError:f})})]})}},24883:function(e,t,n){"use strict";n.d(t,{X:function(){return s}});var r=n(52322),i=n(89828),o=n(36728),a=n(16872);let s=e=>{let{onPress:t,...n}=e,{back:s}=(0,o.c)();return(0,r.jsx)(a.$,{p:0,onPress:e=>{if(t){t(e);return}s()},backgroundColor:"transparent",...n,children:(0,r.jsx)(i.w,{size:24})})}},46009:function(e,t,n){"use strict";n.d(t,{C:function(){return c}});var r=n(52322),i=n(37288),o=n(54017),a=n(41198);let s=e=>{let{children:t,...n}=e;return(0,r.jsx)(a.x,{color:"$brandTextAlt",pos:"relative",...n,children:t})},l=[{minCharacters:0,fontSize:14},{minCharacters:2,fontSize:14},{minCharacters:3,fontSize:14,isLarge:!0}],c=e=>{let{count:t,size:n=21,backgroundColor:a="$brand",color:c="$brandTextAlt",shape:d="circle",shouldShowZero:u=!1}=e;if(!t&&!u)return null;let h="".concat(t).length,{fontSize:p,isLarge:g=!1}=l.findLast(e=>e.minCharacters<=h),x="circle"===d?n/2:5;return(0,r.jsx)(i.FA,{display:"inline-flex",p:4,minWidth:n,height:n,backgroundColor:a,borderRadius:x,al
1ignItems:"center",justifyContent:"center",pos:"relative",children:(0,r.jsxs)(s,{fontSize:p,lineHeight:n,color:c,children:[(0,r.jsxs)(o._,{isHidden:!g,children:[(0,r.jsx)(s,{children:99}),(0,r.jsx)(s,{fontSize:.8*p,lineHeight:.8*p,top:-1.5,children:"+"})]}),(0,r.jsx)(o._,{isHidden:g,children:t})]})})}},72046:function(e,t,n){"use strict";n.d(t,{I:function(){return L}});var r,i,o=n(52322),a=n(47246),s=n(47401),l=n(37288),c=n(30813),d=n(12397),u=n(60791),h=n(41198),p=n(2253),g=n(35133),x=n(35740),f=n(46009),m=n(54017);let v=e=>{let{size:t,right:n=0,bottom:r=8,children:i}=e;return(0,o.jsx)(d.C,{backgroundColor:"$mainBackground",borderWidth:0,position:"absolute",zIndex:1,right:n,bottom:r,size:t,children:i})};var j=n(2784),b=n(56778),k=n(6783),w=n(47938),S=n(5149),y=n(70399),T=n(1491),E=n(75834),_=n(57606),O=n(24077);(r=i||(i={})).YESTERDAY="YESTERDAY",r.JUST_NOW="JUST_NOW",r.TODAY="TODAY",r.TOMORROW="TOMORROW",r.THIS_WEEK="THIS_WEEK",r.THIS_MONTH="THIS_MONTH",r.THIS_YEAR="THIS_YEAR",r.COMMON="COMMON";let $=e=>(0,k.g)(e)?i.YESTERDAY:(0,y.R)((0,O._)(new Date,1),e)?i.JUST_NOW:(0,T.z)(e)?i.TODAY:(0,E.P)(e)?i.TOMORROW:(0,y.R)((0,_.k)(new Date,7),e)?i.THIS_WEEK:(0,w.k)(e)?i.THIS_MONTH:(0,S.X)(e)?i.THIS_YEAR:i.COMMON;var A=n(11165);let C=(e=>{let{map:t}=e;return e=>{var n;let r=new Date(e),o=null!==(n=t[$(r)])&&void 0!==n?n:t[i.COMMON];return"function"==typeof o?o(r):o}})({map:{[i.COMMON]:e=>A.Z.toShortDate(e),[i.JUST_NOW]:()=>"Just now",[i.TODAY]:e=>A.Z.toFormalTime(e),[i.YESTERDAY]:e=>A.Z.toRelativeDate(e),[i.THIS_WEEK]:e=>A.Z.toRelativeDate(e)}}),R=e=>{let{date:t,isHighlighted:n}=e,r=(0,j.useMemo)(()=>$(t),[t]),[a,s]=(0,j.useState)();return(0,j.useEffect)(()=>{s(C(t))},[t]),(0,b.L)(()=>{r===i.JUST_NOW&&s(C(t))},6e4,[t]),(0,o.jsx)(h.x,{color:n?"$brand":"$textContrast",flexShrink:0,fontSize:15,opacity:.6,children:a})},I={size:21,right:0,bottom:8},L=e=>{let{avatarUrl:t,avatarColorSeed:n,title:r,titleSlot:i,preview:j="",previewSlot:b,subtitle:k,onPress:w,isOwner:S,isUser:y=!1,titleIcon:T,isAvatarHidden:E=!1,badgeCount:_,footerSlot:O,isBadgeAnchoredToTimestamp:$,previewTimestamp:A,previewTrailingSlot:C,avatarSize:L=52,subAvatar:N,subAvatarProps:z=I,isSystemPreview:B,isHighlighted:H,avatar:W,showAttentionBadge:U}=e,P=(0,a.Fg)(),M=!!_,D=!!($&&M),F=!!(!D||!k),Z=O?1:2,Y=!!(j||b);return(0,o.jsx)(s.$D,{h:"auto",p:0,borderWidth:0,borderRadius:0,onPress:w,bg:H?"$mainBackgroundHighlighted":"$mainBackground",pressStyle:{bg:H?"$mainBackgroundHighlighted":"$mainBackgroundActive"},hoverStyle:{backgroundColor:H?"$mainBackgroundHighlighted":"$mainBackgroundHover"},children:(0,o.jsxs)(l.sL,{f:1,gap:14,paddingHorizontal:18,marginRight:-18,paddingTop:8,children:[(0,o.jsx)(m._,{isHidden:E,children:(0,o.jsxs)(c.G7,{h:64,position:"relative",children:[null!=W?W:(0,o.jsx)(x.q,{colorSeed:n,size:L,url:t,name:r,isUser:y}),(0,o.jsx)(m._,{isHidden:!N,children:(0,o.jsx)(v,{...I,...z,children:N})}),(0,o.jsx)(m._,{isHidden:!S,children:(0,o.jsx)(d.C,{backgroundColor:"$ownerIconBackground",borderWidth:0,position:"absolute",zIndex:1,...I,...z,children:(0,o.jsx)(p.S,{color:P.ownerIconForeground.get(),size:14})})})]})}),(0,o.jsxs)(l.FA,{borderBottomColor:"$separator",borderBottomWidth:.5,f:1,gap:3,jc:"space-between",paddingBottom:Y?10:0,children:[(0,o.jsxs)(l.sL,{ai:"center",jc:"space-between",pr:16,gap:8,children:[(0,o.jsxs)(l.sL,{ai:"center",gap:5,flex:1,marginTop:Y?0:10,children:[(0,o.jsxs)(l.sL,{gap:5,ai:"center",maxWidth:"100%",children:[(0,o.jsx)(h.x,{fontSize:17,fontWeight:"600",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",letterSpacing:0,children:r}),T]}),i]}),A&&(0,o.jsx)(R,{isHighlighted:M,date:new Date(A)})]}),k&&(0,o.jsxs)(l.sL,{ai:"center",pr:16,gap:8,children:[(0,o.jsx)(h.x,{f:1,fontSize:16,color:"$textMutedContrast",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",children:k}),D&&(0,o.jsx)(f.C,{count:null!=_?_:0})]}),(0,o.jsxs)(l.sL,{gap:10,ai:"flex-start",pr:16,children:[null!=b?b:(0,o.jsx)(h.x,{f:1,h:19*Z,opacity:.6,color:"$textContrast",letterSpacing:.3,lineHeight:19,textOverflow:"ellipsis",numberOfLines:Z,overflow:"hidden",
1whiteSpace:"wrap",fontStyle:B?"italic":"normal",children:(0,g.K)(j)}),(0,o.jsxs)(l.sL,{ai:"flex-start",flexShrink:0,gap:8,ml:"auto",children:[C,(0,o.jsxs)(l.sL,{ai:"center",gap:8,children:[(0,o.jsx)(m._,{isHidden:!U,children:(0,o.jsx)(u.j,{size:12})}),F&&(0,o.jsx)(f.C,{count:null!=_?_:0})]})]})]}),O&&(0,o.jsx)(l.sL,{ai:"center",jc:"flex-start",pr:16,children:O})]})]})})}},60791:function(e,t,n){"use strict";n.d(t,{j:function(){return s}});var r=n(52322),i=n(12397),o=n(99765),a=n.n(o);let s=e=>{let{className:t,isGlowing:n,size:o=10,...s}=e,l=[t];return n&&l.push(a().glowing),(0,r.jsx)(i.C,{size:o,bg:"$attentionIndicator",className:l.filter(Boolean).join(" "),...s})}},10507:function(e,t,n){"use strict";n.d(t,{S:function(){return d}});var r=n(52322),i=n(97729),o=n.n(i),a=n(51202);let s=e=>{let{description:t,title:n,canonicalUrl:i,imageUrl:a,imageSize:s,twitter:l}=e;return(0,r.jsxs)(o(),{children:[n&&(0,r.jsx)("meta",{property:"og:title",content:n},"og:title"),t&&(0,r.jsx)("meta",{property:"og:description",content:t},"og:description"),i&&(0,r.jsx)("meta",{property:"og:url",content:i},"og:url"),(0,r.jsx)("meta",{property:"og:type",content:"website"}),a&&(0,r.jsx)("meta",{property:"og:image",content:a},"og:image"),s&&(0,r.jsx)("meta",{property:"og:image:width",content:"".concat(s.width)},"og:image:width"),s&&(0,r.jsx)("meta",{property:"og:image:height",content:"".concat(s.height)},"og:image:height"),(null==l?void 0:l.cardType)&&(0,r.jsx)("meta",{name:"twitter:card",content:l.cardType},"twitter:card"),(null==l?void 0:l.title)&&(0,r.jsx)("meta",{name:"twitter:title",content:l.title},"twitter:title"),(null==l?void 0:l.description)&&(0,r.jsx)("meta",{name:"twitter:description",content:l.description},"twitter:description"),(null==l?void 0:l.imageUrl)&&(0,r.jsx)("meta",{name:"twitter:image",content:l.imageUrl},"twitter:image"),(null==l?void 0:l.imageSize)&&(0,r.jsx)("meta",{name:"twitter:image:width",content:"".concat(l.imageSize.width)},"twitter:image:width"),(null==l?void 0:l.imageSize)&&(0,r.jsx)("meta",{name:"twitter:image:height",content:"".concat(l.imageSize.height)},"twitter:image:height")]})},l=e=>{let{description:t,title:n,canonicalUrl:i,imageUrl:l,imageSize:c,twitterOg:d,keywords:u,customTags:h,customProductionTags:p,children:g}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s,{title:n,description:t,canonicalUrl:i,imageUrl:l,imageSize:c,twitter:d}),(0,r.jsxs)(o(),{children:[!a.v.public.app.isProductionSite&&(0,r.jsx)("meta",{name:"robots",content:"noindex, nofollow"},"robots"),i&&(0,r.jsx)("link",{rel:"canonical",href:i}),(0,r.jsx)("title",{children:n},"title"),t&&(0,r.jsx)("meta",{name:"description",content:t},"description"),u&&(0,r.jsx)("meta",{name:"keywords",content:u},"keywords"),h,a.v.public.app.isProductionSite&&p]}),g]})},c=e=>{let{sets:t,setId:n}=e;if(!t||!n||!(n in t))return null;let i=t[n],{customTags:o=[]}=i;return(0,r.jsx)(l,{...i,canonicalUrl:"?testMetadataId=".concat(n),customTags:[...o,(0,r.jsx)("meta",{name:"robots",content:"noindex, nofollow"},"robots")]})},d=e=>{let{testSets:t,testSetId:n,...i}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l,{...i}),t&&n&&(0,r.jsx)(c,{sets:t,setId:n})]})}},7005:function(e,t,n){"use strict";n.d(t,{C:function(){return r}});let r=n(22629)._},2253:function(e,t,n){"use strict";n.d(t,{S:function(){return a}});var r=n(52322),i=n(47246),o=n(7005);let a=e=>{let{ownerIcon:t}=(0,i.Fg)(),{color:n,size:a=17}=e;return(0,r.jsx)(o.C,{color:null!=n?n:t.val,size:a})}},47473:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eu}});var r=n(52322),i=n(37288),o=n(30813),a=n(4851),s=n(24883),l=n(96826),c=n(10507),d=n(80601),u=n(53749),h=n(72046),p=n(79624),g=n(12294);let x=(0,g.Ue)(e=>({isOpen:!1,agentTask:null,actions:{close:()=>e({isOpen:!1,agentTask:null}),open:t=>e({isOpen:!0,agentTask:t}),setIsOpen:t=>e({isOpen:t})}})),f=()=>x(e=>e.actions),m=()=>x(e=>e.isOpen),v=()=>x(e=>e.agentTask),j=e=>{var t;let{item:n}=e,{open:i}=f(),o=[(0,p.$)(n.description,20,"...")];n.type&&o.push("[".concat(n.type,"]"));let a=o.join(" ");return(0,r.jsx)(h.I,{isAvatarHidden:!0,title:a,subtitle:n.expectedOutput,onPress:()=>{var e;i({...n,notes:null!==(e=n.notes)&&void 0!==e?e:null})},preview:null!==(t=n.context)&&void 0!==t?t:""})};var b=n(2784),k=n(64125),w=n(69876),S=n(94241);let{createAgentTasksQuery:y}=(0,S.e)("query","agentTasks");var T=n(74609);let E=y({edges:{cursor:!0,node:{id:!0,description:!0,expectedOutput:!0,context:!0,type:!0,createdAt:!0,updatedAt:!0}},endCursor:!0,hasNextPage:!0,total:!0}),_=(0,T.g)("agentTasks",E),O={[w.RN.CustomerAssistantTask]:"\n# VARIABLES LEGEND\n\n## Variables (replaced with actual value):\n\n$additionalSchedulerInstru
1ction – owner instructions configured in the scheduler train module.\n\n$additionalShopInstruction – owner instructions configured in the shop train module.\n\n\n## Conditional blocks (the content of the blocks will be added to the prompt only if the condition is true):\n\n<$conditionalBlock.servicesExtensionEnabled>\n * when the Services extension/module is enabled *\n</$conditionalBlock.servicesExtensionEnabled>\n\n<$conditionalBlock.schedulerExtensionEnabled>\n * when the Scheduler extension/module is enabled *\n</$conditionalBlock.schedulerExtensionEnabled>\n\n<$conditionalBlock.interactorShopExtensionEnabled>\n * when the Shop extension/module is enabled and no integration is used (default interactor shop) *\n</$conditionalBlock.interactorShopExtensionEnabled>\n\n<$conditionalBlock.lightBulbsEtcShopExtensionEnabled>\n * when the Shop extension/module is enabled for LightBulbsEtc interactor only *\n</$conditionalBlock.lightBulbsEtcShopExtensionEnabled>\n\n<$conditionalBlock.shopifyShopExtensionEnabled>\n * when the Shop extension/module is enabled and Shopify is connected *\n</$conditionalBlock.shopifyShopExtensionEnabled>\n"},$=()=>{let{getAgentTasks:e}=_({variables:{input:{limit:k.$M,offset:0}}});return{items:(0,b.useMemo)(()=>{var t,n;return null!==(n=null===(t=e.data)||void 0===t?void 0:t.edges.map(e=>{let t=e.node.type?O[e.node.type]:null;return{...e.node,notes:t}}))&&void 0!==n?n:[]},[e.data])}},A=()=>{let{items:e}=$();return(0,r.jsx)(u.p,{h:"100%",pb:20,children:e.map(e=>(0,r.jsx)(j,{item:e},e.id))})};var C=n(46094),R=n(60473),I=n(9055);let L=(0,g.Ue)(e=>({isOpen:!1,actions:{close:()=>e({isOpen:!1}),open:()=>e({isOpen:!0}),setIsOpen:t=>e({isOpen:t})}})),N=()=>L(e=>e.actions),z=()=>L(e=>e.isOpen);var B=n(63955),H=n(47994),W=n(11811),U=n(78501),P=n(6812);let{createCreateAgentTaskMutation:M}=(0,S.e)("mutation","createAgentTask");var D=n(314);let F=(0,D._)("createAgentTask",M({agentTask:{id:!0,description:!0,expectedOutput:!0,context:!0,type:!0,createdAt:!0,updatedAt:!0}}));var Z=n(48601);let Y=Z.Ry().shape({description:Z.Z_().required(),expectedOutput:Z.Z_().required(),context:Z.Z_().optional().nullable()}),q=e=>{let{onSubmit:t}=e,n=(0,B.cI)({resolver:(0,P.X)(Y)}),{createAgentTask:r}=F({refetchQueries:[E]}),i=n.handleSubmit(async e=>{await r.request({input:e}),t()});return{methods:n,submitHandler:i}},K=U.t,V=e=>{let{onSubmit:t}=e,{methods:n,submitHandler:o}=q({onSubmit:t});return(0,r.jsx)(B.RV,{...n,children:(0,r.jsx)(H.l0,{onSubmit:o,children:(0,r.jsxs)(i.FA,{gap:10,children:[(0,r.jsx)(K,{name:"description",type:w.EB.Textarea,placeholder:"Description"}),(0,r.jsx)(K,{name:"expectedOutput",type:w.EB.Textarea,placeholder:"Expected output"}),(0,r.jsx)(K,{name:"context",type:w.EB.Textarea,placeholder:"Context"}),(0,r.jsx)(H.l0.Trigger,{asChild:!0,children:(0,r.jsx)(W.z,{variant:"primary",children:"Create"})})]})})})},G=e=>(0,r.jsx)(W.z,{...e,variant:"primary",children:"Create task"}),X=()=>{let e=z(),{setIsOpen:t,close:n}=N(),{width:i}=(0,C.d)(),a=(0,R.uZ)(.75*i,[350,700]);return(0,r.jsx)(I.u,{isOpen:e,setIsOpen:t,title:"Create agent",maxWidth:a,minWidth:a,Button:G,children:(0,r.jsx)(o.G7,{pb:10,children:(0,r.jsx)(V,{onSubmit:n})})})};var J=n(54017),Q=n(41198);let ee=(0,n(54687).r)({[w.RN.OnboardingTask]:!0,[w.RN.OnboardingGreetTask]:!0,[w.RN.OnboardingDemoTask]:!1,[w.RN.OnboardingDemoGreetTask]:!1,[w.RN.GenerateFormTask]:!0,[w.RN.RegenerateFormTask]:!0,[w.RN.OnboardingDemoGetStartedGreetTask]:!1,[w.RN.CustomerSchedulingCoordinatorTask]:!0,[w.RN.CustomerAssistantTask]:!0,[w.RN.OwnerAssistantTask]:!0,[w.RN.CustomizeGreetingTask]:!0,[w.RN.OwnerSchedulingCoordinatorTask]:!0,[w.RN.WhatsappAssistantTask]:!0,[w.RN.ShopAgentTask]:!0,[w.RN.ThemeAgentTask]:!0,[w.RN.LightBulbsEtcProductsAgentTask]:!0,[w.RN.MonitorTaskAgentTask]:!0,[w.RN.ShopifyProductsAgentTask]:!0,[w.RN.BigcommerceProductsAgentTask]:!0});var et=n(90392);let{createRemoveAgentTaskMutation:en}=(0,S.e)("mutation","removeAgentTask"),er=(0,D._)("removeAgentTask",en({isRemoved:!0})),{createUpdateAgentTaskMutation:ei}=(0,S.e)("mutation","updateAgentTask"),eo=(0,D._)("updateAgentTask",ei({agentTask:{id:!0,description:!0,expectedOutput:!0,context:!0,type:!0,createdAt:!0,updatedAt:!0}})),ea=Z.Ry().shape({description:Z.Z_().required(),expectedOutput:Z.Z_().required(),context:Z.Z_().optional().nullable(),type:Z.Z_().oneOf(ee).optional().nullable()}),es=e=>{var t;let{onSubmit:n,onRemove:r}=e,i=v(),{id:o}=null!=i?i:{},a=(0,B.cI)({resolver:(0,P.X)(ea)}),{updateAgentTask:s}=eo({refetchQueries:[E]}),{removeAgentTask:l}=er({refetchQueries:[E]});(0,b.useEffect)(()=>{i&&a.reset((0,et.e)(i,["description","expectedOutput","context","type"]))},[i]);let c=a.handleSubmit(async e=>{if(!o)throw Error("Id is missed");await s.request({input:{...e,id:o}}),n()});return{methods:a,submitHandler:c,removeHandler:async()=>
1{if(!o)throw Error("Id is missed");r(),await l.request({input:{id:o}})},notes:null!==(t=null==i?void 0:i.notes)&&void 0!==t?t:null}},el=U.t,ec=e=>{let{onSubmit:t,onRemove:n}=e,{methods:o,submitHandler:a,removeHandler:s,notes:l}=es({onSubmit:t,onRemove:n});return(0,r.jsx)(B.RV,{...o,children:(0,r.jsx)(H.l0,{onSubmit:a,children:(0,r.jsxs)(i.FA,{gap:10,children:[(0,r.jsx)(el,{name:"description",type:w.EB.Textarea,placeholder:"Description"}),(0,r.jsx)(el,{name:"expectedOutput",type:w.EB.Textarea,placeholder:"Expected output"}),(0,r.jsx)(el,{name:"context",type:w.EB.Textarea,placeholder:"Context"}),(0,r.jsx)(J._,{isHidden:!l,children:(0,r.jsx)(Q.x,{children:l})}),(0,r.jsx)(el,{name:"type",type:w.EB.SingleList,options:ee,placeholder:"Type"}),(0,r.jsxs)(i.sL,{gap:5,children:[(0,r.jsx)(H.l0.Trigger,{asChild:!0,children:(0,r.jsx)(W.z,{variant:"primary",f:1,children:"Update"})}),(0,r.jsx)(W.z,{variant:"danger",f:1,onPress:s,children:"Remove"})]})]})})})},ed=()=>{let e=m(),{setIsOpen:t,close:n}=f(),{width:i}=(0,C.d)(),o=(0,R.uZ)(.75*i,[350,700]);return(0,r.jsx)(I.u,{isOpen:e,setIsOpen:t,title:"Edit agent",minWidth:o,maxWidth:o,children:(0,r.jsx)(u.p,{pb:10,h:"100%",maxHeight:400,mx:-16,px:16,children:(0,r.jsx)(ec,{onSubmit:n,onRemove:n})})})},eu=(0,a.T)(()=>(0,r.jsxs)(l.d,{title:"Admin › Agent tasks",leftAction:(0,r.jsx)(s.X,{}),children:[(0,r.jsx)(c.S,{title:"Agent tasks"}),(0,r.jsxs)(i.FA,{gap:20,pt:20,h:"100%",children:[(0,r.jsx)(X,{}),(0,r.jsx)(o.G7,{mx:-16,f:1,children:(0,r.jsx)(A,{})})]}),(0,r.jsx)(ed,{})]}),[d.t])},56778:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});var r=n(2784);let i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];(0,r.useEffect)(()=>{let n=setTimeout(e,t);return()=>{clearTimeout(n)}},n)}},54687:function(e,t,n){"use strict";n.d(t,{r:function(){return r}});let r=e=>Object.entries(e).filter(e=>{let[,t]=e;return t}).map(e=>{let[t]=e;return t})},99765:function(e){e.exports={glowing:"needsAttentionBadge_glowing__sWnmV",needsAttentionPulse:"needsAttentionBadge_needsAttentionPulse__pul8H"}},54644:function(e){e.exports=function(e,t){(t=t||{}).listUnicodeChar=!!t.hasOwnProperty("listUnicodeChar")&&t.listUnicodeChar,t.stripListLeaders=!t.hasOwnProperty("stripListLeaders")||t.stripListLeaders,t.gfm=!t.hasOwnProperty("gfm")||t.gfm,t.useImgAltText=!t.hasOwnProperty("useImgAltText")||t.useImgAltText,t.abbr=!!t.hasOwnProperty("abbr")&&t.abbr,t.replaceLinksWithURL=!!t.hasOwnProperty("replaceLinksWithURL")&&t.replaceLinksWithURL,t.htmlTagsToSkip=t.hasOwnProperty("htmlTagsToSkip")?t.htmlTagsToSkip:[],t.throwError=!!t.hasOwnProperty("throwError")&&t.throwError;var n=e||"";n=n.replace(/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/gm,"");try{t.stripListLeaders&&(n=t.listUnicodeChar?n.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,t.listUnicodeChar+" $1"):n.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,"$1")),t.gfm&&(n=n.replace(/\n={2,}/g,"\n").replace(/~{3}.*\n/g,"").replace(/~~/g,"").replace(/```(?:.*)\n([\s\S]*?)```/g,(e,t)=>t.trim())),t.abbr&&(n=n.replace(/\*\[.*\]:.*\n/,""));let e=/<[^>]*>/g;if(t.htmlTagsToSkip&&t.htmlTagsToSkip.length>0){let n=t.htmlTagsToSkip.join("|");e=RegExp(`<(?!/?(${n})(?=>|s[^>]*>))[^>]*>`,"g")}n=n.replace(e,"").replace(/^[=\-]{2,}\s*$/g,"").replace(/\[\^.+?\](\: .*?$)?/g,"").replace(/\s{0,2}\[.*?\]: .*?$/g,"").replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g,t.useImgAltText?"$1":"").replace(/\[([\s\S]*?)\]\s*[\(\[].*?[\)\]]/g,t.replaceLinksWithURL?"$2":"$1").replace(/^(\n)?\s{0,3}>\s?/gm,"$1").replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g,"").replace(/^(\n)?\s{0,}#{1,6}\s*( (.+))? +#+$|^(\n)?\s{0,}#{1,6}\s*( (.+))?$/gm,"$1$3$4$6").replace(/([\*]+)(\S)(.*?\S)??\1/g,"$2$3").replace(/(^|\W)([_]+)(\S)(.*?\S)??\2($|\W)/g,"$1$3$4$5").replace(/(`{3,})(.*?)\1/gm,"$2").replace(/`(.+?)`/g,"$1").replace(/~(.*?)~/g,"$1")}catch(n){if(t.throwError)throw n;return console.error("remove-markdown encountered error: %s",n),e}return n}},6812:function(e,t,n){"use strict";n.d(t,{X:function(){return l}});var r=n(63955);let i=(e,t,n)=>{if(e&&"reportValidity"in e){let i=(0,r.U2)(n,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},o=(e,t)=>{for(let n in t.fields){let r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?i(r.ref,n,e):r.refs&&r.refs.forEac
1h(t=>i(t,n,e))}},a=(e,t)=>{t.shouldUseNativeValidation&&o(e,t);let n={};for(let i in e){let o=(0,r.U2)(t.fields,i),a=Object.assign(e[i]||{},{ref:o&&o.ref});if(s(t.names||Object.keys(e),i)){let e=Object.assign({},(0,r.U2)(n,i));(0,r.t8)(e,"root",a),(0,r.t8)(n,i,e)}else(0,r.t8)(n,i,a)}return n},s=(e,t)=>e.some(e=>e.startsWith(t+"."));function l(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),function(i,s,l){try{return Promise.resolve(function(r,a){try{var c=(t.context,Promise.resolve(e["sync"===n.mode?"validateSync":"validate"](i,Object.assign({abortEarly:!1},t,{context:s}))).then(function(e){return l.shouldUseNativeValidation&&o({},l),{values:n.raw?i:e,errors:{}}}))}catch(e){return a(e)}return c&&c.then?c.then(void 0,a):c}(0,function(e){var t;if(!e.inner)throw e;return{values:{},errors:a((t=!l.shouldUseNativeValidation&&"all"===l.criteriaMode,(e.inner||[]).reduce(function(e,n){if(e[n.path]||(e[n.path]={message:n.message,type:n.type}),t){var i=e[n.path].types,o=i&&i[n.type];e[n.path]=(0,r.KN)(n.path,t,e,n.type,o?[].concat(o,n.message):n.message)}return e},{})),l)}}))}catch(e){return Promise.reject(e)}}}},73530:function(e,t,n){"use strict";n.d(t,{qE:function(){return T}});var r=n(82184),i=n(32248),o=n(92552),a=n(14296),s=n(92786),l=n(11728),c=n(39741),d=n(93133),u=n(37288),h=n(2784),p=n(52322);let g="Avatar",[x,f]=(0,a.b)(g),[m,v]=x(g),j="AvatarImage",b=h.forwardRef((e,t)=>{let{__scopeAvatar:n,src:o,onLoadingStatusChange:a=()=>{},...s}=e,d=v(j,n),[g,x]=h.useState("idle"),f=(0,r.Ve)(c.k(d.size,{tokens:i.lz()})?.width);return h.useEffect(()=>{x("idle")},[JSON.stringify(o)]),h.useEffect(()=>{a(g),d.onImageLoadingStatusChange(g)},[g]),(0,p.jsx)(u.FA,{fullscreen:!0,zIndex:1,children:(0,p.jsx)(l.E,{fullscreen:!0,..."number"==typeof f&&!Number.isNaN(f)&&{width:f,height:f},...s,ref:t,src:o,onError:()=>{x("error")},onLoad:()=>{x("loaded")}})})});b.displayName=j;let k="AvatarFallback",w=(0,o.z)(u.FA,{name:k,position:"absolute",fullscreen:!0,zIndex:0}),S=w.extractable(h.forwardRef((e,t)=>{let{__scopeAvatar:n,delayMs:r,...i}=e,o=v(k,n),[a,s]=h.useState(void 0===r);return h.useEffect(()=>{if(void 0!==r){let e=setTimeout(()=>s(!0),r);return()=>clearTimeout(e)}},[r]),a&&"loaded"!==o.imageLoadingStatus?(0,p.jsx)(w,{...i,ref:t}):null}));S.displayName=k;let y=(0,o.z)(d.b,{name:g,position:"relative",overflow:"hidden"}),T=(0,s.$e)(h.forwardRef((e,t)=>{let{__scopeAvatar:n,size:r="$true",...i}=e,[o,a]=h.useState("idle");return(0,p.jsx)(m,{size:r,scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:(0,p.jsx)(y,{size:r,...i,ref:t})})}),{Image:b,Fallback:S});T.displayName=g},47994:function(e,t,n){"use strict";n.d(t,{l0:function(){return m}});var r=n(92552),i=n(30813),o=n(14296),a=n(92786),s=n(52322);let l="Form",c=(0,r.z)(i.Kq,{name:l,tag:"form"}),[d]=(0,o.b)(l),[u,h]=d(l),p="FormTrigger",g=(0,r.z)(i.G7,{name:p}),x=g.styleable((e,t)=>{let{__scopeForm:n,children:r,onPress:i,...o}=e,l=h(p,n);return(0,s.jsx)(g,{tag:"button",...o,ref:t,onPress:(0,a.Mj)(i,l.onSubmit),children:r})}),f=c.extractable(function({onSubmit:e,...t}){return(0,s.jsx)(u,{scope:t.__scopeForm,onSubmit:e,children:(0,s.jsx)(c,{...t,onSubmit:e=>e.preventDefault()})})}),m=(0,a.$e)(f,{Trigger:x})},12397:function(e,t,n){"use strict";n.d(t,{C:function(){return o}});var r=n(92552),i=n(93133);let o=(0,r.z)(i.b,{name:"Circle",circular:!0})},93133:function(e,t,n){"use strict";n.d(t,{b:function(){return a}});var r=n(21701),i=n(92552),o=n(39741);let a=(0,i.z)(r.K,{name:"Square",alignItems:"center",justifyContent:"center",variants:{size:{"...size":o.k,":number":o.k}}})},39741:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});let r=(e,{tokens:t})=>{let n=t.size[e]??e,r=t.size[e]??e;return{width:n,height:r,minWidth:n,maxWidth:n,maxHeight:r,minHeight:r}}},46094:function(e,t,n){"use strict";n.d(t,{d:function(){return c}});var r=n(99810),i=n(2784),o=n(78052);let a={height:800,width:600};o.Z.addEventListener("change",()=>{s.forEach(e=>e(window))});let s=new Set;function l(e){return s.add(e),()=>s.delete(e)}function c({serverValue:e=a}={}){return(0,i.useSyncExternalStore)(l,()=>o.Z.get("window"),()=>r.$L?e:o.Z.get("window"))}},11482:function(e,t,n){"use strict";n.d(t,{y:function(){return i}});var r=n(53529);function i(e){return(0,r.L)(e,Date.now())}},47938:function(e,t,n){"use strict";n.d(t,{k:function(){return o}});var r=n(11482),i=n(75963);function o(e){return(0,i.x)(e,(0,r.y)(e))}},5149:function(e,t,n){"use strict";n.d(t,{X:function(){return o}});var r=n(11482),i=n(95733);function o(e){return(0,i.F)(e,(0,r.y)(e))}},1491:function(e,t,n){"use strict";n.d(t,{z:function(){return o}});var r=n(11482),i=n(26764);function o(e){return(0,i.K)(e,(0,r.y)(e))}},75834:function(e,t,n){"use strict";n.d(t,{P:function(){return a}});var r=n(44145),i=n(11482),o=n(26764);function a(e){return(0,o.K)(e,(0,r.E)((0,i.y)(e),1))}},6783:function(e,t,n){"use strict";n.d(t,{g:function(){return a}});var r=n(11482),i=n(26764),o=n(57606);function a(e){return(0,i.K)(e,(0,o.k)((0,r.y)(e),1))}},24077:function(e,t,n){"use strict";n.d(t,{_:function(){return i}});var r=n(88274);function i(e,t){return(0,r.m)(e,-t)}}},function(e){e.O(0,[4403,8753,7455,1800,5029,4232,8981,5281,1129,6577,244,9362,8501,2888,9774,179],function(){return e(e.s=76833)}),_N_E=e.O()}]);

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.