PageSourceSearch

https://client0.ai/build/assets/Show-BefJ_zYC.js

js client0.ai collected 2026-10-05 14:02:39 UTC 7,384 bytes, 1 lines download raw bytes

1import{_ as P}from"./AssistantFormDialog.vue_vue_type_script_setup_true_lang-CKmVj4wu.js";import{_ as w}from"./index-zlZaDU8j.js";import{_ as h}from"./index-CJI8j1s3.js";import{w as R,d as V,s as j,O as B,_ as F,Q as I,R as L}from"./AppLayout.vue_vue_type_script_setup_true_lang-DkXU0oLO.js";import{d as E,M as H,x as O,s as _,c as u,a as r,u as d,h as Z,w as c,f as t,t as n,b as f,o as l,g as p,l as q,F as b,r as Q,n as y}from"./app-CMgbTyix.js";import{c as k}from"./createLucideIcon-DK35lXt2.js";import{S as U}from"./square-pen-BZeAhwbu.js";import{Z as G}from"./zap-BNoYdYF8.js";import"./InputError.vue_vue_type_script_setup_true_lang-B3tzIEN3.js";import"./Input-BLj4Ubob.js";import"./index-BBTz9S6Z.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Label.vue_vue_type_script_setup_true_lang-C68N45kv.js";import"./useForwardExpose-BD36fatX.js";import"./SelectValue.vue_vue_type_script_setup_true_lang-B-SAHOqF.js";import"./useForwardPropsEmits-B9i7ptId.js";import"./Presence-BFTX7RqV.js";import"./Teleport-BW85u_du.js";import"./VisuallyHidden-CxMVyL5f.js";import"./check-D3Bv9TuH.js";import"./DropdownMenuTrigger.vue_vue_type_script_setup_true_lang-CYZUaGE9.js";import"./useFormControl-U7b-JaA2.js";import"./VisuallyHiddenInput-COGiG6-1.js";import"./Textarea.vue_vue_type_script_setup_true_lang--wqWoyVF.js";import"./index-DlqgJH9h.js";import"./SheetTitle.vue_vue_type_script_setup_true_lang-BFggsqKL.js";const J=k("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const K=k("PlayIcon",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]),W={class:"mx-auto w-full max-w-5xl space-y-6 p-6"},X={class:"flex items-start justify-between"},Y={class:"flex items-center gap-3"},tt={class:"text-2xl font-bold"},et={key:0,class:"mt-1 text-sm text-muted-foreground"},st={class:"flex gap-2"},ot={class:"grid grid-cols-1 gap-4 md:grid-cols-3"},at={class:"rounded-lg border p-4"},it={class:"rounded-lg border p-4"},nt={class:"flex items-center gap-2"},rt={class:"text-sm"},dt={class:"mt-1 text-xs text-muted-foreground"},ut={class:"rounded-lg border p-4"},lt={class:"text-sm"},ct={class:"rounded-lg border p-4"},mt={class:"text-sm whitespace-pre-wrap"},ft={class:"space-y-4"},gt={key:0,class:"rounded-lg border border-dashed p-8 text-center"},pt={key:1,class:"space-y-2"},vt=["onClick"],xt={class:"flex items-center gap-3"},ht={class:"text-sm text-muted-foreground"},_t={class:"text-sm text-muted-foreground"},wt={key:0,class:"border-t p-4"},bt={key:0,class:"space-y-2"},yt=["srcdoc"],kt={key:1,class:"max-h-96 overflow-auto rounded-md bg-muted p-3 text-sm whitespace-pre-wrap"},zt={key:1,class:"space-y-2"},Ct={class:"max-h-48 overflow-auto rounded-md bg-destructive/10 p-3 text-sm whitespace-pre-wrap text-destructive"},Xt=E({__name:"Show",props:{organization:{},workspace:{},automation:{},runs:{},assistants:{},canManageAssistants:{type:Boolean}},setup(o){const a=o,z=R(a.assistants,a.canManageAssistants);H(()=>a.assistants,i=>{z.assistants.value=i});const C=O(()=>[{title:a.organization.name,href:V.url(a.organization.uuid)},{title:a.workspace.name,href:j.url({organization:a.organization.uuid,workspace:a.workspace.uuid})},{title:a.automation.name,href:"#"}]),v=_(!1),g=_(!1),x=_(null);function $(i){switch(i){case"success":return"default";case"failed":return"destructive";case"skipped":return"destructive";case"running":return"secondary";case"pending":return"outline";default:return"secondary"}}function A(i){return i.charAt(0).toUpperCase()+i.slice(1)}function S(i){return i?new Date(i).toLocaleString():"-"}function N(i){return/^\s*<(!doctype\s+html|[a-z][a-z0-9]*)[\s>]/i.test(i)}function T(i,e){if(!i||!e)return"-";const s=new Date(e).getTime()-new Date(i).getTime();if(s<1e3)return`${s}ms`;const m=Math.floor(s/1e3);return m<60?`${m}s`:`${Math.floor(m/60)}m ${m%60}s`}function D(){v.value=!0,y.post(I.url({organization:a.organization.uuid,workspace:a.workspace.uuid,automation:a.automation.uuid}),{},{preserveState:!0,onFinish:()=>{v.value=!1}})}function M(){g.value=!0,y.post(L.url({organization:a.organization.uuid,workspace:a.workspace.uuid,automation:a.automation.uuid}),{},{preserveState:!0,onFinish:()=>{g.value=!1}})}return(i,e)=>(l(),u(b,null,[r(d(Z),{title:o.automation.name},null,8,["title"]),r(F,{breadcrumbs:C.value},{default:c(()=>[t("div",W,[t("div",X,[t("div",null,[t("div",Y,[t("h1",tt,n(o.automation.name),1),r(d(w),{variant:o.automation.is_active?"default":"secondary"},{default:c(()=>[f(n(o.automation.is_active?"Active":"Inactive"),1)]),_:1},8,["variant"])]),o.automation.description?(l(),u("p",et,n(o.automation.description),1)):p("",!0)]),t("div",st,[r(d(h),{variant:"outline",size:"sm",onClick:M,disabled:g.value},{default:c(()=>[r(d(K),{class:"mr-1 h-4 w-4"}),f(" "+n(g.value?"Triggering...":"Run Now"),1)]),_:1},8,["disabled"]),r(d(h),{variant:"outline",size:"sm",onClick:D,disabled:v.value},{default:c(()=>[f(n(o.automation.is_active?"Pause":"Activate"),1)]),_:1},8,["disabled"]),r(d(h),{variant:"outline",size:"sm","as-child":""},{default:c(()=>[r(d(q),{href:d(B).url({organization:o.organization.uuid,workspace:o.workspace.uuid,automation:o.automation.uuid})},{default:c(()=>[r(d(U),{class:"mr-1 h-4 w-4"}),e[0]||(e[0]=f(" Edit ",-1))]),_:1},8,["href"])]),_:1})])]),t("div",ot,[t("div",at,[e[1]||(e[1]=t("div",{class:"mb-1 text-sm font-medium text-muted-foreground"}," Assistant ",-1)),t("div",null,n(o.automation.assistant_name),1)]),t("div",it,[e[2]||(e[2]=t("div",{class:"mb-1 text-sm font-medium text-muted-foreground"}," Schedule ",-1)),t("div",nt,[r(d(J),{class:"h-4 w-4"}),t("code",rt,n(o.automation.trigger_config.cron),1)]),t("div",dt,n(o.automation.trigger_config.timezone),1)]),t("div",ut,[e[3]||(e[3]=t("div",{class:"mb-1 text-sm font-medium text-muted-foreground"}," Delivery ",-1)),t("div",lt,n(o.automation.delivery_config.recipients?.join(", ")),1)])]),t("div",ct,[e[4]||(e[4]=t("div",{class:"mb-2 text-sm font-medium text-muted-foreground"}," Prompt ",-1)),t("pre",mt,n(o.automation.prompt),1)]),t("div",ft,[e[8]||(e[8]=t("div",{class:"flex items-center justify-between"},[t("h2",{class:"text-lg font-semibold"},"Run History")],-1)),o.runs.length===0?(l(),u("div",gt,[r(d(G),{class:"mx-auto h-8 w-8 text-muted-foreground"}),e[5]||(e[5]=t("p",{class:"mt-2 text-sm text-muted-foreground"},' No runs yet. Click "Run Now" to trigger manually. ',-1))])):(l(),u("div",pt,[(l(!0),u(b,null,Q(o.runs,s=>(l(),u("div",{key:s.uuid,class:"rounded-lg border"},[t("button",{class:"flex w-full items-center justify-between p-4 text-left transition-colors hover:bg-accent",onClick:m=>x.value=x.value===s.uuid?null:s.uuid}
1,[t("div",xt,[r(d(w),{variant:$(s.status)},{default:c(()=>[f(n(A(s.status)),1)]),_:2},1032,["variant"]),t("span",ht,n(S(s.created_at)),1)]),t("span",_t,n(T(s.started_at,s.completed_at)),1)],8,vt),x.value===s.uuid?(l(),u("div",wt,[s.output?(l(),u("div",bt,[e[6]||(e[6]=t("div",{class:"text-sm font-medium"},"Output",-1)),N(s.output)?(l(),u("iframe",{key:0,srcdoc:s.output,sandbox:"",title:"Automation run output",class:"h-96 w-full rounded-md border bg-white"},null,8,yt)):(l(),u("pre",kt,n(s.output),1))])):p("",!0),s.error?(l(),u("div",zt,[e[7]||(e[7]=t("div",{class:"text-sm font-medium text-red-500"}," Error ",-1)),t("pre",Ct,n(s.error),1)])):p("",!0)])):p("",!0)]))),128))]))])]),r(P)]),_:1},8,["breadcrumbs"])],64))}});export{Xt 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.