import{r as s,j as e}from"./vendor-react-AXa6hZO5.js";import{a}from"./c2591c98b-9UrrTnB9.js";import{a as o,Q as t,R as r,U as i,d as n,V as d,X as m,s as l,Y as c,Z as j}from"./index-C_tZnXTW.js";import{a as p,B as u}from"./cec18ad9a-DiLjrOUd.js";import{u as v,M as f}from"./vendor-intl-BdADXLLt.js";import"./vendor-radix-glKlawmm.js";import"./vendor-luxon-D0OkDiyb.js";import"./vendor-query-D7SPXjZv.js";import"./vendor-lodash-BKAXkXVe.js";import"./vendor-zod-CMvj0_Fd.js";import"./c51f8bc6d-BS9P5nN1.js";import"./vendor-zustand-CcZsBpBq.js";import"./vendor-infra-CFC-WJ8N.js";import"./vendor-router-BSYVf8By.js";import"./cdd5b9598-juLasKsB.js";import"./vendor-motion-0BJMgYoH.js";import"./vendor-growthbook-XJcBFzji.js";import"./vendor-icons-Dy3Nea9p.js";import"./tree-sitter-BFuuT2ac.js";const h=s.memo(({enabled:h,onDismiss:x,onAction:g})=>{const M=p(),b=v(),{conversation:w}=o(),k=w?.id,y=t(),{allModelOptions:C}=r();i(s=>s.model);const N=a(k??"")?.model,{dismiss:S}=n(),z=d(s=>k?s.initialModelByConversation.get(k):void 0),A=s.useCallback(()=>{g({action:"start_new_chat"}),M.push(y?`/project/${y}`:"/new")},[g,y,M]),B=s.useCallback(()=>{S(m),x()},[S,x]),D=C.find(s=>s.model===N)?.name;return h&&D&&z&&N!==z?e.jsx(l,{variant:"main",icon:c,className:"w-full mb-3",message:e.jsx(f,{defaultMessage:"Switched to {currentName}. A fresh chat gets you faster replies that use less of your message limit.",id:"Fx6BT4eqau",values:{currentName:D}}),customAction:e.jsxs("div",{className:"flex flex-col gap-2 items-end",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(u,{size:"sm",variant:"secondary",onClick:x,children:b.formatMessage({defaultMessage:"Keep going",id:"JiaScEwUsv"})}),e.jsx(u,{size:"sm",variant:"primary",onClick:A,children:b.formatMessage({defaultMessage:"Start new chat",id:"KcA+xo4hhh"})})]}),e.jsx(j,{onClick:B,className:"text-xs text-text-400",children:e.jsx(f,{defaultMessage:"Don't ask me again",id:"fouhDohWSi"})})]})}):null});h.displayName="ModelSwitchedChatBanner";export{h as ModelSwitchedChatBanner};
