1import{u as r}from"./vendor-query-bOUN_gKe.js";import{b as u,a9 as s}from"./index-BKzE8EQ8.js";const y={auto:{chip:"text-violet-400/90 bg-violet-400/10 hover:bg-violet-400/15",text:"text-violet-400",textLight:"text-violet-700",surface:"bg-violet-400/10",dot:"bg-violet-400",border:"border-violet-400/30",accent:"accent-violet-400"},agent:{chip:"text-emerald-400/90 bg-emerald-400/10 hover:bg-emerald-400/15",text:"text-emerald-400",textLight:"text-emerald-700",surface:"bg-emerald-400/10",dot:"bg-emerald-400",border:"border-emerald-400/30",accent:"accent-emerald-400"},plan:{chip:"text-amber-400/90 bg-amber-400/10 hover:bg-amber-400/15",text:"text-amber-400",textLight:"text-amber-700",surface:"bg-amber-400/10",dot:"bg-amber-400",border:"border-amber-400/30",accent:"accent-amber-400"},loop:{chip:"text-blue-400/90 bg-blue-400/10 hover:bg-blue-400/15",text:"text-blue-400",textLight:"text-blue-700",surface:"bg-blue-400/10",dot:"bg-blue-400",border:"border-blue-400/30",accent:"accent-blue-400"},talk:{chip:"text-cyan-400/90 bg-cyan-400/10 hover:bg-cyan-400/15",text:"text-cyan-400",textLight:"text-cyan-700",surface:"bg-cyan-400/10",dot:"bg-cyan-400",border:"border-cyan-400/30",accent:"accent-cyan-400"}},f={auto:"thinking",agent:"building",plan:"planning",loop:"looping",talk:"talking"},M={pickerAria:{key:"studio.runModePickerAria",defaultValue:"Pick how the agent works"},examplesLink:{key:"studio.runModeExamplesLink",defaultValue:"See games built this way"}},g=2e3,i=[{id:"agent",label:"Build",icon:"wand-magic-sparkles",tagline:"Straight to building",taglineKey:"studio.runModeAgentTagline",description:"Goes straight to building. Best when you know what you want and the change is clear enough to describe in a sentence or tw
1o.",descriptionKey:"studio.runModeAgentDescription",detailNote:"One pass. Usually a few minutes.",detailNoteKey:"studio.runModeAgentDetail"},{id:"plan",label:"Plan",icon:"lightbulb-on",tagline:"Plan first, then build",taglineKey:"studio.runModePlanTagline",description:"Thinks the work through and shows you a plan before touching anything. You approve it, then it builds. Best for bigger changes or when you want a say in the approach.",descriptionKey:"studio.runModePlanDescription",detailNote:"Planning is cheap â you only pay for the build you approve.",detailNoteKey:"studio.runModePlanDetail"},{id:"loop",label:"Loop",icon:"infinity",tagline:"Build with a budget",taglineKey:"studio.runModeLoopTagline",description:"Splits your game into areas, builds them in parallel, then sends a separate critic after each one to judge it against a real shipped game. Anything that falls short goes back for another pass. It keeps going until every area passes or your budget runs out.",descriptionKey:"studio.runModeLoopDescription",detailNote:"Runs for hours, unattended. You can play each build as it lands, leave a note for the agent, or wind it down at any point.",detailNoteKey:"studio.runModeLoopDetail",costNote:"You set the budget up front. Typical: 15,000â75,000 credits",costNoteKey:"studio.runModeLoopCost",badge:"New",badgeKey:"studio.runModeLoopBadge",lockedNote:"Requires Max â upgrade to run unattended builds with a budget",lockedNoteKey:"studio.runModeLoopLockedNote",examplesHref:"/play/tag/built-with-loop"}],d={id:"auto",label:"Auto",icon:"compass",tagline:"Ask anything or describe a change",taglineKey:"studio.runModeAutoTagline",description:"Just type what you want. Ask a question and get an answer, or describe a change and it gets built.",descriptionKey:"studio.runModeAutoDescription",detailNote:"Best for most people. Pick Build if you always want it to start building straight away.",detailNoteKey:"studio.runModeAutoDetail"},c={id:"talk",label:"Talk",icon:"comments",tagline:"Ask about your game, change nothing",taglineKey:"studio.runModeTalkTagline",description:"The agent reads your game and answers: how something works, why it behaves the way it does, or how a change could go. Nothing is changed. When a change would help, the answer ends with a button to build it.",descriptionKey:"studio.runModeTalkDescription",detailNote:"Uses credits like a short build, since the agent reads your game to answer.",detailNoteKey:"studio.runModeTalkDetail"};function m(e,t={}){if(!e)return i;const a=i.find(n=>n.id==="agent"),o=i.find(n=>n.id==="loop");return[d,a,...t.talk?[c]:[],o]}function k(e){return e==="auto"?d:e==="talk"?c:i.find(t=>t.id===e)??i[0]}function w(e){return e.loopArmed?"loop":e.autoAvailable?e.talkPicked?"talk":e.buildPicked?"agent":"auto":e.planMode?"plan":"agent"}function v(e){return e==="auto"||e==="talk"?"":e}function x(e,t,a,o={}){const n=!!o.orchestration;if(!e)return n?{planMode:!1,loopCredits:null,autoMode:!0}:null;if(e==="plan")return n?{planMode:!1,loopCredits:null,autoMode:!0}:{planMode:!0,loopCredits:null,autoMode:!1};const l=e==="loop"&&a&&!!t;return{planMode:!1,loopCredits:l?t:null,autoMode:n&&!l}}function N({picked:e,freePlanOnly:t,canUseLoop:a}){return t?e==="auto"?{runMode:"auto",lockedModes:["agent","talk","loop"]}:{runMode:"plan",lockedModes:["auto","agent","talk","loop"]}:{runMode:e,lockedModes:a?[]:["loop"]}}function A(){const{user:e,isAuthenticated:t}=u(),{data:a}=r({queryKey:["user-usage"],queryFn:s.getUsage,enabled:t});return(a?.edits_remaining??e?.usage?.edits_remaining??0)>0}function K(){const{user:e,isAuthenticated:t}=u(),{data:a}=r({queryKey:["user-usage"],queryFn:s.getUsage,enabled:t});return!!(a??e?.usage)?.plan_preview_active}function p(){const{user:e,isAuthenticated:t}=u(),{data:a}=r({queryKey:["user-usage"],queryFn:s.getUsage,enabled:t}),o=a??e?.usage;return o?.available_balance??o?.edits_remaining??0}function _(){return Math.max(0,p())}function L(){const{user:e,isAuthenticated:t}=u(),{data:a}=r({queryKey:["user-usage"],queryFn:s.getUsage,enabled:t}),o=a?.min_loop_credits??e?.usage?.min_loop_credits??null;return o&&o>0?o:g}export{g as M,y as R,L as a,k as b,M as c,K as d,N as e,w as f,A as g,x as h,f as i,v as p,m as r,_ as u};
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.