PageSourceSearch

https://meetborderless.com/build/assets/index-B8KbIw3r.js

js meetborderless.com collected 2026-10-09 22:41:36 UTC 4,484 bytes, 1 lines download raw bytes

1import{j as e}from"./app-C1iegf7Q.js";import{b as x,H as g,L as l,f as m}from"./inertia-BpyZy4w-.js";import{a as b,B as h}from"./admin-layout-BhXWbUlP.js";import{a as c}from"./utils-BiuKVCuu.js";/* empty css            */import"./app-logo-Dz0wogSq.js";import"./logo-light-DU4bWymm.js";import"./flash-toast-C6O0iVL1.js";import"./createLucideIcon-wqc1LSWg.js";import"./info-D2ZN_yLm.js";import"./triangle-alert-C7AVwNi-.js";import"./circle-x-Bp6Mbpgt.js";import"./circle-check-BMWvzPMx.js";import"./x-DQSeRCcH.js";import"./arrow-left-DCX0fhKH.js";import"./menu-BR3Nc3Gr.js";import"./users-BCcupCXV.js";import"./folder-open-I72SPUVk.js";import"./pound-sterling-D16GLaAZ.js";import"./book-open-DVFlG_9t.js";const p={completed:"bg-green/10 text-green-ink",running:"bg-amber/12 text-amber-ink",pending:"bg-amber/12 text-amber-ink",failed:"bg-red/10 text-red",none:"bg-bg-2 text-ink-3"},u={completed:"Done",running:"Running",pending:"Queued",failed:"Failed",none:"Never run"};function f(n){return n?.status??"none"}function j({groups:n}){const[i,r]=x.useState(!1);function a(){r(!0),m.post("/admin/assistants/whatsapp/run-all",{},{onFinish:()=>r(!1)})}return e.jsxs("div",{className:"flex flex-col rounded-card border border-line bg-white p-5 gap-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"mb-1.5 flex items-start justify-between gap-2",children:e.jsx("span",{className:"text-sm font-semibold text-ink",children:"WhatsApp Community Digests"})}),e.jsx("p",{className:"text-xs text-ink-2 leading-relaxed",children:"Weekly roundups for Announcements, Jobs, GTV, and IFV — four independent digests, reviewed together."}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:n.map(t=>e.jsxs("span",{className:c("rounded-tag px-2 py-0.5 text-2xs font-bold",p[t.status]),children:[t.label,": ",u[t.status]]},t.slug))})]}),e.jsxs("div",{className:"flex items-center gap-2 pt-1 border-t border-line-2",children:[e.jsx(l,{href:"/admin/assistants/whatsapp",className:"rounded-md bg-ink px-3 py-1.5 text-xs font-semibold text-white hover:bg-ink/80",children:"View outputs"}),e.jsx("button",{type:"button",onClick:a,disabled:i,className:"rounded-md border border-line px-3 py-1.5 text-xs font-medium text-ink-2 hover:bg-bg disabled:opacity-40",children:i?"Queuing…":"Run all"})]})]})}function Q({assistants:n,whatsappGroups:i}){const[r,a]=x.useState(null);function t(s){a(s),m.post(`/admin/assistants/${s}/run`,{},{onFinish:()=>a(null)})}return e.jsxs(b,{children:[e.jsx(g,{title:"Admin · AI Assistants"}),e.jsxs("div",{className:"px-6 py-7 max-w-4xl",children:[e.jsxs("div",{className:"mb-6 flex items-baseline gap-3",children:[e.jsx(h,{className:"h-5 w-5 text-ink-3 shrink-0"}),e.jsx("h1",{className:"text-lg font-semibold text-ink",children:"AI Assistants"}),e.jsx("span",{className:"text-xs text-ink-3",children:"Each runs on its own weekly schedule"})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[i.length>0&&e.jsx(j,{groups:i}),n.map(s=>{const d=f(s.latest_run),o=r===s.slug;return e.jsxs("div",{className:"flex flex-col rounded-card border border-line bg-white p-5 gap-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-1.5",children:[e.jsx("span",{className:"text-sm font-semibold text-ink",children:s.name}),e.jsx("span",{className:c("shrink-0 rounded-tag px-2 py-0.5 text-2xs font-bold",p[d]),children:u[d]})]}),e.jsx("p",{className:"text-xs text-ink-2 leading-relaxed",children:s.description}),s.latest_run&&e.jsxs("p",{className:"mt-2 text-2xs text-ink-3",children:["Week of ",s.latest_run.week_of_label,s.latest_run.tokens_used&&` · ${s.latest_run.tokens_used.toLocaleString()} tokens`]})]}),e.jsxs("div",{className:"flex items-center gap-2 pt-1 border-t border-line-2",children:[s.latest_run?.status==="completed"?e.jsx(l,{href:`/admin/assistants/${s.slug}`,className:"rounded-md bg-ink px-3 py-1.5 text-xs font-semibold text-white hover:bg-ink/80",children:"View output"}):e.jsx(l,{href:`/admin/assistants/${s.slug}`,className:"rounded-md border border-line px-3 py-1.5 text-xs font-medium text-ink-2 hover:bg-bg",children:"View runs"}),e.jsx("button",{type:"button",onClick:()=>t(s.slug),disabled:o||s.latest_run?.status==="running",className:"rounded-md border border-line px-3 py-1.5 text-xs font-medium text-ink-2 hover:bg-bg disabled:opacity-40",children:o?"Queuing…":"Run now"})]})]},s.slug)})]})]})]})}export{Q 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.