import{o as r}from"./rolldown-runtime-iuO8RvI4.js";import{Cu as t,L_ as e,Su as o}from"./shared-0-C4kdVF7Y.js";import{Mi as s}from"./vendor-frame-CwiylG4Y.js";import{Jo as i}from"./shared-1-3-6x7RKF.js";import{xc as d}from"./shared-3-D-Ux4aGn.js";import{P as a}from"./shared-7-VxUxSmVa.js";var n=r(s());function u(){const r=t(),s=o(),a=r?.startsWith("/project/")&&"string"==typeof s?.uuid?s.uuid:void 0,u=e("claude_ai_sticky_project_settings"),{data:c,isError:m}=i(a),{resolvedModel:f,isSettled:l}=d({surface:"chat",contextModel:c?.default_model??void 0}),p=l&&(!a||!u||void 0!==c||m),j=(0,n.useRef)(void 0);return p&&f&&void 0===j.current&&(j.current=f),{model:j.current,isSettled:p}}function c(){const{mode:r}=a(),{isSettled:t}=u();return{isTargeted:"credits"===r,isLoading:!t}}export{u as n,c as t};