PageSourceSearch

https://app.aeqi.ai/assets/CompanyEventDetailPage-C9BKesv_.js

js aeqi.ai collected 2026-10-05 15:20:29 UTC 12,054 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/StepDetail-CZ1JLNGl.js","assets/react-vendor-DhKRNgCF.js","assets/vite-runtime-DdPMya_n.js","assets/index-x-ynt_mA.js","assets/index-BFxEL-9l.css","assets/AppLayoutEntry-DAXBezYD.js","assets/AccountControl-DTzTxKrK.js","assets/Popover-BqGzTl2s.js","assets/Popover-CC9FfptG.css","assets/IconButton-8wJ0YnPU.js","assets/IconButton-LhRtc4Bm.css","assets/AccountControl-BPf06U_h.css","assets/main-5X1ljm9O.js","assets/toastStore-BQAR76Tw.js","assets/toastStore-BL3SLQVN.css","assets/Inline-BtpmlJyj.js","assets/Inline-DmqFsfac.css","assets/main-B4cs8gM5.css","assets/useQuery-CMqcCWeO.js","assets/Meter-Bb0oVAP5.js","assets/Meter-DcgJxqm8.css","assets/trial-Cqrutr3v.js","assets/settings-Cz_bZVxX.js","assets/settle-CAm2px29.js","assets/settle-BQr_jSPD.css","assets/Tooltip-B2TEhq0J.js","assets/Tooltip-Dz0PiKht.css","assets/keys-BjRLFhcH.js","assets/firstRun-DgUs7tFn.js","assets/Stat-In2LDOuF.js","assets/Stat-DrISOi_M.css","assets/Dialog-FeH18WmV.js","assets/x-COoA-pMz.js","assets/Dialog-CAXWKU23.css","assets/Banner-BC3mpD28.js","assets/Banner-D-99wptp.css","assets/companies-CPJyzNEm.js","assets/ideas-4udUJ06Z.js","assets/SegmentedControl-DmfR_PrG.js","assets/SegmentedControl-9dWr_1qn.css","assets/AppLayoutEntry-Bt_ylZtJ.css","assets/layout-CLxGJgUu.css","assets/StepDetail-TZXI7Y98.css","assets/TestTriggerPanel-2-2OMV40.js","assets/Select-B9HKEdju.js","assets/search-6-T2OhHv.js","assets/lock-C7xbDgT3.js","assets/Select-BkvhUWJw.css","assets/Tag-DxRsYABe.js","assets/Tag-Bo0Hieam.css","assets/CopyButton-BTGNyXUH.js","assets/useClipboard-jXMCbKUC.js","assets/copy-BvQ7faF_.js","assets/TestTriggerPanel-BDGZDgMM.css"])))=>i.map(i=>d[i]);
2import{_ as ne}from"./vite-runtime-DdPMya_n.js";import{r,j as e,L as D,g as he}from"./react-vendor-DhKRNgCF.js";import{i as ae,bN as d,B as q,a1 as me,s as l,b_ as pe,X as g,o as A,q as M,cd as O,t as P,F as B}from"./index-x-ynt_mA.js";import{eK as ge,dL as se,c as xe,eL as J,ey as fe,eC as ve,eD as je,eG as be,eM as Ne,eN as Ce}from"./AppLayoutEntry-DAXBezYD.js";import{e as Se}from"./keys-BjRLFhcH.js";import{e as re}from"./main-5X1ljm9O.js";import{f as _e}from"./spend-Ata5sTWt.js";import{u as we}from"./useCompanyAgents-LI0ccrmh.js";import{i as ye,h as ke,H as Ee}from"./eventHealth-CgMKbZRD.js";import{d as i}from"./detailRoom.module-DFks5Fjw.js";import{D as L,b as Te,a as E}from"./DocSection-BZo5B6Gh.js";import{I as De}from"./Inline-BtpmlJyj.js";import{b as Le,c as $e,e as Y,a as ee}from"./audience-DeOuqHfU.js";import{M as Fe,c as T}from"./Page-CkCyrQ7A.js";import{F as b}from"./Stat-In2LDOuF.js";import{W as z}from"./Well-D9_wJdOY.js";/* empty css               */import"./AccountControl-DTzTxKrK.js";import"./Popover-BqGzTl2s.js";import"./IconButton-8wJ0YnPU.js";import"./useQuery-CMqcCWeO.js";import"./Meter-Bb0oVAP5.js";import"./trial-Cqrutr3v.js";import"./settings-Cz_bZVxX.js";import"./settle-CAm2px29.js";import"./Tooltip-B2TEhq0J.js";import"./firstRun-DgUs7tFn.js";import"./toastStore-BQAR76Tw.js";import"./Dialog-FeH18WmV.js";import"./x-COoA-pMz.js";import"./Banner-BC3mpD28.js";import"./companies-CPJyzNEm.js";import"./ideas-4udUJ06Z.js";import"./SegmentedControl-DmfR_PrG.js";const Re=r.lazy(()=>ne(()=>import("./StepDetail-CZ1JLNGl.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42])));function Ie(s){return s.finished_at?ye(s.status)?"failed":s.status.toLowerCase():"running"}function We({event:s,companyId:o}){const x=ae(a=>a.entities),[p,_]=r.useState(null),c=ge(s.name,s.pattern),N=c.data??[];return e.jsxs(L,{title:"Sessions",margin:e.jsx(Te,{children:"The conversations this behaviour ran in — every recorded firing, newest first."}),children:[c.isLoading&&e.jsx("p",{className:i.loadingNote,role:"status",children:"Reading the trace…"}),c.isError&&!c.isLoading&&e.jsx("p",{className:i.errorNote,role:"alert",children:"Couldn't load the firing trace."}),!c.isLoading&&!c.isError&&N.length===0&&e.jsx("p",{className:i.sectionNote,children:s.fire_count>0?"It has fired, but no firing has a recorded trace yet.":"It hasn't fired yet, so it has touched no session."}),N.map(a=>{const f=se(a.started_at);return e.jsx(d,{variant:"row",label:f,value:Ie(a),live:!a.finished_at,open:p===a.id,right:e.jsxs(De,{gap:"2",children:[e.jsx(q,{variant:"quiet",size:"sm","aria-label":`Steps for the firing at ${f}`,"aria-expanded":p===a.id,onClick:()=>_(p===a.id?null:a.id),children:"Steps"}),e.jsxs(D,{to:re(x,o,"sessions",a.session_id),className:i.docAction,"aria-label":`Open session for the firing at ${f}
2`,children:["Open session ",e.jsx("span",{"aria-hidden":!0,children:"→"})]})]}),children:p===a.id&&e.jsx(r.Suspense,{fallback:e.jsx("p",{className:i.loadingNote,role:"status",children:"Reading the steps…"}),children:e.jsx(Re,{invocationId:a.id,onClose:()=>_(null)})})},a.id)})]})}const Ae=r.lazy(()=>ne(()=>import("./TestTriggerPanel-2-2OMV40.js"),__vite__mapDeps([43,1,2,3,4,15,16,9,10,32,44,7,8,45,25,26,46,47,48,49,50,13,14,51,52,53])));function Me(s){const o=Object.keys(s??{});return o.length===0?"no arguments":o.length<=3?o.join(", "):`${o.slice(0,3).join(", ")} +${g(o.length-3)}`}function te(s){if(s<=0)return"none";if(s<60)return`${g(s)}s`;const o=s/60;if(Number.isInteger(o)&&o<60)return`${g(o)}m`;const x=s/3600;return Number.isInteger(x)?`${g(x)}h`:`${g(s)}s`}function jt({companyId:s,eventId:o}){const x=he(),p=me(),_=ae(n=>n.entities),{agentIds:c,nameOf:N}=we(s),[a,f]=r.useState(!1),[h,C]=r.useState(null),[v,$]=r.useState(null),[u,w]=r.useState(""),[F,H]=r.useState(!1),{events:K,isLoading:ie,isError:oe}=xe(c),t=r.useMemo(()=>K.find(n=>n.id===o)??null,[K,o]),y=re(_,s,"workflows"),U=r.useCallback(()=>{for(const n of c)p.invalidateQueries({queryKey:Se.byAgent(n)})},[c,p]),R=r.useCallback((n,m)=>{C(null),w(m),$(j=>j===n?null:n)},[]),I=r.useCallback(()=>{C(null),$(null)},[]),k=r.useCallback(async(n,m)=>{f(!0),C(null);try{return await n(),U(),!0}catch(j){return C(j instanceof Error?j.message:m),!1}finally{f(!1)}},[U]),W=r.useCallback((n,m)=>{if(!a){if(!m){C("That cannot be empty.");return}t&&k(()=>J(t.id,n),"Could not save this behaviour.").then(j=>{j&&$(null)})}},[a,t,k]);if(ie&&!t)return e.jsx("div",{className:l.formRoom,children:e.jsxs("div",{className:l.docContent,"aria-busy":"true",children:[e.jsx(D,{to:y,className:i.docBack,children:"← Workflows"}),e.jsx(E,{title:"State",rows:3}),e.jsx(E,{title:"Trigger",rows:4}),e.jsx(E,{title:"Steps",rows:2}),e.jsx(E,{title:"Sessions",rows:3})]})});if(!t)return e.jsx("div",{className:l.formRoom,children:e.jsxs("div",{className:l.docContent,children:[e.jsx(D,{to:y,className:i.docBack,children:"← Workflows"}),e.jsx("p",{className:i.emptyNote,role:"status",children:oe?"Couldn't load this behaviour — check your connection and refresh.":"This behaviour no longer exists — it was deleted, or the link points at another company."})]})});const S=fe(t),le=ke(t),ce=n=>N(n)??n,V=t.optouts??[],G=Le($e(t,N),"full"),de=V.length>0?` (opted out: ${V.map(ce).join(", ")})`:"",Q=t.total_cost_credits??Math.round((t.total_cost_usd||0)*pe),X=t.error_count??0,Z=t.tool_calls??[],ue=S==="routines"&&t.enabled?t.next_fire_at?ve(new Date(t.next_fire_at)):je(t.pattern):null;return e.jsx("div",{className:l.formRoom,children:e.jsxs("div",{className:l.docContent,children:[e.jsx(D,{to:y,className:i.docBack,children:"← Workflows"}),e.jsxs("div",{className:l.docHead,children:[e.jsxs("div",{className:l.pageTitleWrap,children:[e.jsxs("h1",{className:l.pageTitle,children:["When ",Y(t)," → ",ee(t)]}),e.jsxs("p",{className:`${l.pageLede} ${i.lede}`,children:[e.jsx(Ee,{health:le,size:"md",className:i.ledeDot}),e.jsx("span",{className:i.ledeName,children:t.name}),e.jsxs("span",{children:[t.enabled?"enabled":"disabled"," · reaches ",G]})]})]}),e.jsx(q,{type:"button",variant:t.enabled?"secondary":"primary",size:"sm",disabled:a,onClick:()=>{a||k(()=>J(t.id,{enabled:!t.enabled}),"Could not change this workflow.")},children:a?"Working…":t.enabled?"Disable":"Enable"})]}),e.jsxs(Fe,{columns:4,className:l.docVitals,children:[e.jsx(T,{label:"Fires",value:e.jsx(b,{children:g(t.fire_count)}),detail:t.last_fired?`last ${se(t.last_fired)}`:"never run"}),e.jsx(T,{label:"Failures",value:e.jsx(b,{children:g(X)}),detail:X>0?"needs a look":"clean"}),e.jsx(T,{label:S==="routines"?"Next run":"Cooldown",value:S==="routines"?e.jsx(b,{children:ue??"—"}):e.jsx(b,{children:te(t.cooldown_secs)}),detail:S==="routines"?be(t.pattern):"between fires"}),e.jsx(T,{label:"Spend",value:e.jsx(b,{children:Q>0?_e(Q):"0"}),detail:"runtime credits"})]}),h&&e.jsx("p",{className:i.errorNote,role:"alert",children:h}),e.jsxs(L,{title:"Trigger",margin:e.jsx("p",{className:l.docMarginNote,children:"The pattern is the machine truth; a cron pattern is read in UTC and shown on your clock."}),children:[e.jsx(d,{variant:"row",label:"When",value:Y(t)}),e.jsx(d,{variant:"row",label:"Then",value:ee(t)}),e.jsx(d,{variant:"row",label:"Pattern",value:t.pattern,mono:!0,action:"Change","aria-label":"Change pattern",open:v==="pattern",onAction:()=>R("pattern",t.pattern),children:v==="pattern"&&e.jsx(A,{surface:"plinth",children:e.jsxs(M,{gap:"3",children:[e.jsx(O,{children:"The runtime signal or `schedule:<cron>` this behaviour subscribes to. It fires on the new pattern from the next matching signal."}),e.jsx(P,{mono:!0,value:u,"aria-label":"Pattern",onChange:n=>w(n.target.value)}),h&&e.jsx(B,{children:h}),e.jsx(z,{saveLabel:a?"Saving…":"Save pattern",onSave:()=>W({pattern:u.trim()},!!u.trim()),onCancel:I})]})})}),S==="routines"&&e.jsx(d,{variant:"row",label:"Cadence",value:Ne(t.pattern)}),e.jsx(d,{variant:"row",label:"Cooldown",value:te(t.cooldown_secs),action:"Change","aria-label":"Change cooldown",open:v==="cooldown",onAction:()=>R("cooldown",String(t.cooldown_secs)),children:v==="cooldown"&&e.jsx(A,{surface:"plinth",children:e.jsxs(M,{gap:"3",children:[e.jsx(O,{children:"Seconds the runtime waits before letting this behaviour fire again. Zero means every matching signal fires it."}),e.jsx(P,{mono:!0,inputMode:"numeric",value:u,"aria-label":"Cooldown in seconds",onChange:n=>w(n.target.value.replace(/[^0-9]/g,""))}),h&&e.jsx(B,{children:h}),e.jsx(z,{saveLabel:a?"Saving…":"Save cooldown",onSave:()=>W({cooldown_secs:Number(u||"0")},u.trim()!==""),onCancel:I})]})})}),e.jsx(d,{variant:"row",label:"Reaches",value:`${G}${de}`}),e.jsx(d,{variant:"row",label:"Name",value:t.name,mono:!0,action:"Change","aria-label":"Change name",open:v==="name",onAction:()=>R("name",t.name),children:v==="name"&&e.jsx(A,{surface:"plinth",children:e.jsxs(M,{gap:"3",children:[e.jsx(O,{children:"The behaviour's own i
2d in the trace and in the runtime's logs. Renaming it does not change what it does."}),e.jsx(P,{mono:!0,value:u,"aria-label":"Name",onChange:n=>w(n.target.value)}),h&&e.jsx(B,{children:h}),e.jsx(z,{saveLabel:a?"Saving…":"Save name",onSave:()=>W({name:u.trim()},!!u.trim()),onCancel:I})]})})})]}),e.jsxs(L,{title:"Steps",children:[Z.length===0?e.jsx("p",{className:i.sectionNote,children:"Observes only — it never acts on its own."}):Z.map((n,m)=>e.jsx(d,{variant:"row",label:e.jsx(b,{children:`Call ${m+1}`}),value:n.tool||"unknown tool",right:e.jsx("span",{className:i.sectionNote,children:Me(n.args)})},`${n.tool}-${m}`)),e.jsx(d,{variant:"row",label:"Test this behaviour",value:"Dry-run the chain against one agent — nothing is stored.",action:"Test",open:F,onAction:()=>H(!F),children:F&&e.jsx(r.Suspense,{fallback:e.jsx("p",{className:i.loadingNote,children:"Opening the test panel…"}),children:e.jsx(Ae,{event:t,agentId:t.agent_id??c[0],onClose:()=>H(!1)})})})]}),e.jsx(We,{event:t,companyId:s}),e.jsx(L,{children:e.jsx(d,{variant:"row",label:"Delete this behaviour",value:"It stops firing immediately and its trace is kept.",right:e.jsx(q,{variant:"secondary",tone:"critical",size:"sm",disabled:a,onClick:()=>{a||k(()=>Ce(t.id),"Could not delete this behaviour.").then(n=>{n&&x(y,{replace:!0})})},children:"Delete"})})})]})})}export{jt as default};

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.