PageSourceSearch

https://uptrack.app/assets/chat-D5UaU0fe.js

js uptrack.app collected 2026-09-25 22:30:35 UTC 5,405 bytes, 2 lines download raw bytes

1import{i as y,k as j,r as o,j as e,c as N,B as b,L as w,A as k,S as v}from"./main-B6ad0HGq.js";import{S}from"./send-DzjLaYrv.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"ea1ea076f7ba40168896c271d7eb9ff92aaf9cd8"};var a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="876e0701-627d-481b-90f7-77d4f0b2f806",t._sentryDebugIdIdentifier="sentry-dbid-876e0701-627d-481b-90f7-77d4f0b2f806")}catch{}})();const E=y({method:"POST"}).handler(j("55337b18ca173d7ec12d6876453962bc5ca2c62d4db2468ac06fb818c13fea2c")),A=["What's included in the free plan?","How does Uptrack compare to UptimeRobot?","What monitor types do you support?","How does alert confirmation work?"];function D(){const[t,a]=o.useState([]),[n,l]=o.useState(""),[s,i]=o.useState(!1),[d,u]=o.useState(null),[h,g]=o.useState(null),x=o.useRef(null);o.useEffect(()=>{x.current?.scrollTo({top:x.current.scrollHeight,behavior:"smooth"})},[t.length,s]);async function f(r){const m=r.trim();if(!m||s)return;const p=[...t,{role:"user",content:m}];a(p),l(""),i(!0),u(null);try{const c=await E({data:{messages:p}});a([...p,{role:"assistant",content:c.reply}]),g(c.intent??null)}catch(c){u(c instanceof Error?c.message:"Something went wrong")}finally{i(!1)}}return e.jsxs("div",{className:"dark flex min-h-screen flex-col bg-background text-foreground",children:[e.jsx(N,{}),e.jsx("main",{className:"flex-1",children:e.jsxs("section",{className:"container mx-auto max-w-3xl px-4 py-12",children:[e.jsxs("div",{className:"mb-8 text-center",children:[e.jsx("h1",{className:"mb-2 text-3xl font-bold tracking-tight sm:text-4xl",children:"Ask Uptrack"}),e.jsx("p",{className:"mx-auto max-w-xl text-sm text-muted-foreground",children:"Questions about features, pricing, or how Uptrack compares to other tools? Ask away — no signup required."})]}),e.jsx("div",{ref:x,className:"mb-4 max-h-[60vh] overflow-y-auto rounded-lg border border-border/50 bg-card/50 p-4",children:t.length===0&&!s?e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Try one of these:"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:A.map(r=>e.jsx("button",{type:"button",onClick:()=>{f(r)},className:"rounded-full border border-border/50 bg-secondary/50 px-3 py-1.5 text-xs font-medium transition-colors hover:border-primary/40 hover:text-primary",children:r},r))})]}):e.jsxs("ul",{className:"space-y-4",children:[t.map((r,m)=>e.jsx("li",{className:`flex ${r.role==="user"?"justify-end":"justify-start"}`,children:e.jsx("div",{className:`max-w-[85%] rounded-lg px-4 py-2.5 text-sm leading-relaxed ${r.role==="user"?"bg-primary text-primary-foreground":"border border-border/50 bg-background"}`,children:r.role==="assistant"?e.jsx(I,{text:r.content}):r.content})},m)),s&&e.jsx("li",{className:"flex justify-start",children:e.jsx("div",{className:"rounded-lg border border-border/50 bg-background px-4 py-2.5 text-sm text-muted-foreground",children:e.jsx(R,{})})})]})}),d&&e.jsx("div",{className:"mb-3 rounded-md border border-status-down/30 bg-status-down/5 px-3 py-2 text-sm text-status-down",children:d}),e.jsxs("form",{onSubmit:r=>{r.preventDefault(),f(n)},className:"flex gap-2",children:[e.jsx("input",{type:"text","aria-label":"Ask about Uptrack",value:n,onChange:r=>l(r.target.value),placeholder:"Ask about features, pricing, integrations…",maxLength:2e3,disabled:s,className:"flex-1 rounded-md border border-border/60 bg-background px-3 py-2 text-sm focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary disabled:opacity-50"}),e.jsxs(b,{type:"submit",disabled:s||n.trim().length===0,children:[e.jsx(S,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Send"})]})]}),h==="lead"&&t.length>0&&e.jsxs("div",{className:"mt-6 rounded-lg border border-primary/30 bg-primary/5 p-4",children:[e.jsx("p",{className:"mb-3 text-sm font-medium",children:"Ready to try Uptrack?"}),e.jsx("p",{className:"mb-4 text-sm text-foreground/70",children:"10 free monitors at 30s. No credit card required."}),e.jsx(b,{asChild:!0,children:e.jsxs(w,{to:"/signup",children:["Start Monitoring Free",e.jsx(k,{className:"ml-2 h-4 w-4"})]})})]}),e.jsxs("p",{className:"mt-6 text-center text-xs text-muted-foreground",children:["Answers are AI-generated from public Uptrack documentation. For complex questions, email ",e.jsx("a",{href:"mailto:[email protected]",className:"underline",children:"[email protected]"}),"."]})]})}),e.jsx(v,{})]})}function R(){return e.jsxs("span",{className:"inline-flex gap-1",children:[e.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-current [animation-delay:-0.3s]"}),e.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-current [animation-delay:-0.15s]"}),e.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-current"})]})}function I({text:t}){const a=t.split(/(\[[^\]]+\]\([^)]+\))/g);return e.jsx("span",{className:"whitespace-pre-wrap",children:a.map((n,l)=>{const s=n.match(/^\[([^\]]+)\]\(([^)]+)\)$/);if(s){const[,i,d]=s,u=!d.startsWith("/");return e.jsx("a",{href:d,...u?{target:"_blank",rel:"noopener noreferrer"}:{},className:"text-primary underline",children:i},l)}return e.jsx("span",{children:n},l)})})}export{D as component};
2//# sourceMappingURL=chat-D5UaU0fe.js.map

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.