PageSourceSearch

https://bakedbot.ai/_next/static/chunks/53102.f7b9bbfeed903862.js

js bakedbot.ai collected 2026-10-05 11:52:11 UTC 12,792 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[53102],{18349:(e,s,a)=>{a.d(s,{T:()=>d});var l=a(95155),t=a(12115),r=a(40980);let d=t.forwardRef(({className:e,...s},a)=>(0,l.jsx)("textarea",{className:(0,r.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...s}));d.displayName="Textarea"},25221:(e,s,a)=>{a.d(s,{A:()=>l});let l=(0,a(6404).A)("flask-conical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]])},29991:(e,s,a)=>{a.d(s,{bq:()=>m,eb:()=>f,gC:()=>h,l6:()=>o,yv:()=>x});var l=a(95155),t=a(12115),r=a(42695),d=a(66088),n=a(9921),i=a(94514),c=a(40980);let o=r.bL;r.YJ;let x=r.WT,m=t.forwardRef(({className:e,children:s,...a},t)=>(0,l.jsxs)(r.l9,{ref:t,className:(0,c.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
1ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...a,children:[s,(0,l.jsx)(r.In,{asChild:!0,children:(0,l.jsx)(d.A,{className:"h-4 w-4 opacity-50"})})]}));m.displayName=r.l9.displayName;let u=t.forwardRef(({className:e,...s},a)=>(0,l.jsx)(r.PP,{ref:a,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",e),...s,children:(0,l.jsx)(n.A,{className:"h-4 w-4"})}));u.displayName=r.PP.displayName;let p=t.forwardRef(({className:e,...s},a)=>(0,l.jsx)(r.wn,{ref:a,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",e),...s,children:(0,l.jsx)(d.A,{className:"h-4 w-4"})}));p.displayName=r.wn.displayName;let h=t.forwardRef(({className:e,children:s,position:a="popper",...t},d)=>(0,l.jsx)(r.ZL,{children:(0,l.jsxs)(r.UC,{ref:d,className:(0,c.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...t,children:[(0,l.jsx)(u,{}),(0,l.jsx)(r.LM,{className:(0,c.cn)("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),(0,l.jsx)(p,{})]})}));h.displayName=r.UC.displayName,t.forwardRef(({className:e,...s},a)=>(0,l.jsx)(r.JU,{ref:a,className:(0,c.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...s})).displayName=r.JU.displayName;let f=t.forwardRef(({className:e,children:s,...a},t)=>(0,l.jsxs)(r.q7,{ref:t,className:(0,c.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,l.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,l.jsx)(r.VF,{children:(0,l.jsx)(i.A,{className:"h-4 w-4"})})}),(0,l.jsx)(r.p4,{children:s})]}));f.displayName=r.q7.displayName,t.forwardRef(({className:e,...s},a)=>(0,l.jsx)(r.wv,{ref:a,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",e),...s})).displayName=r.wv.displayName},53102:(e,s,a)=>{a.r(s),a.d(s,{default:()=>y});var l=a(95155),t=a(12115),r=a(81477),d=a(89239),n=a(18349),i=a(45160),c=a(29991),o=a(33807),x=a(9921),m=a(66088),u=a(25221),p=a(6296),h=a(53961),f=a(94290);let j={1:{label:"Generate",color:"bg-blue-100 text-blue-800"},2:{label:"Critique",color:"bg-amber-100 text-amber-800"},3:{label:"Revise",color:"bg-emerald-100 text-emerald-800"}},g={speed_to_comprehension:"Speed",revenue_clarity:"Revenue",operator_voice:"Voice",compliance:"Compliance",action_clarity:"Action",hallucination_risk:"Accuracy",tool_utilization:"Tools"};function b({label:e,value:s}){let a=s>=8?"bg-emerald-100 text-emerald-800":s>=6?"bg-amber-100 text-amber-800":"bg-red-100 text-red-800";return(0,l.jsxs)("div",{className:`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium ${a}`,children:[(0,l.jsx)("span",{children:e}),(0,l.jsxs)("span",{className:"font-bold",children:[s,"/10"]})]})}function N({result:e,defaultOpen:s}){let[a,r]=(0,t.useState)(s),d=j[e.round]??{label:`Round ${e.round}`,color:"bg-gray-100 text-gray-800"};return(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,l.jsxs)("button",{onClick:()=>r(e=>!e),className:"w-full flex items-center justify-between px-4 py-3 bg-muted/30 hover:bg-muted/50 transition-colors text-left",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:`text-xs font-bold px-2 py-0.5 rounded-full ${d.color}`,children:d.label}),(0,l.jsxs)("span",{className:"text-xs text-muted-foreground",children:[(e.durationMs/1e3).toFixed(1),"s \xb7 ",e.output.length," chars"]})]}),a?(0,l.jsx)(x.A,{className:"h-4 w-4 text-muted-foreground"}):(0,l.jsx)(m.A,{className:"h-4 w-4 text-muted-foreground"})]}),a&&(0,l.jsx)("div",{className:"p-4 prose prose-sm max-w-none text-sm whitespace-pre-wrap font-mono bg-background",children:e.output})]})}function y(){let[e,s]=(0,t.useState)(""),[a,x]=(0,t.useState)("3"),[m,j]=(0,t.useState)("flash"),[y,v]=(0,t.useState)(!0),[w,C]=(0,t.useState)(!1),[k,R]=(0,t.useState)(null),[S,A]=(0,t.useState)(null);async function T(){if(e.trim()){C(!0),A(null),R(null);try{let s=await fetch("/api/ai/research",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:e,rounds:parseInt(a,10),model:m,judgeEnabled:y}),credentials:"include"});if(!s.ok){let e=await s.json().catch(()=>({error:"Request failed"}));throw Error(e.error??`HTTP ${s.status}`)}let l=await s.json();R(l)}catch(e){A(e instanceof Error?e.message:String(e))}finally{C(!1)}}}return(0,l.jsxs)("div",{className:"space-y-6 max-w-4xl mx-auto py-6 px-4",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("div",{className:"h-10 w-10 rounded-xl bg-emerald-950 flex items-center justify-center flex-shrink-0",children:(0,l.jsx)(u.A,{className:"h-5 w-5 text-emerald-400"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-xl font-bold",children:"Buzzkill Brad"}),(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:"AutoResearch loop \xb7 DeepSeek synthesis \xb7 Claude/Gemini judge \xb7 Same experience as Thrive inbox"})]}),(0,l.jsx)(i.E,{variant:"outline",className:"ml-auto text-xs",children:"Super User only"})]}),(0,l.jsxs)(r.Zp,{children:[(0,l.jsxs)(r.aR,{className:"pb-3",children:[(0,l.jsx)(r.ZB,{className:"text-base",children:"Research Task"}),(0,l.jsx)(r.BT,{className:"text-xs",children:"Brad runs Generate → Critique → Revise, then Claude (Gemini fallback) scores the final output."})]}),(0,l.jsxs)(r.Wu,{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"space-y-1.5",children:[(0,l.jsx)(o.J,{htmlFor:"prompt",children:"Prompt"}),(0,l.jsx)(n.T,{id:"prompt",placeholder:"e.g. Design the highest-impact outreach strategy for Thrive Syracuse this week. Include which tools to use and a dollar estimate.",value:e,onCh
1ange:e=>s(e.target.value),rows:5,className:"resize-none font-mono text-sm"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,l.jsxs)("div",{className:"space-y-1.5",children:[(0,l.jsx)(o.J,{children:"Rounds"}),(0,l.jsxs)(c.l6,{value:a,onValueChange:x,children:[(0,l.jsx)(c.bq,{className:"h-8 text-xs",children:(0,l.jsx)(c.yv,{})}),(0,l.jsx)(c.gC,{children:[1,2,3,5,10].map(e=>(0,l.jsxs)(c.eb,{value:String(e),children:[e," round",1!==e?"s":""]},e))})]})]}),(0,l.jsxs)("div",{className:"space-y-1.5",children:[(0,l.jsx)(o.J,{children:"Model"}),(0,l.jsxs)(c.l6,{value:m,onValueChange:j,children:[(0,l.jsx)(c.bq,{className:"h-8 text-xs",children:(0,l.jsx)(c.yv,{})}),(0,l.jsxs)(c.gC,{children:[(0,l.jsx)(c.eb,{value:"flash",children:"DeepSeek v4-flash (fast, cheap)"}),(0,l.jsx)(c.eb,{value:"pro",children:"DeepSeek v4-pro (strategic)"})]})]})]}),(0,l.jsxs)("div",{className:"space-y-1.5",children:[(0,l.jsx)(o.J,{children:"Judge"}),(0,l.jsxs)(c.l6,{value:y?"yes":"no",onValueChange:e=>v("yes"===e),children:[(0,l.jsx)(c.bq,{className:"h-8 text-xs",children:(0,l.jsx)(c.yv,{})}),(0,l.jsxs)(c.gC,{children:[(0,l.jsx)(c.eb,{value:"yes",children:"Claude → Gemini fallback"}),(0,l.jsx)(c.eb,{value:"no",children:"No judge (faster)"})]})]})]})]}),(0,l.jsxs)(d.$,{onClick:T,disabled:w||!e.trim(),className:"w-full gap-2",children:[w?(0,l.jsx)(p.A,{className:"h-4 w-4 animate-spin"}):(0,l.jsx)(h.A,{className:"h-4 w-4"}),w?"Running AutoResearch...":"Run Brad"]})]})]}),S&&(0,l.jsx)("div",{className:"rounded-lg bg-red-50 border border-red-200 px-4 py-3 text-sm text-red-800",children:S}),k&&(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground flex-wrap",children:[(0,l.jsxs)("span",{className:"font-medium text-foreground",children:[k.rounds.length," rounds complete"]}),(0,l.jsx)("span",{children:"\xb7"}),(0,l.jsxs)("span",{children:[(k.totalDurationMs/1e3).toFixed(1),"s total"]}),(0,l.jsx)("span",{children:"\xb7"}),(0,l.jsxs)("span",{children:["$",k.estimatedCostUsd.toFixed(5)," estimated"]}),(0,l.jsx)("span",{children:"\xb7"}),(0,l.jsx)("span",{children:k.model}),k.judgeScore&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{children:"\xb7"}),(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)(f.A,{className:"h-3 w-3 text-amber-500"}),"Judge: ",k.judgeScore.overall,"/10"]})]})]}),k.judgeScore&&(0,l.jsxs)(r.Zp,{className:"border-emerald-200 bg-emerald-50/50",children:[(0,l.jsx)(r.aR,{className:"pb-2",children:(0,l.jsxs)(r.ZB,{className:"text-sm flex items-center gap-2",children:[(0,l.jsx)(f.A,{className:"h-4 w-4 text-amber-500"}),"Judge Score — ",k.judgeScore.overall,"/10",(0,l.jsx)("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:"(Claude → Gemini fallback)"})]})}),(0,l.jsxs)(r.Wu,{className:"space-y-3",children:[(0,l.jsx)("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(k.judgeScore.scores).map(([e,s])=>(0,l.jsx)(b,{label:g[e]??e,value:s},e))}),(0,l.jsx)("p",{className:"text-xs text-muted-foreground italic",children:k.judgeScore.summary})]})]}),(0,l.jsx)("div",{className:"space-y-2",children:k.rounds.map((e,s)=>(0,l.jsx)(N,{result:e,defaultOpen:s===k.rounds.length-1},e.round))})]})]})}},53961:(e,s,a)=>{a.d(s,{A:()=>l});let l=(0,a(6404).A)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},81477:(e,s,a)=>{a.d(s,{BT:()=>c,Wu:()=>o,ZB:()=>i,Zp:()=>d,aR:()=>n,wL:()=>x});var l=a(95155),t=a(12115),r=a(40980);let d=t.forwardRef(({className:e,...s},a)=>(0,l.jsx)("div",{ref:a,className:(0,r.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",e),...s}));d.displayName="Card";let n=t.forwardRef(({className:e,...s},a)=>(0,l.jsx)("div",{ref:a,className:(0,r.cn)("flex flex-col space-y-1.5 p-6",e),...s}));n.displayName="CardHeader";let i=t.forwardRef(({className:e,...s},a)=>(0,l.jsx)("h3",{ref:a,className:(0,r.cn)("text-2xl font-semibold leading-none tracking-tight",e),...s}));
1i.displayName="CardTitle";let c=t.forwardRef(({className:e,...s},a)=>(0,l.jsx)("p",{ref:a,className:(0,r.cn)("text-sm text-muted-foreground",e),...s}));c.displayName="CardDescription";let o=t.forwardRef(({className:e,...s},a)=>(0,l.jsx)("div",{ref:a,className:(0,r.cn)("p-6 pt-0",e),...s}));o.displayName="CardContent";let x=t.forwardRef(({className:e,...s},a)=>(0,l.jsx)("div",{ref:a,className:(0,r.cn)("flex items-center p-6 pt-0",e),...s}));x.displayName="CardFooter"},94290:(e,s,a)=>{a.d(s,{A:()=>l});let l=(0,a(6404).A)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]])}}]);

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.