(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6090],{25862:(e,l,n)=>{"use strict";n.r(l),n.d(l,{default:()=>x});var s=n(95155),i=n(31966),a=n(73321),t=n(1550),o=n(89239),r=n(22317),u=n(8081);let d=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"xhigh",label:"XHigh"},{value:"max",label:"Max"}];function c({enabled:e,color:l,onToggle:n}){return(0,s.jsx)("button",{onClick:n,className:"shrink-0",children:(0,s.jsx)("span",{className:`inline-flex h-7 w-12 items-center rounded-full transition-colors ${e?l||"bg-green-500":"bg-muted-foreground/30"}`,children:(0,s.jsx)("span",{className:`inline-block h-5 w-5 rounded-full bg-white shadow transition-transform ${e?"translate-x-6":"translate-x-1"}`})})})}function m({label:e,children:l}){return(0,s.jsxs)("div",{className:"flex items-start justify-between py-2.5 text-sm",children:[(0,s.jsx)("span",{className:"py-1",children:e}),l]})}function h({options:e,value:l,onChange:n}){return(0,s.jsx)("div",{className:"flex flex-wrap gap-1 justify-end",children:e.map(e=>(0,s.jsx)(o.$,{variant:l===e.value?"default":"outline",size:"sm",onClick:()=>n(e.value),children:e.label},e.value))})}function x(){(0,t.si)("Session Defaults",{hideActions:!0});let e=(0,a.useRouter)(),{settings:l,updateSetting:n}=(0,r.t)(),x=l.modelSlots?.main??"sonnet",v=l.modelSlots?.mainContext??"200k",b=(0,u.AX)(x),g=b?.alias||"sonnet",p=(0,u.r5)(g),f=p.length>1,j=(0,u.iz)(b),k=d.filter(e=>j.includes(e.value));return(0,s.jsxs)("div",{className:"flex-1 min-h-0 overflow-y-auto p-4 sm:p-6",children:[(0,s.jsxs)(o.$,{variant:"ghost",size:"sm",className:"mb-4",onClick:()=>e.push("/settings"),children:[(0,s.jsx)(i.A,{className:"h-4 w-4 mr-1"}),"Settings"]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(m,{label:"Model",children:(0,s.jsx)(h,{options:[{value:"haiku",label:"Haiku"},{value:"sonnet",label:"Sonnet"},{value:"opus",label:"Opus"}],value:g,onChange:e=>(function(e){let s=(0,u.zQ)(e);if(!s)return;n("modelSlots",{...l.modelSlots,main:s.modelId,mainContext:s.contextSizes.includes(v)?v:s.contextSizes[0]??"200k"});let i=(0,u.Mi)(s);i&&n("thinkingLevel",i)})(e)})}),f&&(0,s.jsx)(m,{label:"Version",children:(0,s.jsx)(h,{options:p.map(e=>({value:e.version,label:e.version})),value:b?.version||p[0].version,onChange:function(e){let s=p.find(l=>l.version===e);if(s&&(n("modelSlots",{...l.modelSlots,main:s.modelId,mainContext:s.contextSizes.includes(v)?v:s.contextSizes[0]??"200k"}),!(0,u.iz)(s).includes(l.thinkingLevel))){let e=(0,u.Mi)(s);e&&n("thinkingLevel",e)}}})}),b&&b.contextSizes.length>=2&&(0,s.jsx)(m,{label:"Context",children:(0,s.jsx)(h,{options:b.contextSizes.map(e=>({value:e,label:u.XR[e].label})),value:v,onChange:e=>n("modelSlots",{...l.modelSlots,main:b.modelId,mainContext:e})})}),k.length>0&&(0,s.jsx)(m,{label:"Thinking",children:(0,s.jsx)(h,{options:k,value:l.thinkingLevel,onChange:e=>n("thinkingLevel",e)})}),(0,s.jsx)(m,{label:"Bypass all permissions",children:(0,s.jsx)(c,{enabled:l.bypassAllPermissions,color:"bg-orange-500",onToggle:()=>n("bypassAllPermissions",!l.bypassAllPermissions)})})]})]})}},42908:(e,l,n)=>{Promise.resolve().then(n.bind(n,25862))}},e=>{e.O(0,[989,25781,1550,28441,93794,77358],()=>e(e.s=42908)),_N_E=e.O()}]);